[REQ SU api] Set component axis
-
@SketchUp team
Please add a way to set a component definitions origin and axis directly.
-
Although it's convoluted you can do it already... You use:
definition.entities.transform_entities(Geom::Transformation.translation(ORIGIN.vector_to(some_other_point_in_the_context)), definition.entities.to_a)
to move the origin/insertion-point of the definition.
If there are any existing 'instances' you'll also need to apply an inverse transformation to them ?
If the axes are rotated you can also do a...Geom::Transformation.rotation(anchor_point, axis_vector, angle)...
and again you might need to fix any existing 'instances'... -
Yeah, thats what I use but using the inverse transformation IS convoluted.
It would be so much easier if there was a set origin and axis. -
@pixero said:
Yeah, thats what I use but using the inverse transformation IS convoluted.
It would be so much easier if there was a set origin and axis.
I agree !
I was just saying it was possible - albeit convoluted... -
@tig said:
Although it's convoluted you can do it already... You use:
definition.entities.transform_entities(Geom::Transformation.translation(ORIGIN.vector_to(some_other_point_in_the_context)), definition.entities.to_a)
to move the origin/insertion-point of the definition.
If there are any existing 'instances' you'll also need to apply an inverse transformation to them ?
If the axes are rotated you can also do a...Geom::Transformation.rotation(anchor_point, axis_vector, angle)...
and again you might need to fix any existing 'instances'...Sorry bring back this post but, with this is possible to do the second move (at right)?
Advertisement