I am new to sketchup dynamic components, but I am well versed in CG modeling (coming from Maya and Blender and Houdini). I mention this both to let you know I am open to complex discussions and answers here as well as to list any (unintentional) technical biases I may have when thinking about 3D operations in Sketchup.
I have a nested component where I am trying to set the X position of a sub-component using a formula. But I am having difficulty understanding how the coordinate systems work. Specifically, this sub-component shows an X value of 207.435589", but it is only 36.75" away from the origin of its parent (and as far as I can tell, the parent is at the world origin).
If I replace this 207.435589" value with 0", nothing changes and the 207 value just re-appears in gray. But if I type in 10", the value changes to 197.58374". So it moved 10 units, but relative to what?
Then if I click out of that component and look at the parent component, I can see this sub-component now has an X value of 10. I am still confused since it is actually 36.75 inches away from the origin of its parent.
I am used to a nested object having an object transform that is relative to its parent’s origin. So if the parent has an origin at (world space) 10, 0, 0 and the child has an origin at (world space) 20, 0, 0, then the transform of the child would be 10, 0, 0 (i.e. its transformation in its parent’s space).
Is this the same in Sketchup? If so, then is the origin not the same thing as the axis? (I set the axis of each component to be at where I want the origin of that object to be).
Is the 0 position of an object relative to where it was created?
the child’s insertion point is the distance from the parents insertion point. That is the child (10,0,0) from the parent’s insertion point as new origin (0,0,0).
However you must have the parent shown in the attribute dialog to see this otherwise the value will be geometry relative to model world, once you fix the position with formula, then they tally.
when editing and changing position formula it is best to do so with parent shown, otherwise the sub will jump from one to other system of coordinates (though easily fixed with redraw on parent)
That squares with what I am seeing then. When I select the parent, and expose the coordinates of the child I am indeed seeing the value I expect.
But I am still confused perhaps about what the insertion point is. Is that the same as the origin (or where the axis for that object are)? Or does it have something to do with where the object was originally created?
I have an object where I set the axis to be right at its corner, but when I use the same value for its X position as I am using for some other items, it does not appear to be in the location that I expect. It is hard to describe. Specifically, I have a door that is using a single value for its width. I have a doorknob that should be moving according to this width. But its “origin” appears to be somewhere in the middle of the door, so that any values that I use are (roughly) 18.83" off from what I expect. (I include the number here only to show that it feels like a random value, not something I can readily identify).
I tried including the sketchup file here in case you have the time and interest in looking. But no obligations! I truly appreciate your help so far.
The axis of the component is the insertion point, The door and hardware container has an axis at its mid point, best to position this at the hinge edge where you wish to swing the door. Change either through context menu on component, or whilst inside right click the axis.