Tarik Moussa d9c1dec3de
Some checks failed
C++ Tests / test-fast (pull_request) Successful in 2m24s
API Docs / doc-build (pull_request) Successful in 1m5s
Markdown link check / check (pull_request) Successful in 50s
C++ Tests / test-cgal (pull_request) Failing after 12m53s
C++ Tests / quality-gates (pull_request) Successful in 2m33s
feat: output_uv_map for InversiveDistance, error for CP-Euclidean, reviewer trio
Three reviewer-meeting deliverables in one commit.

(1) output_uv_map for the two remaining DCE entries
    ─────────────────────────────────────────────────
    * Discrete_inversive_distance.h: full implementation.  After Newton,
      reconstruct effective Euclidean edge lengths from the converged
      log-radii via the Bowers-Stephenson identity
      `ℓᵢⱼ² = rᵢ² + rⱼ² + 2·Iᵢⱼ·rᵢ·rⱼ`, populate a temporary
      EuclideanMaps with `lambda0 = log(ℓᵢⱼ²)`, and reuse the existing
      `euclidean_layout(mesh, 0, eucl)` priority-BFS.  Per-vertex
      Point_2 coordinates written into the user-supplied pmap.
      Optional `normalise_layout(true)` applies the canonical PCA
      centroid + major-axis rotation, same as the other 3 entries.

    * Discrete_circle_packing.h: throws std::runtime_error with a
      clear pointer to Phase 9c rather than silently producing
      nonsense.  CP-Euclidean is face-based; the faithful output is a
      per-face circle packing in ℝ², not a per-vertex Point_2 map.
      A true layout requires BPS-2010 §6 (~150 lines, on the porting
      roadmap as Phase 9c).  Failing loudly is the honest default.

    Tests: 2 new cases in test_cgal_phase8b_lite.cpp
    (OutputUvMap_InversiveDistance_PopulatesPmap;
    OutputUvMap_CPEuclidean_ThrowsClearly).  Both green.
    Suite total now 259 (was 257, +2).  CGAL subtotal: 234 → 236.

