You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 12, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 12, 2026. It is now read-only.
Modernize CGAL 6.2 integration for current best practices #102
Audit and modernize production CGAL 6.2 surfaces only where needed for correctness, lifetime safety, deterministic reference behavior, and the supported build contract. The priorities are traits/TDS validity, handle invalidation, insertion/removal, cache consistency, flip preconditions, the applicable-move boundary, and the sequential/parallel configuration.
Do not change kernels, exact-arithmetic backends, or peripheral experiments without a reproduced defect and comparative evidence. #88 owns multithreaded behavior and scaling; #98 owns viewer restoration.
Native GitHub dependency metadata is the source of truth for ordering.
Summary
Perform a comprehensive audit and modernization of CDT++'s CGAL integration against CGAL 6.2 APIs, concepts, documented preconditions, and recommended usage patterns. Make the integration exemplary modern scientific C++ while preserving CDT semantics, deterministic reference behavior, numerical robustness, and performance.
CDT++ already resolves CGAL 6.2 from its pinned vcpkg baseline. This issue is therefore primarily about using CGAL correctly and intentionally, not merely increasing a version number.
CGAL is the foundation of CDT++ topology and geometry. The repository currently wraps and exposes a substantial part of Delaunay_triangulation_3, stores CGAL handles in cached containers, composes custom vertex and cell bases with info(), conditionally selects Parallel_tag, performs range insertion and vertex removal, calls low-level TDS flips, uses iterator/circulator idioms, and contains separate periodic and d-dimensional experiments.
The recent causal 2-to-3 move defect illustrates the boundary that must be explicit: CGAL can prove combinatorial flippability, but it does not know the CDT causal admissibility contract. A reference implementation should clearly separate CGAL's guarantees from CDT's stronger scientific invariants and document the lifetime effects of every topology mutation.
Current integration surfaces
Audit at least:
include/Triangulation_traits.hpp
include/Foliated_triangulation.hpp
include/Ergodic_moves_3.hpp
bistellar-flip implementation and tests
include/Periodic_3_complex.hpp
include/Periodic_3_triangulations.hpp
include/Torus_d.hpp
CGAL serialization, visualization, timers, generators, and test fixtures
CMake/vcpkg feature selection, TBB linkage, compiler definitions, and CI coverage
Scope
Version, support, and deprecations
Confirm the repository-owned vcpkg baseline resolves the intended CGAL 6.2 release on every supported platform.
Compile representative CGAL surfaces with deprecation warnings enabled where supported.
Inventory deprecated, compatibility-only, legacy, or undocumented CGAL APIs and assumptions.
Record the CGAL compiler, Boost, GMP/MPFR, and TBB support contract used by CDT++.
Review each future CGAL upgrade against release notes and package-specific deprecated lists.
Kernel and numerical policy
Document the predicates and constructions on which CDT++ scientific correctness depends.
Re-evaluate the current Exact_predicates_inexact_constructions_kernel choice against those requirements.
Compare exact-construction or other filtered-kernel alternatives only where a concrete robustness problem justifies them.
Add adversarial near-degenerate and co-spherical fixtures before changing the kernel.
Measure construction, insertion, move, memory, and simulation costs for any kernel change.
Keep the existing kernel when it remains the best correctness/performance tradeoff; modernization does not require novelty.
Exact arithmetic backend
Audit which selected CGAL kernel, number types, and package features require GMP and MPFR rather than assuming the historical dependency remains necessary.
Evaluate Boost.Multiprecision alternatives only where CGAL 6.2 explicitly supports them for CDT++ production surfaces.
Benchmark representative CDT++ workloads for compile time, runtime, and peak memory before changing the exact-arithmetic backend.
Verify numerical robustness and scientific correctness with the same adversarial near-degenerate, co-spherical, deterministic move, and simulation fixtures used to justify the kernel policy.
Retain GMP/MPFR unless Boost.Multiprecision demonstrates equivalent correctness and acceptable performance; dependency reduction alone is not sufficient justification.
If a transition is justified, update vcpkg features, CMake linkage, CI coverage, documentation, and the recorded dependency/support contract together.
Traits and triangulation data structure
Audit Triangulation_vertex_base_with_info_3, Triangulation_cell_base_with_info_3, the Delaunay cell-base requirements, and custom TDS composition against current concepts.
Prefer CGAL's canonical Delaunay::Vertex_handle, Cell_handle, Facet, and Edge types over parallel std::pair or CGAL::Triple aliases where that removes ambiguity.
Verify rebind, copy, move, swap, allocator, and concurrency behavior of the selected bases and TDS.
Make the ownership and validity of cached handles explicit.
Traversal, lookup, and ranges
Review every vertex, cell, edge, facet, incident-simplex, and circulator traversal.
Use CGAL's handle ranges such as finite_vertex_handles(), finite_cell_handles(), finite_edges(), and finite_facets() where they improve type correctness and clarity.
Retain iterator or circulator forms when they are semantically necessary or measurably better.
Remove wrapper functions that merely forward to CGAL without adding a CDT invariant, safer ownership, or a useful abstraction boundary.
Check lookup, point-location, and insertion-hint use against current APIs and workload characteristics.
Insertion, removal, and construction
Verify bulk insertion of point/info pairs follows the efficient CGAL range-insertion path and preserves the required association between points and time labels.
Document which vertex, cell, edge, facet, iterator, and circulator handles become invalid after each insertion, removal, copy, swap, and repair operation.
Ensure no cached topology survives an invalidating operation without a mandatory rebuild or generation check.
Review causality-repair loops that remove vertices and retriangulate cavities for current preconditions and failure behavior.
Flips and CDT move semantics
Verify every facet and edge flip against the CGAL 6.2 TDS preconditions and handle-invalidation rules.
Separate CGAL combinatorial flippability from CDT topological, foliation, simplex-type, and causal admissibility.
Use checked flip() where applicability is not proven.
Audit or retire peripheral periodic, d-dimensional, visualization, generator, timer, and I/O surfaces.
Publish benchmarks, supported CGAL patterns, upgrade guidance, and final verification evidence.
Each PR must preserve a coherent buildable intermediate state and include behavior-level tests for any changed CGAL interaction.
Acceptance criteria
Every production CGAL use is reviewed against CGAL 6.2 documentation and classified as retained, modernized, replaced, or removed with a reason.
No CDT++ production path depends on a deprecated or undocumented CGAL API or unspecified invalid-handle behavior.
Kernel choice is justified by documented predicate/construction requirements and adversarial numerical tests.
The GMP/MPFR versus Boost.Multiprecision decision is documented with CGAL support evidence, reproducible compile-time/runtime/memory measurements, and adversarial correctness results; removal requires demonstrated equivalence.
Vertex/cell bases and TDS composition satisfy current CGAL concepts and preserve CDT metadata correctly across copy, move, swap, insertion, removal, and flips.
Traversal uses the clearest current CGAL handle/range/circulator API without unnecessary materialization.
Bulk insertion, point/info association, spatial sorting, removal, and repair behavior are deterministic where the reference contract requires it.
CGAL combinatorial validity and CDT causal admissibility are separate, explicit checks.
Flip preconditions and cell-handle invalidation are encoded or documented at the mutation boundary.
Supported CI, sanitizer, and deterministic reference suites pass.
Before/after benchmarks show no unexplained performance or memory regression; beneficial changes include reproducible measurements.
Documentation explains the selected kernel, TDS composition, metadata storage, concurrency model, mutation/lifetime rules, and CGAL upgrade process.
Scientific results remain unchanged unless a pre-existing defect is identified, independently reproduced, corrected, and covered by a deterministic regression.
Current v1.0.0 plan (2026-07-22)
Starts after: #74 and #101. Blocks: #88.
Audit and modernize production CGAL 6.2 surfaces only where needed for correctness, lifetime safety, deterministic reference behavior, and the supported build contract. The priorities are traits/TDS validity, handle invalidation, insertion/removal, cache consistency, flip preconditions, the applicable-move boundary, and the sequential/parallel configuration.
Do not change kernels, exact-arithmetic backends, or peripheral experiments without a reproduced defect and comparative evidence. #88 owns multithreaded behavior and scaling; #98 owns viewer restoration.
Summary
Perform a comprehensive audit and modernization of CDT++'s CGAL integration against CGAL 6.2 APIs, concepts, documented preconditions, and recommended usage patterns. Make the integration exemplary modern scientific C++ while preserving CDT semantics, deterministic reference behavior, numerical robustness, and performance.
CDT++ already resolves CGAL 6.2 from its pinned vcpkg baseline. This issue is therefore primarily about using CGAL correctly and intentionally, not merely increasing a version number.
Primary references:
Motivation
CGAL is the foundation of CDT++ topology and geometry. The repository currently wraps and exposes a substantial part of
Delaunay_triangulation_3, stores CGAL handles in cached containers, composes custom vertex and cell bases withinfo(), conditionally selectsParallel_tag, performs range insertion and vertex removal, calls low-level TDS flips, uses iterator/circulator idioms, and contains separate periodic and d-dimensional experiments.The recent causal 2-to-3 move defect illustrates the boundary that must be explicit: CGAL can prove combinatorial flippability, but it does not know the CDT causal admissibility contract. A reference implementation should clearly separate CGAL's guarantees from CDT's stronger scientific invariants and document the lifetime effects of every topology mutation.
Current integration surfaces
Audit at least:
include/Triangulation_traits.hppinclude/Foliated_triangulation.hppinclude/Ergodic_moves_3.hppinclude/Periodic_3_complex.hppinclude/Periodic_3_triangulations.hppinclude/Torus_d.hppScope
Version, support, and deprecations
Kernel and numerical policy
Exact_predicates_inexact_constructions_kernelchoice against those requirements.Exact arithmetic backend
Traits and triangulation data structure
Triangulation_vertex_base_with_info_3,Triangulation_cell_base_with_info_3, the Delaunay cell-base requirements, and custom TDS composition against current concepts.info()values or use richer invariant-preserving types from Adopt parse-don't-validate architecture for domain invariants #101.Delaunay::Vertex_handle,Cell_handle,Facet, andEdgetypes over parallelstd::pairorCGAL::Triplealiases where that removes ambiguity.Traversal, lookup, and ranges
finite_vertex_handles(),finite_cell_handles(),finite_edges(), andfinite_facets()where they improve type correctness and clarity.Insertion, removal, and construction
Flips and CDT move semantics
flip()where applicability is not proven.flip_flippable()only when an invariant-preserving applicable-move type from Adopt parse-don't-validate architecture for domain invariants #101 proves the full CGAL precondition and tests demonstrate equivalence.Concurrency and lock ownership
CGAL_LINKED_WITH_TBB.Lock_data_structureconstruction, ownership, lifetime, and association with triangulations returned or moved from helper functions.Integration boundary and ownership
Peripheral CGAL packages
Performance and observability
Suggested PR sequence
Each PR must preserve a coherent buildable intermediate state and include behavior-level tests for any changed CGAL interaction.
Acceptance criteria
Related work