Optionaloptions: GeometryProcessorOptionsRun geometry extraction on buffer and return its typed CSG / opening
diagnostics (the GeometryDiagnostics contract), or undefined when nothing
diagnostic-worthy happened or the bridge is not initialized. The meshes are
discarded - this is the diagnostics-only surface for the CLI / SDK.
Cleanup resources: frees the underlying WASM IfcAPI handle
deterministically (AGENTS.md "Free every WASM handle deterministically").
IfcLiteBridge.dispose() also frees whatever the pre-pass / batch caches
were still holding on the handle (see the poisoned-mutex recovery note
on the Rust IfcAPI struct) — meshes and pre-pass results are already
freed as they're extracted (.free() right after copying into JS
arrays plus clearPrePassCache() in every load path's finally), so
this only needs to release the long-lived IfcAPI handle itself.
The native (Tauri) path has no WASM handle to release; platformBridge
is left untouched.
Idempotent: IfcLiteBridge.dispose() nulls its handle after freeing,
so calling this more than once (e.g. an explicit call after a using
declaration already ran [Symbol.dispose]()) is a no-op, not a
double-free.
Enable per-entity geometry fingerprinting on the WASM mesh pass
(issue #924). Once on, every processGeometryBatch populates
MeshCollection.geometryHashValues, which convertMeshCollectionToBatch
attaches to each MeshData.geometryHash. RTC-invariant + tolerance-
quantized; default tolerance is DEFAULT_GEOM_HASH_TOLERANCE (1 mm).
The same switch also populates MeshCollection.geometryAabbValues, which
lands on MeshData.geometryAabb (#1891) — the absolute world box that lets
a consumer tell a move from a reshape instead of reading one changed-hash
bit — and MeshCollection.geometryVolumeValues, which lands on
MeshData.geometryVolume (#1993), the proved enclosed volume the diff
engine's split/merge detector weighs one element against several. Nothing
is computed while this is off.
Safe to call before init() — the bridge caches the value and replays
it on the freshly-built IfcAPI. No-op on the native/desktop path (the
Tauri pipeline does not emit hashes yet). Pass null to disable.
Optionaltolerance: number | nullOptionalmode: "entities" | "properties" | "quantities" | "spatial"Optionaldelimiter: stringOptionalincludeProperties: booleanExport the IfcSpace volumes in buffer as a Dragonfly DFJSON string
(Ladybug Tools energy model — extruded Room2D plates). Returns null if
not initialized.
WASM path only, deliberately: like exportHbjson and the other
analytic readers here (extractProfiles, parseGridLines,
parseSymbolicRepresentations, …) this reads this.bridge and so returns
null under isNative. That is not an oversight specific to DFJSON —
IPlatformBridge declares no energy export at all, and the native path
needs a Tauri host (isTauri() requires window.__TAURI_INTERNALS__),
which no longer ships: the desktop app is decommissioned and the repo
carries no src-tauri. Giving DFJSON a native route alone would single out
one of eight methods for a constraint the whole family shares.
IFC file buffer
Model identifier / display name
Export render geometry as a binary GLB. Fails closed: a model whose visible
mesh set is empty throws the typed NO_RENDER_GEOMETRY error (match with
isNoRenderGeometryError) instead of returning a valid but empty GLB.
OptionalincludeMetadata: booleanOptionalhidden: Uint32Array<ArrayBufferLike>Optionalisolated: Uint32Array<ArrayBufferLike>OptionalhiddenTypesCsv: stringOptionallit: booleanOptionalemissive: booleanAssemble a GLB from already-produced meshes (no re-meshing) — the viewer path.
Flattens MeshData[] into the wasm binding's parallel arrays. The caller passes
exactly the meshes it wants emitted (its own visibility filtering). lit emits
standard PBR materials that shade from normals; false ⇒ flat
KHR_materials_unlit (the historical look — #1321). emissive self-illuminates
each material at its base colour (core glTF emissiveFactor) so renderers with
no ambient/IBL — Google Earth — don't render it near-black (#1427).
OptionalincludeMetadata: booleanOptionallit: booleanOptionalemissive: booleanExport the IfcSpace volumes in buffer as Honeybee HBJSON. Null if not initialized.
Like exportHbjson; also returns HbjsonStats. Null if not initialized.
Optionalpretty: booleanOptionalincludeProperties: booleanOptionalincludeQuantities: booleanOptionalcontext: stringOptionalincludeProperties: booleanOptionalincludeQuantities: booleanOptionalpretty: booleanOptionalincluded: Uint32Array<ArrayBufferLike>Build a Google-Earth-ready KMZ from already-produced meshes (no re-meshing) —
the working KMZ path (#1427). The model is embedded as COLLADA (model.dae),
the only <Model> format Google Earth loads (a GLB raises "Unsupported element:
Model"), with emission-lit double-sided materials.
Flattens MeshData[] into the wasm binding's parallel arrays.
xAxisAbscissa/xAxisOrdinate are the IfcMapConversion grid-north components
(pass undefined for heading 0). altitudeMode selects the KML vertical
placement ('clampToGround' default rests on the terrain and ignores altitude;
'absolute' places the origin at altitude metres MSL). Returns null if not
initialized.
Optionalname: stringOptionalaltitudeMode: KmzAltitudeModeExport terrain products (express ids) as LandXML 1.2. Null if not initialized; a refusal throws TERRAIN_REFUSED:.
Optionaloptions: LandXmlTerrainExportOptionsMerge several IFC models (raw byte buffers) into one STEP/IFC UTF-8 byte buffer.
Optionalschema: stringRust domain exporters return bytes to avoid V8 string-size limits; decode
text with TextDecoder. They return null before init(). isolated:
undefined selects all; an empty array hides every mesh. Keep distinct.
OptionalincludeNormals: booleanOptionalhidden: Uint32Array<ArrayBufferLike>Optionalisolated: Uint32Array<ArrayBufferLike>Optionalschema: stringOptionalincluded: Uint32Array<ArrayBufferLike>OptionalmutationsJson: stringExport OpenUSD (.usda ASCII) — a real Z-up USD stage (geometry-backed).
Exact extrusion sources in file units and world-metre uses; omitted IDs select all, empty IDs none; null until init.
Optionalids: Uint32Array<ArrayBufferLike>Extract IfcExtrudedAreaSolid profiles and transforms for 2D projection.
modelIndex is the federation index; null until initialized.
OptionalmodelIndex: numberIFC Z-up swept-disk curves in metres; omitted IDs select all, empty IDs none; null until init.
Optionalids: Uint32Array<ArrayBufferLike>Get the WASM API instance for advanced operations (e.g., entity scanning)
Read back the active tessellation quality (null = engine default).
Initialize the geometry processor In Tauri: Creates platform bridge for native Rust processing In browser: Loads WASM
Parse IfcAlignment directrix curves into a flat Float32Array of 3D
line-list vertices [x0,y0,z0, x1,y1,z1, …] in renderer Y-up world space
(RTC-subtracted, metres). Rendered as thin lines (not a ribbon mesh) to
match IfcGrid / IfcAnnotation. Feed straight to renderer.setLineOverlay('alignment', …).
IFC file buffer
Optionalframe: RtcFrameFlat line-list vertices, or null if not initialized
Parse IfcGrid / IfcGridAxis into structured per-axis data (tag +
endpoints) in renderer Y-up world space (RTC-subtracted, metres). Use when
you also need the axis tags to render grid bubbles / labels (issue #945).
Returns plain GridAxis objects (the underlying zero-copy WASM collection is consumed internally), or null if not initialized.
IFC file buffer
Optionalframe: RtcFrameParse IfcGrid / IfcGridAxis into a flat Float32Array of 3D line-list
vertices [x0,y0,z0, x1,y1,z1, …] (one segment per axis) in renderer Y-up
world space (RTC-subtracted, metres) — the same frame the streamed meshes
render in, so grids overlay the model by construction (issue #945). Feed to
setLineOverlay('grid', …), NOT 'annotation' (it expands bounds, #967).
IFC file buffer
Optionalframe: RtcFrameFlat line-list vertices, or null if not initialized
Parse symbolic representations (Plan, Annotation, FootPrint) from IFC content These are pre-authored 2D curves for architectural drawings (door swings, window cuts, etc.)
IFC file buffer
Optionalframe: RtcFrameCollection of symbolic polylines and circles
Canonical Rust plan; unsupported platforms refuse explicitly.
Process IFC file and extract geometry (synchronous, use processStreaming for large files)
IFC file buffer
OptionalentityIndex: Map<number, any>
Optional entity index for priority-based loading
Adaptive processing: Choose sync or streaming based on file size Small files (< threshold): Load all at once for instant display Large files (>= threshold): Stream for fast first frame
IFC file buffer
Optionaloptions: {Configuration options
OptionalbatchSize?: number | DynamicBatchConfigNumber of meshes per batch for streaming (default: 25)
OptionalentityIndex?: Map<number, any>Optional entity index for priority-based loading
OptionalexistingSab?: SharedArrayBufferReuse a SAB already populated by the caller (parser worker, etc.).
OptionalhungJobTimeoutMs?: numberOpt in to hung-call recovery on the parallel path (#4884).
OptionalonEntityIndex?: (Callback fired when the streaming pre-pass exports its entity index. Enables a peer worker (e.g. parser) to skip its own scan. Only fires on the parallel-streaming path.
OptionalsharedRtcOffset?: { x: number; y: number; z: number }Shared RTC offset from first federated model (IFC Z-up coords). Overrides per-model RTC detection for federation alignment.
Optionalsignal?: AbortSignalTerminates the parallel worker pool; see ProcessParallelOptions.signal (#4884).
OptionalsizeThreshold?: numberFile size threshold in bytes (default: 2MB)
OptionalsourceFingerprint?: SharedArrayBufferFresh per-load prepass fingerprint cell; optional optimization only.
OptionalstallPhaseHandle?: StallPhaseHandleSee ProcessParallelOptions.stallPhaseHandle (#4902); parallel path only.
Optionaltrace?: LoadTraceOptionalwasmUrls?: { wasm?: string }Explicit wasm asset URL forwarded to the worker pool.
See processParallel(...).wasmUrls for rationale.
OptionalworkerCountOverride?: numberExplicit geometry-worker count for A/B tuning (viewer ?geomWorkers=N).
Forwarded to the parallel path; clamped to the memory budget there.
Geometry output is unaffected by the count.
Process IFC file in parallel using Web Workers. Each worker gets its own WASM instance and processes a disjoint slice of the geometry entity list. Batches are yielded as they arrive from any worker, enabling progressive rendering while utilizing multiple cores.
IFC file buffer
OptionalsharedRtcOffset: { x: number; y: number; z: number }OptionalexistingSab: SharedArrayBuffer
Reuse a SAB the caller has already shared with another worker.
OptionalonEntityIndex: (Callback fired when the streaming pre-pass exports its entity index.
OptionalwasmUrls: { wasm?: string }
Explicit wasm asset URL forwarded to the worker pool. See
ProcessParallelOptions.wasmUrls in geometry-parallel.ts for
the full rationale — needed only for bundlers that can't transform
new URL('ifc-lite_bg.wasm', import.meta.url) inside the worker
dist (or deployments that serve wasm from a separate origin).
Vite + webpack 5 consumers leave this undefined.
OptionalworkerCountOverride: number
Explicit geometry-worker count for A/B tuning (the viewer's
?geomWorkers=N knob). Overrides the cores-tier heuristic but stays
clamped to the memory budget. Geometry output is unaffected (workers
process disjoint, deterministic element slices). Undefined ⇒ heuristic.
OptionalsourceFingerprint: SharedArrayBufferOptionalsignal: AbortSignal
Terminates the worker pool and ends the stream (#4884).
OptionalhungJobTimeoutMs: number
Opt in to hung-call recovery; see ProcessParallelOptions.hungJobTimeoutMs (#4884).
OptionalstallPhaseHandle: StallPhaseHandle
See ProcessParallelOptions.stallPhaseHandle (#4902).
Optionaltrace: LoadTraceProcess IFC geometry directly from a filesystem path in native desktop hosts. This avoids copying IFC content through JS when the host already has the file path.
Process IFC file with streaming output for progressive rendering Uses native Rust in Tauri, WASM in browser
IFC file buffer
Optional_entityIndex: Map<number, any>OptionalbatchConfig: number | DynamicBatchConfig
Dynamic batch configuration or fixed batch size
OptionalsharedRtcOffset: { x: number; y: number; z: number }Stream geometry directly from a filesystem path in native desktop hosts. This avoids copying very large IFC files through JS and Tauri IPC.
OptionalestimatedBytes: numberOptionalcacheKey: stringSelect the tessellation detail level for curved geometry (issue #976).
Equivalent to the tessellationQuality constructor option; null
restores the engine default ('medium' — output identical to the
pre-quality pipeline). Applies to geometry processed AFTER the call
(set before process* — already-emitted meshes are not regenerated).
Safe to call before init() — the bridge caches the value and replays
it on the freshly-built IfcAPI. No-op on the native/desktop path (the
Tauri pipeline does not consume the level yet).
Demesher: simplify already-produced element meshes at per-element levels
(1-4 = cavity removal + clustering at 0.5/0.25/0.10/0.03 triangle ratio,
5 = bounding box). Pass ALL of the target elements' MeshData records
(per-material submeshes included); non-occurrence records (type-library
shapes) are ignored. Returns replacement meshes (swap into the scene via
removeMeshesForEntities + addMeshes) plus each element's geometry in
its IFC object-placement frame in file units, for applySimplifiedGeometry.
originShift is coordinateInfo.originShift (IFC Z-up metres);
unitScale is metres per project length unit (defaults to 1 = metres).
Returns null if the wasm bridge is not initialized.
Optionaloptions: { originShift?: { x: number; y: number; z: number }; unitScale?: number }
using processor = new GeometryProcessor(...)support (TS 5.2+ / ES2022 target): frees the WASM handle deterministically at scope exit.