Background
MoGen's geometry is already fundamentally print-friendly: CSG output is watertight by construction (Manifold + clean_csg_output weld/degenerate-cull in crates/mogen-geom/src/cleanup.rs), and length units normalize to metres at parse time with mm/cm/m/km/in/ft/yd suffixes (crates/mogen-dsl/src/parser.rs), so millimetre-accurate authoring works today.
But the pipeline stops short of guaranteeing or producing a print-ready file. This issue tracks the optional features that would close that gap.
Gaps
- Open primitives —
plane, disc, curved_plane, spline_ribbon are non-manifold by design (fine for game assets, unprintable as a solid).
- No print export format — GLB/FBX only; STL/3MF require external conversion.
- No manifold validation —
validate_graph covers skinning/connectivity topology but never verifies the final mesh is watertight/manifold. is_closed_manifold() / is_csg_manifold() (crates/mogen-geom/src/csg.rs:146) exist but only gate the merge pass.
- No wall-thickness check — thin features below a printer's nozzle minimum silently fail.
- No self-intersection detection — Manifold avoids it for CSG, but pre-CSG sibling meshes can still overlap.
Proposed features (rough priority order)
- STL / 3MF exporter in
mogen-export. STL is trivial (triangle soup); 3MF is the modern choice (units, colour, multi-object). Biggest single unlock.
mogen check --print validation mode — surface non-manifold edges (edge shared by ≠2 tris), open boundaries, zero-area tris, and disconnected shells as diagnostics. Reuses existing manifold helpers instead of only gating merge.
- Minimum wall-thickness check — warn on thin features given a target nozzle diameter (SDF/ray-sampling heuristic).
- Print export mode that forces a single watertight shell — extend the existing
merge_sibling_meshes CSG-union pass across the whole tree rather than scoped to same-material siblings.
- Open-primitive guard — error early when a print target uses
plane/disc/etc. as visible surfaces.
Suggested first step
Feature (2) reuses existing diagnostic infrastructure and manifold helpers, and tells users why a model won't print before investing in the exporter (1).
Background
MoGen's geometry is already fundamentally print-friendly: CSG output is watertight by construction (Manifold +
clean_csg_outputweld/degenerate-cull incrates/mogen-geom/src/cleanup.rs), and length units normalize to metres at parse time withmm/cm/m/km/in/ft/ydsuffixes (crates/mogen-dsl/src/parser.rs), so millimetre-accurate authoring works today.But the pipeline stops short of guaranteeing or producing a print-ready file. This issue tracks the optional features that would close that gap.
Gaps
plane,disc,curved_plane,spline_ribbonare non-manifold by design (fine for game assets, unprintable as a solid).validate_graphcovers skinning/connectivity topology but never verifies the final mesh is watertight/manifold.is_closed_manifold()/is_csg_manifold()(crates/mogen-geom/src/csg.rs:146) exist but only gate the merge pass.Proposed features (rough priority order)
mogen-export. STL is trivial (triangle soup); 3MF is the modern choice (units, colour, multi-object). Biggest single unlock.mogen check --printvalidation mode — surface non-manifold edges (edge shared by ≠2 tris), open boundaries, zero-area tris, and disconnected shells as diagnostics. Reuses existing manifold helpers instead of only gating merge.merge_sibling_meshesCSG-union pass across the whole tree rather than scoped to same-material siblings.plane/disc/etc. as visible surfaces.Suggested first step
Feature (2) reuses existing diagnostic infrastructure and manifold helpers, and tells users why a model won't print before investing in the exporter (1).