csg.cs icon indicating copy to clipboard operation
csg.cs copied to clipboard

Generated mesh contains "T-junctions"

Open omgwtfgames opened this issue 10 years ago • 1 comments

After a CSG operation, the resulting triangles do not share vertices (it's just a soup of unconnected triangles). Need to apply something equivalent to Blenders "Remove doubles" to turn it into a manifold mesh.

Also, some vertices lie along an edge of a triangle that does not involve that vertex ("T-junctions"). In these cases that triangle should be split into two, to include the vertex and make the mesh manifold. (For an example, see the Sphere subtracted from Cube in the current example scene - at the 'poles' of the sphere there is a vertex lying along an edge).

omgwtfgames avatar Jul 21 '14 05:07 omgwtfgames

Partially fixed. The "T-junction" issue, described in the second part of this issue remains.There's a description of how to deal with these mesh features from BSP-based CSG operations here: http://www.flipcode.com/archives/Merging_Polygons_And_Sub-Pixel_Gaps.shtml

omgwtfgames avatar Nov 12 '14 07:11 omgwtfgames