MMapi script for Meshmix Object placement

MMapi script for Meshmix Object placement

Anonymous
Not applicable
731 Views
1 Reply
Message 1 of 2

MMapi script for Meshmix Object placement

Anonymous
Not applicable

Hi,

I have some objects that I want to place on the teeth STL. Is there a provision in Meshmixer api to automate this process by providing location and orientation as an input?

0 Likes
732 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

The basic question is: "Where do you want to insert some object?" 

Is there any way to define this point? (Something like "in ratio to the objects center", "at a certain point hit by a ray casted from a certain point" or " centroid of some selection" - just to mention a few). If you know the way how to construct this point on the surface, you can construct a mm.Frame (origin + normal rotation) and transform the inserted object to that frame.

 

The basic workflow (here: based on a selection's centroid) is included in demo_08_transform_obj.py in the examples directory.

demo_02_spatialtest.py shows how to construct a mm.frame by hitting a ray against a surface (you want to know the "hitFrame").

 

Please provide more information about where you want to start...

 

 

0 Likes