Is there any way to hook into TriangleMeshCalculator to know what face a triangle came from?

Is there any way to hook into TriangleMeshCalculator to know what face a triangle came from?

marcosscriven
Enthusiast Enthusiast
840 Views
4 Replies
Message 1 of 5

Is there any way to hook into TriangleMeshCalculator to know what face a triangle came from?

marcosscriven
Enthusiast
Enthusiast

I've been looking at both TriangleMeshCalculator to see if there's some callback as it creates a mesh from a BRep, and the TriangleMesh object to see if it's there as some attribute on the triangles. I can't find anything like this.

 

There's several use cases for this I can think of, but two are:

 

1. To be able to know what face in the original brep each triangle came from

2. To be able to modify how the mesh calculator works, or even write a new one. For instance, so I could create a spherical surface in a completely different way, such as a subdivided icosahedron.

 

One workaround I thought of was to take the mesh calculator from each face, but then one is tasked with manually stitching those meshes together.

0 Likes
Accepted solutions (1)
841 Views
4 Replies
Replies (4)
Message 2 of 5

BrianEkins
Mentor
Mentor

If you get the triangles from each face and used the same tolerance when calculating the triangles, the triangles should be calculated in a way that when the triangles from each face are reassembled they should be watertight without any need to do any modification.  

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

marcosscriven
Enthusiast
Enthusiast

Thanks @BrianEkins 

 

I assume that implies there is indeed no way to get a whole body mesh directly and determine a link to faces?

0 Likes
Message 4 of 5

BrianEkins
Mentor
Mentor
Accepted solution

That's right, it's not currently possible.

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

marcosscriven
Enthusiast
Enthusiast

I wish there were way to mark something as “not possible”, as it’s disappointing when you find a “solved” topic on a forum and it turns out it’s not possible. 

I’ll try the workaround I was trying to avoid. It’s still annoying having these edges I’ll have to join. I don’t like the idea of just hoping, and in any case I want a connected mesh, not just a bag of triangles. 

0 Likes