Community
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.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TriangleMesh::nodeCount() return value

1 REPLY 1
Reply
Message 1 of 2
mingiss
156 Views, 1 Reply

TriangleMesh::nodeCount() return value

Hello.

Just spotted, that the method TriangleMesh::nodeCount() returns the count of the vertices of the triangles, not of the points, as in contrast returned from PolygonMesh::nodeCount(). Is this slight inconsistency intentional? "Points" I mean the values of the vector of unique coordinates, returned by TriangleMesh::nodeCoordinates() / PolygonMesh::nodeCoordinates(), "triangle vertices" -- the values of the vector of references to the points, returned by TriangleMesh::nodeIndices() / PolygonMesh::triangleNodeIndices(). "Nodes" I hope are rather "points", not the "vertices"? In former case there is no other means to find out the amount of the points, than calculate the size of TriangleMesh::nodeCoordinates() (efficiency issue), when the amount of the vertices is just as trice as the amount of triangles TriangleMesh::triangleCount() (kind of duplication). Both meshes in my case are identical and returned from MeshBody::displayMesh() and MeshBody::mesh().

 

1 REPLY 1
Message 2 of 2
BrianEkins
in reply to: mingiss

I see the problem you've described and It's a bug and should be fixed.  The TriangleMesh.nodeCount property should be returning the number of points in the nodeCoordinates array.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com

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