-
-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
Milestone
Description
Related to #49
Requirements
- Add a variation of TriangleSplitter that will clip triangles such that edges are symmetrically split so the edges line up and can be connected in the
HalfEdgeMap
.
Approach
- When clipping triangles construct polygons from connected loops of edges from the edges derived from triangle intersections.
- Once all polygons have been found from the split determine whether they're inside or outside the model using the existing determination method (raycasting).
- For the polygons to keep run the three.js built-in Earcut method to triangulate the polygon to add to the final geometry.
Notes
- Alternatively the half edge structure could be redesigned to not require a 1:1 relationship on edges. Instead if triangles connect at T-junctions the relationships can be 1 to many, though this would be significantly more complicated and require ensuring the full length of the edge is accounted for.
- Polygon triangulation: