Files
ConformalLabpp/code/tests/cgal
Tarik Moussa 140f50f707
Some checks failed
C++ Tests / test-fast (push) Successful in 2m33s
C++ Tests / test-fast (pull_request) Successful in 2m0s
C++ Tests / test-cgal (push) Has been skipped
C++ Tests / test-cgal (pull_request) Failing after 2m30s
fixup: deduce kernel from mesh point type instead of hard-coding it
Removes the only architectural lock-in spotted in the MVP audit before
Phase 9a starts: the wrapper hard-coded Simple_cartesian<double> as the
kernel inside discrete_conformal_map_euclidean.  This would have broken
any Surface_mesh<P> where P came from a different kernel (e.g. EPIC).

Change
──────
* CGAL::Kernel_traits<typename TriangleMesh::Point>::Kernel is now used
  to deduce the kernel from the mesh's point type.
* The full Default_traits<...> instantiation is wrapped in
  internal_np::Lookup_named_param_def so a future `geom_traits(...)`
  named parameter can override the entire traits class without changes
  to the wrapper body (CGAL idiom, used by every CGAL package).
* New test `KernelIsDeducedFromMeshPointType` pins the contract
  explicitly with static_asserts.

Why now
───────
Phase 9a (Inversive-Distance) will copy this same template pattern.
Fixing the kernel deduction once here keeps the design free for any
user kernel; doing it after 9a would mean two parallel hard-coded
kernel sites to refactor.

Tests
─────
CGAL suite: 184/184 passed, 0 skipped  (was 183).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 22:50:40 +02:00
..