Skip to main content

Module geometry_export

Module geometry_export 

Source
Expand description

Analysis-ready geometry-data export.

A per-entity geometry dump distinct from the render-oriented GLB. Where the GLB is glTF Y-up, recentred, and vertex-duplicated for flat shading, this export is what an analysis consumer wants:

  • IFC Z-up (no Y-up rotation — we read MeshData before the wasm boundary applies it),
  • absolute world coordinates in metres: vertex = position + origin + rtc_offset (the per-element local-frame origin and the model rtc_offset are folded back in, and the offset is recorded so geo-referenced consumers can recover or re-localise),
  • welded / indexed triangles straight from the kernel mesh (the GLB’s per-face duplication happens later, in the glTF exporter),
  • occurrences only (geometry_class == 0); type-product RepresentationMap geometry is omitted, matching what occurrence-based tessellators emit.

Keyed by IFC STEP/express id. Submeshes of one element (per-material splits) are merged into a single triangle soup per id. f64 throughout so building- and geo-referenced-scale coordinates keep full precision.

Structs§

ExportedElement
One IFC entity’s merged geometry, in IFC Z-up absolute-world metres.
GeometryDataExport
Top-level geometry-data document. Serializes to the ifc-lite-geometry-data JSON contract.

Functions§

build_geometry_data_export
Build the geometry-data export from a processed model’s meshes.