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!
Advertisement