Skip to content

Add CrossSection backend selector#1710

Merged
pca006132 merged 2 commits into
elalish:masterfrom
zmerlynn:pr/cross-section-backend-switch
May 15, 2026
Merged

Add CrossSection backend selector#1710
pca006132 merged 2 commits into
elalish:masterfrom
zmerlynn:pr/cross-section-backend-switch

Conversation

@zmerlynn

Copy link
Copy Markdown
Contributor

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 default
  • boolean2 — an experimental staged placeholder for the follow-up backend PR

The 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=clipper2
  • cmake --build build/pr-next-backend-switch --target manifold_test --parallel 4
  • ctest --test-dir build/pr-next-backend-switch -R CrossSection --output-on-failure -j4
  • cmake -S . -B build/pr-next-backend-switch-boolean2 -DMANIFOLD_PAR=OFF -DMANIFOLD_CROSS_SECTION=ON -DMANIFOLD_CROSS_SECTION_BACKEND=boolean2
  • cmake --build build/pr-next-backend-switch-boolean2 --target manifold --parallel 4
  • git diff --check

@zmerlynn zmerlynn marked this pull request as ready for review May 14, 2026 12:21
@codecov

codecov Bot commented May 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.27%. Comparing base (73c6878) to head (2cd3688).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread CMakeLists.txt
@zmerlynn zmerlynn force-pushed the pr/cross-section-backend-switch branch from af0a749 to 2cd3688 Compare May 14, 2026 14:51
@pca006132 pca006132 merged commit 0d5b52c into elalish:master May 15, 2026
40 checks passed
@elalish elalish mentioned this pull request May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants