Is the result of ExtrudeGeometry always Manifold? ~ Given necessary properties for being so

Assume we have a 2D Shape with the following properties:

  • Non Overlapping edges
  • No duplicate points in shape
  • Non Overlapping Holes with other holes / boundary
  • May or May not have co-linear points

Note: Unsure about the orientation. Possibly the holes may or may not have same orientation as the other holes / boundary. Wondering if this could cause any issues in the result of the Extrusion

Assume the following properties, rest properties are default values, for ExtrudeGeometry:

  • depth
  • bevelEnabled is false

Considering the above properties, is it guaranteed that the Extrusion Result would be:

  • Water tight
  • Manifold

The issue that I am currently facing is. A Certain few meshes created using the above workflow tend to result in an error “NotManifold” when using the CSG Library “manifold-3d”, but again it’s the same workflow and it works for other cases. Not able to understand where i might be going wrong

Thank You!

No, it is not guaranteed to be manifold. The three.js “cap” triangulation is based on Mapbox’s earcut library which has some known cases where triangulation fails to be correctly connected.

Got it, A follow up question: Usually, Converting geometry from Non - Manifold to Manifold requires human assistance ( atleast in some cases, to get a visually correct output ).

Is there currently any way through which we can have a manifold output from extrude geometry? or a post processing solution which can remove the above triangulation artifact?

Thank You!

A solution for generating manifold output through extrusion of a cross section shape is to use manifold-3d’s extrude function

I believe that should resolve the original issue that I had mentioned