Moving Axis / Origin of a Group
-
Problem: I have lots of groups. I Want to select them. Execute a ruby plug and the Axis/Origing of everygroup is moved to a random location.
I tried setting transformation.axes but this only tranforms everything inside the group leaving the Axis / Origing to its original position. I found many Similar question and problems but its realy misty on how to do this correct,clean and fast!
Thx in advance guys.

-
You make a transformation
tr=Geom::Transformation.translation(vector)
and apply it to the group as:
group.transform!(tr)
to move it by that vector.You can generate a random
vector...If you want to - to move the contents of the group back, so that although it appears to be unchanged its axes are now elsewhere use:
group.entities.transform_entities(tr.inverse, group.entities.to_a) -
Tig, ok this did the trick! THX!

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