Add CrossSection backend selector#1710
Merged
pca006132 merged 2 commits intoMay 15, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1710 +/- ##
=======================================
Coverage 95.27% 95.27%
=======================================
Files 36 36
Lines 8043 8043
=======================================
Hits 7663 7663
Misses 380 380 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pca006132
reviewed
May 14, 2026
pca006132
approved these changes
May 14, 2026
af0a749 to
2cd3688
Compare
Merged
11 tasks
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
Adds CMake plumbing for selecting a CrossSection backend while keeping Clipper2 as the supported/default backend.
This introduces
MANIFOLD_CROSS_SECTION_BACKEND, currently accepting:clipper2— the existing supported implementation and defaultboolean2— an experimental staged placeholder for the follow-up backend PRThe boolean2 translation unit in this PR is deliberately hollow: it compiles and returns empty CrossSection results, but is not a functional backend yet. The actual boolean2 CrossSection implementation lands in the next staged PR.
This also makes Clipper2 dependency discovery/export backend-aware, so Clipper2 is only required when building or consuming the Clipper2-backed CrossSection implementation.
Part of #1707.
Testing
cmake -S . -B build/pr-next-backend-switch -DMANIFOLD_PAR=OFF -DMANIFOLD_CROSS_SECTION=ON -DMANIFOLD_CROSS_SECTION_BACKEND=clipper2cmake --build build/pr-next-backend-switch --target manifold_test --parallel 4ctest --test-dir build/pr-next-backend-switch -R CrossSection --output-on-failure -j4cmake -S . -B build/pr-next-backend-switch-boolean2 -DMANIFOLD_PAR=OFF -DMANIFOLD_CROSS_SECTION=ON -DMANIFOLD_CROSS_SECTION_BACKEND=boolean2cmake --build build/pr-next-backend-switch-boolean2 --target manifold --parallel 4git diff --check