5.8 KiB
Draft High-level Architecture
High-level geometry pipeline
The following diagram outlines the planned high-level pipeline for ConformalLab++. It shows the rough division into preprocessing, processing, and postprocessing. In preprocessing, various input types are first converted into a universal representation (half-edge mesh) via adapter layers and any necessary preprocessing steps. From there, they are processed by the various core processors units and then either exported or visualized in postprocessing, with minor optimizations as necessary.
graph TD
A1["Explicit<br/>(OBJ, PLY, STL)"]
A2["Implicit<br/>(SDF, Formulas)"]
A3["Parametric<br/>(NURBS, Curves)"]
A4["Procedural<br/>(Noise, L-Sys)"]
ADAPTER1["Input Adapter <br/>(Convert to Universal Represenation)"]
PREPROCESSING["Preprocessor <br/>(refined triangulation etc.)"]
EXT["EXTERNAL LIBRARIES<br/>(Plugin System)<br/>- CGAL"]
UNIVERSAL["UNIVERSAL REPRESENTATION FORM<br/>(HalfEdge Mesh Interface)"]
EXPORT_ADAPTER["Export Adapter Layer"]
PROCESSING["PROCESSING CORE LAYER"]
OPT["Optimization<br/>- Decimation<br/>- Denoising<br/>- Remeshing"]
ALGO["Algorithmic<br/>- Boolean Ops<br/>- Smoothing<br/>- Hole Filling"]
OTHER["Other<br/>- Custom Algos<br/>- Transforms<br/>- Filters"]
POSTPROCESSING["POSTPROCESSING <br/>(refined triangulation etc.)"]
EXPORT["Export Formats<br/>- OBJ<br/>- PLY<br/>- STL<br/>- Custom"]
VIZ["Visualization<br/>- OpenGL<br/>- QT<br/>- Screenshot"]
subgraph PRE[PREPROCESSING]
A1 --> ADAPTER1
A2 --> ADAPTER1
A3 --> ADAPTER1
A4 --> ADAPTER1
PREPROCESSING <-->ADAPTER1
end
EXT <--> UNIVERSAL
UNIVERSAL --> PROCESSING
UNIVERSAL --> EXPORT_ADAPTER
ADAPTER1 <--> EXT
ADAPTER1 <--> UNIVERSAL
OPT --> UNIVERSAL
ALGO --> UNIVERSAL
OTHER --> UNIVERSAL
subgraph CORE[PROCESSING ]
PROCESSING --> OPT
PROCESSING --> ALGO
PROCESSING --> OTHER
end
subgraph POST[POSTPROCESSING]
EXPORT_ADAPTER <--> POSTPROCESSING
EXPORT_ADAPTER --> EXPORT
EXPORT_ADAPTER --> VIZ
end
style UNIVERSAL fill:#90EE90,stroke:#000,stroke-width:3px,color:#000
style PREPROCESSING fill:#87CEEB,stroke:#000,stroke-width:2px,color:#000
style POSTPROCESSING fill:#87CEEB,stroke:#000,stroke-width:2px,color:#000
style PROCESSING fill:#87CEEB,stroke:#000,stroke-width:2px,color:#000
style EXT fill:#DDA0DD,stroke:#000,stroke-width:2px,color:#000
style ADAPTER1 fill:#FFB347,stroke:#000,stroke-width:2px,color:#000
style EXPORT_ADAPTER fill:#FFB347,stroke:#000,stroke-width:2px,color:#000
All external inputs (file-based, implicit, parametric, procedural) are first converted by an spezfic input adapter into a single universal interface, which is the canonical internal representation used by the processing stages. The processing core units operates on this universal representation and can use external libraries via a plugin-like extension, while results are passed through an export adapter to file formats or visualization frontends.
Three-stage processing pipeline
The geometry processing pipeline in ConformalLab++ is structured into three main stages, all operating on the same universal mesh representation.
Preprocessing
Converts all external inputs (files, analytic models, procedural sources) into the canonical half-edge mesh form.
Performs optional cleaning and normalization (e.g. fixing degeneracies, rescaling, enforcing orientation).
Guarantees that downstream stages see a well-formed, consistent mesh (or fail early with clear errors).
Processing (core processing units)
Runs one or more core processing units in sequence on the canonical mesh.
Each unit takes a mesh of the same type as input and produces a mesh of the same type as output (possibly with enriched attributes).
Examples: remeshing, conformal parameterization, smoothing, boolean operations, experiment-specific transforms.
Postprocessing
Adapts the processed mesh for external consumption: export to file formats, visualization, analysis tools.
May attach or convert attribute data (e.g. colors, scalar fields, experiment results) into a format suitable for rendering or further tools.
Does not change the core topology or semantics of the processed mesh, only its representation for the outside world.
This structure makes it easy to reason about where data enters, is modified, and leaves the system, and keeps experimental algorithms clearly separated from IO concerns.
Role of the universal mesh representation
The universal mesh representation (a half-edge mesh interface) is the shared contract between all pipeline stages.
Single input/output type
Every core processing unit exposes the same function shape conceptually: UniversalMesh → UniversalMesh. This allows units to be chained in arbitrary order as long as their preconditions on the mesh are satisfied.
Local, topology-aware access
The half-edge structure encodes vertices, halfedges, faces, and their adjacency relations, which is essential for typical geometry operations (e.g. local neighborhood queries, traversal, edge flips).
Algorithms do not need to know where the mesh came from (file vs. analytic vs. procedural); they only rely on this uniform interface.
Extensibility via attributes
The universal mesh may carry extensible per-vertex, per-edge, and per-face attributes (e.g. UVs, curvature, experimental scalar fields). Core units can read and write these attributes while still conforming to the same mesh type, enabling complex pipelines without changing the central data structure.
Because all processing units speak the same “mesh language”, you can build pipelines like:
Preprocessing
-> RemeshingUnit
-> ConformalMapUnit
-> ExperimentSpecificFilter
-> Export/Postprocessing
without changing the basic function signature or the surrounding infrastructure, only by reordering or swapping units.