4
$\begingroup$

I'm trying to figure out the surface area of a mesh that is the result of various CSG union operations between an arbitrary number of other meshes by summing up the same property of each one of it's faces (triangles, in this case) but the result is far greater than expected. I believe that this is happening because the mesh that results from the CSG union operations have internal faces, but I'm trying to find only the surface area of it's exterior.

Is there any technique to remove the inner faces of a triangulated mesh, or maybe some way to just ignore these ones while calculating it's surface area?

Currently I'm using Net3dBool to perform the CSG operations. The code that performs the intersection is on the file BooleanModeller.cs, on the getIntersection method, wich calls the composeSolid method.

$\endgroup$
  • 1
    $\begingroup$ If your Constructive Solid Geometry method allows intersection as well as union, then you can use this to find the internal area, and subtract that from the total to give the external area. Would that make a useful answer? $\endgroup$ – trichoplax Jun 7 '17 at 15:01
  • 1
    $\begingroup$ This would depend on all the initial meshes having no internal triangles. If you can guarantee this then the method will work. For example, a hollow ball constructed from two concentric spheres would not give correct results when intersected with another sphere. However, if the construction is using only unions, then intersections can be used to subtract the area of the internal triangles. $\endgroup$ – trichoplax Jun 7 '17 at 15:08
  • $\begingroup$ I think that this could be the answer, but for example, if one of the meshes is inside the other the one that's inside should be completely ignored. Would that be the case? I tried to use intersection as stated and found the same results. $\endgroup$ – Liordino Neto Jun 7 '17 at 19:50
  • 1
    $\begingroup$ If your intersection method returns the surface that encloses the volume enclosed by both the first mesh and the second mesh, then the intersection of the two meshes you describe will simply be the entire inner mesh, which is precisely the triangles that you wish to exclude. So it sounds like either your intersection method works differently, or there is a separate problem causing overcounting. Could you include your code so we can analyse it? $\endgroup$ – trichoplax Jun 8 '17 at 9:15
  • $\begingroup$ Sure! Currently I'm using Net3dBool to perform the CSG operations. The code that performs the intersection is on the file BooleanModeller.cs, on the getIntersection method, wich calls the composeSolid method. Thanks! $\endgroup$ – Liordino Neto Jun 8 '17 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.