How to move a group
-
hi guyes
I create a group and add to group facegroup1 = entities.add_group face = group1.definition.entities.add_face(f[0], f[1], f[2], f[3])Next I will rotate everything in this group
[X_AXIS, Y_AXIS].each { |axis| if not face.normal.samedirection?(Z_AXIS) if face.normal.perpendicular?(axis) angle = face.normal.angle_between(axis) angle = 180 - (angle * 180 / Math;;PI) rotation = Geom;;Transformation.rotation(group1.bounds.center, axis, angle.degrees) group1.entities.transform_entities(rotation, group1.entities.to_a) end end }Next I need to move everything to the origin of global coordinates. How to do it?
group1.transformation.origin have zero coordinats, but group1 is not at zero.
how to move a group or its contents to another location? -
@mr_creator said:
Next I need to move everything to the origin of global coordinates.
group1 = entities.add_groupThis line of code will create a new group at the origin of
entities. If this is the top level model'sentities, then this is the global origin. If it is some other component's or group'sentities, then it is their local origin.@mr_creator said:
group1.transformation.originhave zero coordinates, but group1 is not at zero.This confirms then that
group1's origin is at the origin of the active edit context's origin.
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