(2) Reviewer meeting documents
    ──────────────────────────
    New directory doc/reviewer/ with three files:

    * briefing.md  — one-page orientation for the reviewer.
      What the project is, where to look first
      (https://tmoussa.codeberg.page/ConformalLabpp/), the headline
      evidence (tests/coverage/sanitizers/license), what we want from
      them, what's deferred and why, and the 5 questions in a separate
      file.

    * questions.md — the 5 concrete decisions we want their second
      opinion on:
        Q1 Phase 9c (port-literal vs re-derive)
        Q2 Phase 9b-analytic (worth ~2 weeks for ~6× speedup?)
        Q3 CP-Euclidean output_uv_map (build now or defer?)
        Q4 CGAL submission strategy (one package or five?)
        Q5 geometry-central cross-validation co-authorship
      Plus an explicit "what would you say no to?" question at the
      bottom — negative feedback is the highest-value information.

    * agenda.md   — my own internal playbook (NOT to be sent).
      60-min flow: 5-min thank-you, 10-min architecture tour,
      30-min for Q1-Q5 in the order Q4-Q1-Q2-Q5-Q3, 5-min "no"
      question, 5-min wrap-up.  Includes post-meeting memo template
      to fill out in the 30 min after.

    * README.md    — index for the directory; says which file goes
      to whom and when to send.

(3) locked-vs-flexible.md known-limitations update
    ─────────────────────────────────────────────
    "output_uv_map covers 3 of 5 entries" → "covers 4 of 5".
    CP-Euclidean's throws-clearly behaviour documented as a Phase 9c
    deliverable rather than a passive gap.

Bonus: extended .codespellrc ignore list (acknowledgement, the
British-English spelling I used in agenda.md).

Verifications on this commit:
  259/259 tests pass (0 skipped)
  scripts/check-test-counts.sh:                OK (23 + 236 = 259)
  scripts/quality/license-headers.sh:          OK (66/66 SPDX)
  python3 scripts/quality/cgal-conventions.py: OK (0/6 violations)
  scripts/quality/codespell.sh:                OK (0 typos)
  scripts/quality/shellcheck.sh:               OK (0 findings)
  python3 scripts/check-markdown-links.py:     OK (143/143)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 21:15:19 +02:00

conformallab++

CI License: MIT DOI API docs

C++17 reimplementation of ConformalLab — Stefan Sechelmann's Java research library for discrete conformal geometry (TU Berlin). The long-term goal is a CGAL package for discrete conformal maps.

Algorithmic foundation:

Stefan Sechelmann — Variational Methods for Discrete Surface Parameterization: Applications and Implementation, TU Berlin 2016. DOI: 10.14279/depositonce-5415 · CC BY-SA 4.0 · Java original · sechel.de

Status: v0.9.0 — Phases 19a complete, Phase 8b-Lite CGAL API surface. Newton solvers for five DCE models (Euclidean / Spherical / HyperIdeal / CP-Euclidean / Inversive-Distance), priority-BFS layout in ℝ²/S²/Poincaré disk, GaussBonnet, tree-cotree cut graph, Möbius holonomy, period matrix (genus 1), fundamental domain, halfedge_uv texture atlas, JSON/XML serialisation, CLI app. Full test suite passing, 0 skipped — see doc/api/tests.md for the per-suite breakdown.


Quick start

git clone https://codeberg.org/TMoussa/ConformalLabpp && cd ConformalLabpp

# Fast tests — no system dependencies
cmake -S code -B build && cmake --build build --target conformallab_tests -j$(nproc)
ctest --test-dir build --output-on-failure

# CGAL tests headless (apt install libboost-dev / brew install boost)
cmake -S code -B build -DWITH_CGAL_TESTS=ON
cmake --build build --target conformallab_cgal_tests -j$(nproc)
ctest --test-dir build -R "^cgal\." --output-on-failure

# Full build with CLI + viewer (requires Wayland/X11 dev headers)
cmake -S code -B build -DWITH_CGAL=ON && cmake --build build -j$(nproc)
./bin/conformallab_core -i input.off -g euclidean -o layout.off -j result.json

# API documentation (requires doxygen: brew/apt install doxygen)
cmake --build build --target doc
open doc/doxygen/html/index.html

Minimal usage

#include "conformal_mesh.hpp"
#include "mesh_io.hpp"
#include "euclidean_functional.hpp"
#include "gauss_bonnet.hpp"
#include "newton_solver.hpp"
#include "layout.hpp"

using namespace conformallab;

ConformalMesh mesh = load_mesh("input.off");
EuclideanMaps maps = setup_euclidean_maps(mesh);
compute_euclidean_lambda0_from_mesh(mesh, maps);

// Assign DOFs — pin first vertex (gauge fix)
auto vit = mesh.vertices().begin();
maps.v_idx[*vit++] = -1;
int idx = 0;
for (; vit != mesh.vertices().end(); ++vit) maps.v_idx[*vit] = idx++;

// Natural equilibrium target: x* = 0 by construction
std::vector<double> x0(idx, 0.0);
auto G0 = euclidean_gradient(mesh, x0, maps);
for (auto v : mesh.vertices())
    if (maps.v_idx[v] >= 0) maps.theta_v[v] -= G0[maps.v_idx[v]];

check_gauss_bonnet(mesh, maps);
NewtonResult res = newton_euclidean(mesh, x0, maps);
Layout2D layout = euclidean_layout(mesh, res.x, maps);

Documentation

API reference (Doxygen HTML) — every public class, function and named-parameter helper https://tmoussa.codeberg.page/ConformalLabpp/
Getting started — build modes, single-test invocation, CLI, Docker doc/getting-started.md
Pipeline API — all three geometries, holonomy, serialisation doc/api/pipeline.md
Public headers — all public headers with descriptions doc/api/headers.md
Test suites — per-suite breakdown and counts (single source of truth) doc/api/tests.md
Extending — new functionals, geometry modes, porting from Java doc/api/extending.md
Processing unit contracts — preconditions / provides table doc/api/contracts.md
CGAL package design — Phase 8 target, YAML pipeline doc/api/cgal-package.md
Architecture & pipeline diagram doc/architecture/overall_pipeline.md
geometry-central comparison — shared core, demarcation, adoption candidates, scientific added value doc/architecture/geometry-central-comparison.md
Design decisions — key architectural choices + rationale doc/architecture/design-decisions.md
Project structure — directory tree + build targets doc/architecture/project-structure.md
Discrete conformal theory — mathematical background for collaborators doc/math/discrete-conformal-theory.md
Validation — known analytic results + how to verify them doc/math/validation.md
Validation protocol — concrete commands with expected outputs doc/math/validation-protocol.md
Tutorial: add a new functional — step-by-step Inversive-Distance port doc/tutorials/add-inversive-distance.md
Declarative YAML pipeline — concept, token vocabulary, 5 examples doc/concepts/declarative-pipeline.md
Geometry modes — Euclidean / Spherical / HyperIdeal comparison doc/math/geometry-modes.md
References — all papers by module doc/math/references.md
Software landscape — how conformallab++ relates to libigl, CGAL, geometry-central doc/math/software-landscape.md
Novelty statement — unique features, target audience, what this is not doc/math/novelty-statement.md
Complexity & scalability — O() analysis, measured timings on real meshes, HyperIdeal bottleneck doc/math/complexity.md
Roadmap — Phases 110 doc/roadmap/phases.md
Java parity table — what is ported, what is planned doc/roadmap/java-parity.md
Contributing — language policy, test standards, release flow doc/contributing.md
Claude Code context CLAUDE.md

Citing

If you use conformallab++ in your research, please cite it using the metadata in CITATION.cff. GitHub and Codeberg show a "Cite this repository" button that generates BibTeX and APA automatically.

The primary algorithmic source is:

Stefan Sechelmann — Variational Methods for Discrete Surface Parameterization: Applications and Implementation, TU Berlin 2016. DOI: 10.14279/depositonce-5415


Bugs & questions


License

conformallab++ is released under the MIT License (see LICENSE).
Copyright © 20242026 Tarik Moussa.
The dissertation (Sechelmann 2016) is CC BY-SA 4.0.

Description
ConformalLab C++ port
Readme MIT Cite this repository 235 MiB
Languages
C++ 94.8%
Shell 2.7%
CMake 1.4%
Python 0.9%
C 0.2%