Add PolygonSplitter for symmetric edge clipping and polygon-level classification#247
Open
TheBeachLab wants to merge 3 commits into
Open
Add PolygonSplitter for symmetric edge clipping and polygon-level classification#247TheBeachLab wants to merge 3 commits into
TheBeachLab wants to merge 3 commits into
Conversation
Replaces CDTTriangleSplitter with a polygon-aware approach that groups split sub-triangles into regions for bulk classification, reducing raycasts and enabling symmetric edge matching across CSG boundaries.
5-task TDD plan: create PolygonSplitter with flood-fill polygon grouping, wire into Evaluator, update split triangle operations for bulk classification, add canonical edge sharing, verify with benchmarks.
Replace CDTTriangleSplitter with PolygonSplitter that groups CDT sub-triangles into polygon regions via flood-fill, classifies each region with a single raycast, and shares canonical edge instances between intersection maps for symmetric vertex positions.
703d628 to
900a45d
Compare
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.
Summary
Addresses #51 — enables symmetrical clipping along connected edges by replacing
CDTTriangleSplitterwith a newPolygonSplitterthat:Changes
PolygonSplitterclass (src/core/PolygonSplitter.js) — extends CDT triangulation withgetPolygonRegions()flood-fill groupingperformSplitTriangleOperations(src/core/operations/operations.js) — iterates polygon regions for bulk classification, removes dead connectivity traversal codesrc/core/operations/operationsUtils.js) — both intersection maps reference the sameLine3instance per intersection edgeCDTTriangleSplitter—PolygonSplitterreplaces it as theuseCDTClipping = truebackendTest Plan
npm test)useCDTClipping = true