Phase 8a MVP: CGAL traits + Discrete_conformal_map.h Euclidean entry #6
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/phase-8a-mvp-traits"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
First concrete step of the Phase 8 Hybrid MVP strategy. Adds a thin CGAL-conformant public API layer on top of the existing implementation — validated by 7 acceptance tests.
CGAL test count: 176 → 183, 0 skipped.
What it provides
Public headers (new)
CGAL/Conformal_map_traits.hConformalMapTraitsconcept doc +Default_conformal_map_traits<Surface_mesh<P>, K>CGAL/Discrete_conformal_map.hdiscrete_conformal_map_euclidean(mesh, np)+Conformal_map_result<FT>CGAL/Conformal_map/internal/parameters.hUsage
Architecture
3-layer wrapper as designed in
doc/api/cgal-package.md:No algorithm duplication. The wrapper delegates internally to the existing
setup_euclidean_maps,enforce_gauss_bonnet,newton_euclidean— same code path as before, just a CGAL-style public façade.Tests (7 new)
DefaultTraitsTypesstatic_asserton all advertised types)AccessorsReuseExistingMapssetup_euclidean_maps()SingleTriangleConverges,QuadStripConvergesMaxIterationsTakesEffectparameters::max_iterations(...)is readGradientToleranceTakesEffectparameters::gradient_tolerance(...)changes Newton end stateWrapperMatchesLegacyAPI1e-10All 7 pass. Full CGAL suite 183/183 passed, 0 skipped.
Strategy reminder
This is MVP scope by design. Deferred to later phases:
FaceGraphspecialisation (trigger: Polyhedron_3 user)_spherical()+_hyperbolic()entry functions (after Phase 9a validates the pattern)Next step: Phase 9a (Inversive-Distance functional) as the second new client of the trait API — the real acceptance test for the design.
First step of the Phase 8 Hybrid MVP. Adds a thin CGAL-conformant public API layer over the existing implementation, validated by 7 acceptance tests. Total CGAL test count: 183 (was 176), 0 skipped. New public headers ────────────────── * code/include/CGAL/Conformal_map_traits.h - ConformalMapTraits concept documentation - Default_conformal_map_traits<Surface_mesh<P>, K> specialisation - Static property-map accessors: vertex_points, theta_map, vertex_index_map, lambda0_map * code/include/CGAL/Discrete_conformal_map.h - User-facing entry: discrete_conformal_map_euclidean(mesh, np) - Conformal_map_result<FT> struct (u, iter, ‖G‖, converged flags) - Natural-theta default: x = 0 is the equilibrium when no Θ supplied - Honours user-provided Θ via vertex_curvature_map named parameter * code/include/CGAL/Conformal_map/internal/parameters.h - 4 named-parameter tags in CGAL::Conformal_map::internal_np: vertex_curvature_map, gradient_tolerance, max_iterations, fixed_vertex_map - User-facing helpers in CGAL::parameters::* Tests (test_cgal_traits_mvp.cpp, 7 cases) ───────────────────────────────────────── * DefaultTraitsTypes: compile-time type sanity (static_assert) * AccessorsReuseExistingMaps: traits accessors return identical pmaps * SingleTriangleConverges, QuadStripConverges: end-to-end Euclidean wrapper passes * MaxIterationsTakesEffect: named parameter is read * GradientToleranceTakesEffect: tolerance override changes Newton end-state * WrapperMatchesLegacyAPI: cross-API result equality at 1e-10 Architecture ──────────── 3-layer wrapper as designed (doc/api/cgal-package.md): Layer 1: code/include/*.hpp (existing algorithms, unchanged) Layer 2: CGAL/Conformal_map/internal/ (adapter, parameter tags) Layer 3: CGAL/Conformal_map_traits.h, CGAL/Discrete_conformal_map.h (user-facing) No algorithm duplication. Existing 176 + 36 tests untouched. Next: Phase 9a (Inversive-Distance) as the second client of this API — the real acceptance test for the trait design. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>