Default three.js raycasting can "leak" rays at edges where triangles meet. In order to determine whether triangles should be included or excluded in the final result we use raycasting which means we can incorrectly mark triangles as inside / outside. The solution currently is to raycast multiple times per triangle to minimize the chance. More raycasting is more performance intensive and still not immune to problems. We can implement a more robust custom triangle intersection function using bvh.shapecast to address this.
Notes
Ensuring consistent half-edge structures means we don't have to raycast as much (#51)
Default three.js raycasting can "leak" rays at edges where triangles meet. In order to determine whether triangles should be included or excluded in the final result we use raycasting which means we can incorrectly mark triangles as inside / outside. The solution currently is to raycast multiple times per triangle to minimize the chance. More raycasting is more performance intensive and still not immune to problems. We can implement a more robust custom triangle intersection function using
bvh.shapecast
to address this.Notes