Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug: Meshbody loses all metadata when using the "MeshCombineCommand"

Message 1 of 2
168 Views, 1 Reply

Bug: Meshbody loses all metadata when using the "MeshCombineCommand"

Hi all,


I made a script that takes a bRrep, converts it into a meshBody, moves the meshBody several steps (rotatory or translatory) and saves the moved meshes in several meshBodies.


I have a box. I want the Box to rotate 360° in 10 steps, so I get 10 Meshbodies, wich are rotated by 36° each.

If you think larger, there can be hundrets of Bodies, so I used the Textcommand "MeshCombineCommand" to merge the meshBodies after each movement.



As soon as the TextCommand finished, Fusion combined the desired meshBodies together, BUT the new meshBody lost all meshData (nodeCoordinates, nodeIndices, normalVectors).

To bypass this issue I thought, make a bRep from the merged mesh and convert it back to mesh. So I used the "Mesh2bRepCommand" and the "bRep2Mesh". That resulted in a new bRepBody and a new meshBody, but some faces of the mesh were missing, and there were also no meshData. So I tried to get the meshBody from the temporaryMeshManager of the bRep of the mergedMesh, but Fusion failed to get the tempMgr.

The created bRepBody is also strange, it is visible in the GUI and the API but is neither in the browser, nor selectable in the GUI.



Meanwhile fusion crashes when I debug the script, but it runs fine without debugging.



@BrianEkins, @goyals is this because mesh is on preview yet? Will this be fixed in the future or am I doing something fundamentally wrong?

Labels (4)
Message 2 of 2
in reply to: k.trucksees

Anything you do with a text command is unsupported.  Developers use those to test internal functionality and they're not meant for public consumption.


Using the supported API, there is very little support for the Mesh capability.  This is intentional because we didn't want to spend time designing and developing an API for functionality that might drastically change or even go away. Hopefully, in the future, there will be a full API for the mesh capabilities in Fusion.

Brian Ekins
Inventor and Fusion 360 API Expert

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report