BrunoLevy / geogram

a programming library with geometric algorithms
Other
1.8k stars 122 forks source link

Mesh intersection: coplanar facets on same side of radial edge in radial sort #111

Closed BrunoLevy closed 10 months ago

BrunoLevy commented 10 months ago
$  intersect three_cubes.obj remove_internal_boundaries=true

fails (just keeps a couple of triangles instead of only removing the internal boundaries) where three_cubes.obj is here

There are duplicated triangles after mesh intersection. So the global vertex map / the comparison function might be bugged ? nope (see below)

BrunoLevy commented 10 months ago

image

gotcha red vertex exists as an original vertex of A, and as an intersection between an edge of B and an edge of C

BrunoLevy commented 10 months ago

Added post-processing loop that queries the global vertex map with all existing vertices and that merges them in case of a match.