Retrieve mesh data from API

Retrieve mesh data from API

Anonymous
Not applicable
1,057 Views
3 Replies
Message 1 of 4

Retrieve mesh data from API

Anonymous
Not applicable

Hi,

 

In my current project I am creating a plugin for Fusion 360 and I need the mesh representation of all the existing objects one by one. I have found that I can calculate the meshes with  TriangleMeshCalculator, but ( with default values ) the result seems to be incorrect.

 

Could anyone point me to any tutorial or documentation on how mesh information retrieval should be done properly? 

(I am using C++, but you can give me example with any language!)

 

Any help would be greatly appreciated.

 

 

0 Likes
Accepted solutions (1)
1,058 Views
3 Replies
Replies (3)
Message 2 of 4

ekinsb
Alumni
Alumni
Accepted solution

Creating new meshes using the TriangleMeshCalculator should work but if you're seeing problems I would be interested in seeing a specific test case to verify if there is a problem.

 

When needing a mesh of an existing body, I typically use the displayMeshes property of the MeshManager object and then use the bestMesh property of the returned TriangleMeshList object.  The primary reason for this is that it will be much faster because it's return an existing mesh rather than creating a new one.  In either case though, you'll end up with a TriangleMesh object that contains all of the mesh information.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 4

Anonymous
Not applicable

Hi Brian,

 

Thank you for your answer. I have managed to get accurate mesh information from the BestMesh method, but the received mesh is missing texture coordinates. 

In my test project I have a cylinder that has both physical material and appearance texture assigned.

 

Is it normal that the texture coordinates are empty in case of BestMesh?

 

Thank you for your response in advance!

0 Likes
Message 4 of 4

ekinsb
Alumni
Alumni

Unfortunately, we're not yet supporting the export of texture information.  This is planned for the future but there isn't a specific date when it might be available.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes