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

Anonymous
415 Views
1 Reply
Message 1 of 2

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

Anonymous
Not applicable

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.

Example:

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.

before-after.png

 

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.

hidden-bRep.PNG

 

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?

0 Likes
Accepted solutions (1)
416 Views
1 Reply
Reply (1)
Message 2 of 2

BrianEkins
Mentor
Mentor
Accepted solution

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
Website/Blog: https://EkinsSolutions.com
0 Likes