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 | + Group3Then 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
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