gkjohnson / three-bvh-csg

A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Produce debug page, utilities for finding and understanding incorrectly clipped triangles

gkjohnson opened this issue · comments

Requirements

  • Add a utility for determining whether a mesh is "solid" or has holes / missing triangles after an operation.
  • Add utility for automatically isolating and highlighting triangle sets that are split and have missing faces.
  • Isolated triangle sets can be automatically run to find two triangle intersections that result in an incorrect clip
  • Add a demo page to easily view and reproduce triangle intersections so they can be iteratively tested / fixed (above utilities can automatically log code snippets to initialize page)

Notes

  • When a missing triangle issue is fixed we should make test.
  • The frame the triangle clipping / intersections occurs in is important (clipping happening in brush A frame vs brush B frame).
  • Checking the full halfedge connectivity would work to determine whether there are missing triangles but the current result of CSG operations is not guaranteed to be fully manifold such that all half edges fully connect (see #51)

--

We still have cases where clipping triangles results in incorrect results - ie missing faces, etc. It's not always clear how this happens - either from the "internal" determination failing or faces simply not being split as expected. It may be possible to write tests or checks to ensure that triangles are split into sets that are > 1 otherwise something may have gone wrong. We could also implement more robust clipping and "inside" detection methods to compare to the fast versions currently used.

Along with that it would be good to have a fast, easy way to set up a problematic clipping case and determine where the issue is. Some design thinking needs to be put into both of these issues.

Hey, we are offering a bounty of $500 for this issue. Whoever solves it, will get that money. 😎