Global coordinates Question
-
Hi Guys
Quick question,
I am creating a tool which uses the pick helper class.
When I use the picked face method to find the surrounding vertices within a closed group or component , the positions are returned as local coordinates.
Is there a method within the API to change the values from local to global.
I tried some of the transform methods but it's all rather vague and I am not having any luck, if anyone has any suggestions it would be greatly appreciated.Cheers
Brett
-
Something like...
entities.transform_entities(group.transformation, array_of_points_or_vertices)
untested...
Where entities is the model.entities [or 'active_entities'?], group is the parent of the point/vertex and the 'array' is the list of things to 'transform'...
'Nested' groups etc need a transformation for each context... -
The final transformation is the combination of all the parent transformations. So if you have a Group3 nested as follows:
+ Model | + Group1 | + Group2 | + Group3
Then the Transformation for entities in Group3 is:
final_trans = Group1.transformation * Group2.transformation * Group3.transformation
-
Thanks for the help,have got it sorted.
Jim - I really appreciate you sharing the info about the nested components/groups saved a lot of time and effortThanks
Brett
Advertisement