Appearance
Advanced features
Beyond the core STL I/O, repair, and signed-distance API documented in the API companion guide, FOSSIL ships twelve algorithmic primitives drawn from the libigl / CGAL geometry- processing toolkit. They turn FOSSIL from "an STL parser with an AABB tree" into a CFD preprocessing toolchain on its own. Every item is a single TBP on surface_stl_object.
The pages here explain what each algorithm is, when to use it, when not to, and how to call it from Fortran. For the raw API signature, see the autogenerated reference or the surface_stl_object companion page; the advanced-feature pages cross-link to both.
The shipped primitives
| Feature | TBP | Reference |
|---|---|---|
| Boolean operations | surface%boolean(other, op, status) | Zhou et al. Mesh Arrangements (SIGGRAPH 2016) |
| Self-intersection detection / resolution | surface%find_self_intersections(...) / surface%resolve_self_intersections(...) | Möller tri-tri |
| Mesh decimation (QEM) | surface%decimate(target_facets, status) | Garland & Heckbert (SIGGRAPH 1997) |
| Generalized / fast winding number | surface%winding_number(point, beta) | Jacobson 2013 + Barill 2018 |
| Marching cubes / isosurface extraction | extract_isosurface(values, bmin, bmax, iso, ...) | Lorensen-Cline (SIGGRAPH 1987) |
| Alpha wrapping | surface%alpha_wrap(alpha, offset, ...) | Portaneri et al. (SIGGRAPH 2022) |
| Isotropic remeshing | surface%isotropic_remesh(target_length, ...) | Botsch & Kobbelt (SGP 2004) |
| SDF segmentation | surface%segment_sdf(...) | Shapira, Shamir & Cohen-Or (Vis. Comp. 2008) |
| Ray-mesh intersection queries | surface%intersect_ray_first/_all/_any(...) | Möller-Trumbore |
| Cotangent Laplacian + barycentric mass | surface%cotangent_laplacian(L, M, status) | Pinkall & Polthier 1993; Meyer et al. 2003 |
| Per-vertex Gaussian + mean curvature | surface%gaussian_curvature(K, status) / surface%mean_curvature(H, status) | Meyer et al. 2003 |
| Mesh smoothing (explicit + Taubin) | surface%smooth(method, lambda, mu, iterations, status) | Taubin (SIGGRAPH 1995) |
RANSAC shape detection was deliberately not shipped — see the roadmap issue for the detailed rationale, summarised: detected primitives still need manual BC assignment, real CAD STL fragments badly under primitive-family fitting, and SDF segmentation does the user-facing facet-grouping job better.
How the pages are structured
Each advanced-feature page follows the same template:
What it does — one paragraph in plain English, in CFD-relevant terms.
Pipeline — the algorithm in 3-7 stages, with diagrams where it helps.
API — the call site, signature explained, defaults justified.
Example — a complete, runnable Fortran program. Compiled by CI (same pipeline as
docs/guide/api/).Known limitations — the things you'd hit in production. Always includes the documented gaps from the implementation issue (alpha- wrap single-pass MVP, isotropic-remesh inward Laplacian bias, boolean axis-aligned coplanar overlap, etc.).
References — the source paper and any directly relevant follow-ups.
Roadmap and follow-up reading
All nine shipped advanced features have a dedicated page. For the multi-commit history, design decisions, and the deferred follow-up refinements (alpha-wrap adaptive refinement, SDF graph-cut), see the implementation roadmap issue.