How to change or set a Group's axes in code?


#1

Sometimes i need to change or set a group’s axes in code, but i could not find the proper method for it. Could you show me a code example or give me some advises, thanks a lot !!


#2

Geom::Transformation.axes

… then apply the transform to the group entities ?

Sketchup::Entities.transform_entities

tr = Geom::Transformation.axes(ORIGIN, X_AXIS, Z_AXIS, Y_AXIS.reverse)
group.entities.transform_entities( tr, group.entities.to_a )

To change the insertion point you’ll need to access the group’s definition …

Sketchup::ComponentDefinition.insertion_ponit=

point = Geom::Point3d.new(10, 20, 0)
group.definition.insertion_point = point

#3

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.