Root cause: -DWITH_CGAL=ON implied -DWITH_VIEWER=ON, which pulled in
GLFW, which requires wayland-scanner — not present in the headless CI
container (ubuntu:22.04 ARM64).
Fix: new CMake option -DWITH_CGAL_TESTS=ON builds conformallab_cgal_tests
without touching the viewer, GLFW, libigl, or any display dependency.
Only Boost headers are required (already in the Docker image).
Changes
───────
code/CMakeLists.txt
- Add WITH_CGAL_TESTS option (OFF by default)
- find_package(Boost REQUIRED) now shared between WITH_CGAL and WITH_CGAL_TESTS
- WITH_CGAL still implies WITH_VIEWER (for local full builds)
- Remove duplicate find_package(Boost) inside the WITH_CGAL block
code/tests/CMakeLists.txt
- cgal/ subdirectory added for WITH_CGAL OR WITH_CGAL_TESTS
.gitea/workflows/cpp-tests.yml
- test-cgal job: -DWITH_CGAL=ON → -DWITH_CGAL_TESTS=ON
README.md
- Build modes table: three rows (default / CGAL_TESTS / CGAL full)
- Quick-start: separate headless and full-local sections
- Prerequisite table updated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the Java CoHDS with CGAL::Surface_mesh<Point3> (Simple_cartesian
kernel). Adds domain-specific property maps for lambda/theta/idx/alpha and
face geometry type — the direct C++ equivalent of CoVertex/CoEdge adapters.
New files:
include/conformal_mesh.hpp — ConformalMesh type + property-map helpers
include/mesh_builder.hpp — mesh factories (triangle, tetrahedron,
quad-strip, fan) for tests and examples
tests/cgal/ — second test executable (conformallab_cgal_tests)
built only with -DWITH_CGAL=ON
Test results (local, -DWITH_CGAL=ON):
conformallab_tests: 36 registered | 23 passed | 13 skipped | 0 failed
conformallab_cgal_tests: 14 registered | 14 passed | 0 skipped | 0 failed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements getEuclideanCircleFromHyperbolic() in C++ (hyperboloid model
→ Poincaré disk via Lorentz boost + circumcircle). Ports the 2 Java tests
that were the only remaining candidates not requiring HDS or a solver.
All other unported tests (DataTypesTest, SchottkyIOTest,
UniformizationDataTest, BranchedCoverTorusTest) are blocked by XML
serialization or HDS – stubs remain for Phase 4.
Test totals: 36 registered | 23 passed | 13 skipped | 0 failed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fully ported (pure math, no HDS required):
test_discrete_elliptic_utility.cpp – 2 tests
normalizeModulus: move tau into SL(2,Z) fundamental domain
test_p2_utility.cpp – 3 tests
P2 projective geometry (perpendicularBisector, pointFromLines,
makeDirectIsometryFromFrames double vs long double precision)
New headers:
include/discrete_elliptic_utility.hpp – normalizeModulus
include/p2_utility.hpp – P2 Euclidean geometry (templated
on scalar type so double and long double share one implementation)
Stubs (GTEST_SKIP, blocked until HDS port – Phase 4):
test_hyper_ideal_functional.cpp – 5 tests (1 @Ignore in Java)
test_hyper_ideal_hyperelliptic_utility.cpp – 3 tests
test_spherical_functional.cpp – 5 tests
All use CoHDS + HalfEdgeUtils which are not yet ported to C++.
Result: 34 tests total | 21 passed | 13 skipped | 0 failed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Exception updated to match renamed CMakeLists.txt (capital M)
- Add "* 2.*" / "* 3.*" patterns to suppress iCloud Drive duplicate
files (e.g. "clausen 2.hpp") from appearing in git status
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
macOS filesystem is case-insensitive so both spellings worked locally,
but the Linux container (CI) could not find the file and failed with
"does not contain a CMakeLists.txt file".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CGAL 6.x still unconditionally includes boost/config.hpp in its
config.h, so Boost headers are required even with CGAL_DISABLE_GMP/MPFR.
Use system Boost via find_package instead of the removed 211 MB tarball.
Tests-only mode remains completely dependency-free.
Install: brew install boost (macOS)
apt install libboost-dev (Debian/Ubuntu)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Restructures the CMake build into three clearly separated modes:
(default) tests only – Eigen + GTest, no heavy deps
-DWITH_VIEWER=ON builds viewer lib (libigl / GLFW / GLAD)
-DWITH_CGAL=ON builds conformallab_core CLI app;
implies WITH_VIEWER automatically
Changes:
- code/CMakeLists.txt: viewer and core targets are now guarded by
option() flags; GTest / tests target is always built
- code/deps/Cmakelists.txt: CGAL, libigl, glfw, glad are only
extracted when the corresponding mode is enabled; Eigen always
- Remove Boost (211 MB tarball, 0 usages in the codebase – CGAL 6.x
does not require Boost for Simple_cartesian / Surface_mesh / basic IO)
- Remove code/src/main.cpp (dead file, not referenced in CMake)
All 16 C++ tests pass in tests-only mode (verified locally).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- include/matrix_utility.hpp: 4x4 mapping matrix R·from=to (Eigen)
- include/projective_math.hpp: dehomogenize, hyperbolicDistance,
isOnSegment (collinearity + betweenness via 3D cross/dot),
getPointOnCorrespondingSegment (parameter by arc-length ratio)
- test_matrix_utility.cpp: port of MatrixUtilityTest (1 test)
- test_surface_curve_utility.cpp: port of SurfaceCurveUtilityTest
testIsBetween and testGetPointOnSegment_SegmentEdge (2 tests)
- tolerance adjusted to 1e-12 for matrix inversion (2.7e-15 rounding
from Eigen vs jReality's LU; both well within meaningful accuracy)
Total: 16/16 tests pass
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Google Test via CMake FetchContent (v1.14.0)
- Add clausen.hpp: Clausen integral, Lobachevsky function, Im(Li2)
- Add hyper_ideal_utility.hpp: generalized and ideal-vertex hyperbolic
tetrahedron volume formulas using Eigen for the 4x4 Gram determinant
- Port ClausenTest (5 tests) and HyperIdealUtilityTest (8 tests) from
Java/JUnit — all 13 pass with same tolerances as the Java originals
- Fix pre-existing VIEWER/viewer case mismatch in CMakeLists.txt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>