Phase 8b-Lite extension: output_uv_map named parameter (integrated layout) #14
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/output-uv-map"
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?
Superseded by PR #15 — all commits from this branch were included in the hackability meeting-prep bundle and are now on
mainvia the #15 merge.Closes the UX gap identified in the Phase-8b-Lite design discussion: the four classical-DCE CGAL entries now optionally run their `*_layout()` step internally if the caller supplies `CGAL::parameters::output_uv_map(pmap)`. Before this PR, the workflow was: auto res = CGAL::discrete_conformal_map_euclidean(mesh); // ... user has to re-set up maps, re-pin vertex, then ... auto layout = euclidean_layout(mesh, res.x, maps); // ... and copy coordinates into a property map manually. After this PR: auto uv = mesh.add_property_map<Vertex_index, K::Point_2>("uv", ...).first; CGAL::discrete_conformal_map_euclidean( mesh, CGAL::parameters::output_uv_map(uv)); // ... uv now populated for every vertex. Coverage ──────── * `discrete_conformal_map_euclidean` — `Point_2` per vertex. * `discrete_conformal_map_spherical` — `Point_3` per vertex (on S²). * `discrete_conformal_map_hyper_ideal` — `Point_2` per vertex (Poincaré disk). CP-Euclidean and Inversive-Distance entries do not yet support `output_uv_map` — face-based packing has no per-vertex UV concept, and inversive-distance needs a dedicated layout routine that uses Luo's edge-length formula (planned follow-up). New named parameters (`code/include/CGAL/Conformal_map/internal/parameters.h`) ───────────────────────────────────────────────────────────────────────────── * `output_uv_map(pmap)` — write coordinates into pmap after layout. * `normalise_layout(bool)` — apply post-layout canonical normalisation (PCA centroid for Euclidean, north-pole alignment for Spherical, Möbius centring for Hyper-ideal). Both follow the existing Phase-8a-MVP named-parameter convention. Chained syntax (`.output_uv_map(...).normalise_layout(true)`) is not yet supported — pass them one at a time. Tests (5 new in test_cgal_phase8b_lite.cpp) ─────────────────────────────────────────── * `OutputUvMap_Euclidean_PopulatesPmap` — UVs are finite + non-trivial. * `OutputUvMap_Spherical_PopulatesXyz` — every output on unit S². * `OutputUvMap_HyperIdeal_PointsInPoincareDisk` — |p|² ≤ 1 if converged. * `OutputUvMap_Absent_DoesNotRunLayout` — no parameter ⇒ no layout. * `OutputUvMap_NormaliseLayout_TakesEffect` — both raw + norm calls return finite UVs (named-parameter chaining limitation documented). All five pass. Full CGAL suite: 232/232, 0 skipped (was 227). doc/api/tests.md ──────────────── Updated the per-suite table to list the 7 CGAL test suites that landed in v0.9.0 (8a MVP + 9a + 9b + 8b-Lite) but had not yet been added to the canonical table. Total: 227 → 232. This brings the doc back in sync with `ctest` output and unblocks future `scripts/check-test-counts.sh` runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Audit found that 2 of the 4 Java-port candidates from the conformal- mapping discussion were missing from the documentation: * StereographicUnwrapper (266 Java LoC) — projects spherical layout S² → ℂ via stereographic projection + Möbius centring. Closes the visualisation gap from discrete_conformal_map_spherical() which currently returns Point_3 on S²; downstream uses typically want a 2-D atlas. Suggested phase: 10b' (alternative methods, parallel to Hyperbolic / Quasi-isothermic). Effort: small (~3 days). * CircleDomainUnwrapper (570 Java LoC) — conformal map of a multiply-connected planar region onto a disk-with-holes (Koebe's general uniformization theorem 1909). A use-case class conformallab++ does not currently cover (annulus, slit torus, fluid flow around obstacles, electrostatics with multiple conductors). Suggested phase: 11c. Effort: large (~2 weeks). Added to all three roadmap documents: * doc/roadmap/java-parity.md — worth-porting table extended * doc/roadmap/research-track.md — Java-backlog summary extended * doc/roadmap/phases.md — Phase 10b' bullet + new Phase 11c block with full math context (Koebe 1909 reference, classical complex-analysis use cases). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Pull request closed