[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)?

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement