Repository navigation
Conversation
…ries (wrong-nebula#190) Operands that touch only along an edge or at a corner give an exact CSG result whose solids share that edge or vertex. The edge then had four faces (rejected as bad), so boolean_op nudged the tool and returned the nudged geometry: watertight, but with corners moved by ~1e-5 and volumes off by ~2e-5 relative. A shared corner alone passed the boolean but failed strict mode as a non-manifold vertex. split_touching_solids() now separates such contacts topologically, like manifold libraries do: faces around a multi-face edge are sorted by angle and paired across each solid wedge, then every vertex is split per fan of faces joined through (paired) edges. Coordinates stay exact; touching solids become separate shells. The multi-shell overlap check now treats contact where neither triangle crosses the other's plane as touching, not overlapping. Grid-aligned box CSG (2-6 boxes, add/cut/intersect, exact cell-volume reference): 762/800 -> 800/800 exact to 1e-9, with no rejections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018inpPNqrJ4RQcb5toxiqEE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #190.
Cause. When operands touch only along an edge, the exact CSG result has an edge with four faces, so it counts as bad edges.
boolean_opthen nudges the tool and returns the nudged geometry. That output is watertight, but its corners move by about 1e-5 and volumes are off by about 2e-5. This matches the hypothesis in the issue. When operands share only a corner, the result passes the boolean but fails strict mode with a non-manifold vertex (the "WT=false, NM=0, B=0" case).Fix.
split_touching_solids()separates such contacts topologically, the way manifold libraries represent them:Coordinates stay exact, and touching solids become separate shells. An edge whose faces cannot be paired consistently is left alone, and the existing path runs. The multi-shell overlap check now treats contact where neither triangle crosses the other's plane as touching, not overlapping.
Measured on 800 grid-aligned cases built like the issue's: 2–6 boxes, add/cut/intersect, 0.5 and 0.37 grids, with an exact cell-decomposition volume.
mainTests.
issue_regressions.rs:All three fail on
main.Re-checked on current
main(d9d9c22, 2026-12-06): merges cleanly, the full workspace test suite passes with this PR applied (280 tests, 0 failures), andcargo clippy --workspace --all-targetsreports no warnings.🤖 Generated with Claude Code
https://claude.ai/code/session_018inpPNqrJ4RQcb5toxiqEE