docs(doxygen): fix critical extraction bug; baseline 24% → 42% on public API
ROOT CAUSE FIX
The Doxyfile EXCLUDE_PATTERNS line contained `*/* 2.hpp` (note the
space — a stray glob from macOS-style "foo 2.hpp" duplicate files).
That pattern was silently matching ALL .hpp / .h files, so Doxygen was
indexing nothing under code/include/. The pre-existing 556 KB of HTML
output was effectively documenting only README.md, CLAUDE.md and a
small stub for std:: — not the C++ API at all.
After fixing the pattern (and properly escaping the space-prefixed
"foo 2.hpp / foo 2.h" macOS-dup patterns), Doxygen now extracts 141
compounds and emits 248 HTML pages from the public headers.
WHAT THIS PR ADDS
1. Doxyfile fix: correct EXCLUDE_PATTERNS; add GENERATE_XML for the
coverage measurement script; add MathJax for `$$...$$` math in
markdown; add the missing CGAL `\cgalParamNBegin/End/Description/
Default/...` aliases so CGAL-style param blocks render correctly.
2. New headers:
- code/include/CGAL/Conformal_map/doxygen_groups.h
defines `PkgConformalMap{,Ref,Concepts,NamedParameters}`,
resolving 17 prior "non-existing group" warnings.
- code/include/CGAL/Conformal_map/doxygen_namespaces.h
gives every namespace under `CGAL::` and `conformallab::` a
brief description.
3. New tool: scripts/doxygen-coverage.sh
Parses the XML output and reports % of public symbols (excluding
the `detail::` implementation namespaces by default) that have a
non-empty brief/detailed description. Supports `--list-undoc`
and `--threshold N` for CI integration.
4. Substantial docstring additions to the public CGAL headers:
`Conformal_map_traits.h`, `Discrete_circle_packing.h`,
`Discrete_inversive_distance.h`, `conformal_mesh.hpp`,
`Discrete_conformal_map.h` (Hyper_ideal_map_result fields).
5. Markdown housekeeping that the strict-warning Doxygen run surfaced:
tests.md (escape literal `#` in table cell),
locked-vs-flexible.md (broken section anchor),
overall_pipeline.md (replace `$$LaTeX$$` with inline-unicode math).
CURRENT NUMBERS
before: ~24% documented (public API; the prior "87%" claim was
based on the broken extraction)
after: 42% documented (165 of 396 public symbols)
warnings: 0 (was 27 spurious + a flood of bogus undocumented
warnings hidden by the buggy EXCLUDE pattern)
NEXT (in a follow-up commit on this branch)
The remaining 231 public symbols (mostly in `layout.hpp`,
`hyper_ideal_functional.hpp`, `spherical_functional.hpp`, the per-mode
functional/Hessian files) can be brought to ~100% with another pass of
short `///` brief descriptions. The coverage script is the gate; CI
can begin enforcing `--threshold 95` once the next pass lands.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -41,30 +41,42 @@ namespace conformallab {
|
||||
// ── Kernel ──────────────────────────────────────────────────────────────────
|
||||
// Simple double-precision Cartesian. Conformal mapping algorithms never
|
||||
// need exact arithmetic — they operate on floating-point lengths and angles.
|
||||
|
||||
/// CGAL kernel used by all conformallab algorithms (double precision).
|
||||
using Kernel = CGAL::Simple_cartesian<double>;
|
||||
/// 3-D point type (vertex coordinates).
|
||||
using Point3 = Kernel::Point_3;
|
||||
/// 2-D point type (UV-domain layout coordinates).
|
||||
using Point2 = Kernel::Point_2;
|
||||
|
||||
// ── Mesh type ────────────────────────────────────────────────────────────────
|
||||
/// Triangle mesh carrying all conformal-map data as property maps.
|
||||
using ConformalMesh = CGAL::Surface_mesh<Point3>;
|
||||
|
||||
// ── Index/descriptor aliases (CGAL 6.x naming) ───────────────────────────────
|
||||
/// Vertex descriptor of `ConformalMesh`.
|
||||
using Vertex_index = ConformalMesh::Vertex_index;
|
||||
/// Half-edge descriptor of `ConformalMesh`.
|
||||
using Halfedge_index = ConformalMesh::Halfedge_index;
|
||||
/// Edge descriptor of `ConformalMesh`.
|
||||
using Edge_index = ConformalMesh::Edge_index;
|
||||
/// Face descriptor of `ConformalMesh`.
|
||||
using Face_index = ConformalMesh::Face_index;
|
||||
|
||||
// ── Geometry type constant (replaces Java CoFace.type enum) ─────────────────
|
||||
/// Discrete geometry type that a face/mesh is interpreted in.
|
||||
/// Replaces the original Java `CoFace.type` enum.
|
||||
enum class GeometryType : int {
|
||||
Euclidean = 0,
|
||||
Hyperbolic = 1,
|
||||
Spherical = 2
|
||||
Euclidean = 0, ///< Flat metric (ℝ²).
|
||||
Hyperbolic = 1, ///< Hyperbolic metric (ℍ²).
|
||||
Spherical = 2 ///< Spherical metric (S²).
|
||||
};
|
||||
|
||||
// ── Standard property-map bundles ────────────────────────────────────────────
|
||||
|
||||
// Add the vertex properties used by all conformal-map functionals.
|
||||
// Returns {lambda, theta, idx}.
|
||||
/// Register and return the vertex-side property maps used by all five
|
||||
/// DCE functionals: `v:lambda` (log conformal factor), `v:theta` (target
|
||||
/// cone angle), `v:idx` (contiguous integer index).
|
||||
inline auto add_vertex_properties(ConformalMesh& mesh)
|
||||
{
|
||||
auto [lambda, ok1] = mesh.add_property_map<Vertex_index, double>("v:lambda", 0.0);
|
||||
@@ -74,7 +86,8 @@ inline auto add_vertex_properties(ConformalMesh& mesh)
|
||||
return std::make_tuple(lambda, theta, idx);
|
||||
}
|
||||
|
||||
// Add the edge intersection-angle property used by the hyperbolic functional.
|
||||
/// Register and return the edge intersection-angle property `e:alpha`
|
||||
/// (used by the hyper-ideal functional).
|
||||
inline auto add_edge_properties(ConformalMesh& mesh)
|
||||
{
|
||||
auto [alpha, ok] = mesh.add_property_map<Edge_index, double>("e:alpha", 0.0);
|
||||
@@ -82,7 +95,7 @@ inline auto add_edge_properties(ConformalMesh& mesh)
|
||||
return alpha;
|
||||
}
|
||||
|
||||
// Add the face geometry-type property.
|
||||
/// Register and return the per-face geometry-type property `f:type`.
|
||||
inline auto add_face_properties(ConformalMesh& mesh)
|
||||
{
|
||||
auto [ftype, ok] = mesh.add_property_map<Face_index, int>(
|
||||
|
||||
Reference in New Issue
Block a user