using bridge = new IfcLiteBridge() support (TS 5.2+ / ES2022 target):
frees the WASM handle deterministically at scope exit.
Run geometry extraction on the raw IFC content (Uint8Array) and return ONLY
its typed CSG / opening diagnostics (the GeometryDiagnostics contract), or
undefined when nothing diagnostic-worthy happened. The produced meshes are
dropped. Takes bytes (not a string) so there is no input-size cap.
Free the underlying WASM IfcAPI handle deterministically (AGENTS.md
"Free every WASM handle deterministically"). clearPrePassCache only
drops the per-load caches held inside the handle; the handle itself
(and everything still cached on it — see the poisoned-mutex recovery
note in IfcAPI) is only released here, via wasm-bindgen's generated
free(), when the whole bridge is being torn down.
Idempotent and safe to call more than once, before init(), or after
a fatal WASM runtime error already nulled the handle: a missing handle
is a no-op. The reference is nulled immediately after freeing (via
reset()), so a repeat call can never double-free the same
wasm-bindgen pointer.
Export tabular CSV. mode ∈ {'entities', 'properties', 'quantities'};
empty delimiter ⇒ ,; includeProperties adds flattened Pset_Prop columns.
Optionalmode: "entities" | "properties" | "quantities" | "spatial"Optionaldelimiter: stringOptionalincludeProperties: booleanDFJSON (Dragonfly) export; see energy-export-bridge.ts for the contract.
Export the render geometry in content as a binary glTF (GLB). emissive
self-illuminates each material for renderers without ambient/IBL (#1427).
isolated: undefined ⇒ no filter; empty Uint32Array ⇒ active but
matching nothing, i.e. hide every mesh — don't collapse the two (#4328).
OptionalincludeMetadata: booleanOptionalhidden: Uint32Array<ArrayBufferLike>Optionalisolated: Uint32Array<ArrayBufferLike>OptionalhiddenTypesCsv: stringOptionallit: booleanOptionalemissive: booleanAssemble a GLB from already-produced meshes (flattened parallel arrays) — no re-meshing. Used by the viewer, which already holds the meshes on the GPU.
Optionallit: booleanOptionalemissive: booleanHBJSON (Honeybee) export; see energy-export-bridge.ts for the contract.
Like exportHbjson; also returns HbjsonStats coverage counts (see energy-export-bridge.ts).
Export IFC5/IFCX (USD-style node graph).
OptionalonlyKnownProperties: booleanOptionalpretty: booleanExport structured JSON (array of entity objects with typed property values).
Optionalpretty: booleanOptionalincludeProperties: booleanOptionalincludeQuantities: booleanExport JSON-LD (@graph of ifc: nodes). Empty context ⇒ buildingSMART IFC4 OWL.
included distinguishes no filter (undefined) from an active empty filter and
otherwise applies an express-id allowlist like the OBJ/glTF/STEP exporters (#4659).
Optionalcontext: stringOptionalincludeProperties: booleanOptionalincludeQuantities: booleanOptionalpretty: booleanOptionalincluded: Uint32Array<ArrayBufferLike>Build a Google-Earth-ready KMZ directly from already-produced meshes (flattened
parallel arrays). The model is embedded as COLLADA (model.dae) — the only
<Model> format Google Earth loads — with emission-lit, double-sided materials
(#1427). 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).
OptionalaltitudeMode: KmzAltitudeModeIFC terrain → LandXML 1.2; see landxml-terrain-export.ts. Refusals throw TERRAIN_REFUSED:.
Merge several IFC models into one STEP/IFC string (flat bytes + per-model lengths).
Optionalschema: stringExport the render geometry in content as a Wavefront OBJ string.
isolated: undefined ⇒ no filter; empty Uint32Array ⇒ active but matching nothing.
OptionalincludeNormals: booleanOptionalhidden: Uint32Array<ArrayBufferLike>Optionalisolated: Uint32Array<ArrayBufferLike>Re-serialize the model in content to a STEP/IFC string (P1: base
re-serialization + reference-closed subset). Empty schema preserves the source;
included distinguishes no filter (undefined) from an active empty filter (#4659).
Optionalschema: stringOptionalincluded: Uint32Array<ArrayBufferLike>OptionalmutationsJson: stringExport OpenUSD (.usda ASCII) — a real Z-up USD stage (geometry-backed).
Exact authored extrusion sources and their world-space product occurrences.
Optionalids: Uint32Array<ArrayBufferLike>Extract raw profile polygons from all IfcExtrudedAreaSolid building elements.
Returns profile outlines + placement transforms for clean 2D projection without the tessellation artifacts that EdgeExtractor produces.
Raw IFC file text.
OptionalmodelIndex: number
Federation model index (use 0 for single-model files).
Exact authored swept-disk definitions and measurements in IFC world metres.
Optionalids: Uint32Array<ArrayBufferLike>Get IFC-Lite API instance
Read back the active geometry-hash tolerance (null = disabled).
Read back the merge-layers flag for UI surfaces.
Read back the active small-cut skip flag.
Read back the active tessellation quality (null = engine default).
Get version
Initialize IFC-Lite WASM The WASM binary is automatically resolved from the same location as the JS module
Check if initialized
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). Feed straight to renderer.setLineOverlay('alignment', …).
Empty when the file has no alignments.
Optionalframe: RtcFrameParse IfcGrid / IfcGridAxis into structured per-axis data
({ gridId, axisId, tag, start, end }) in renderer Y-up world space
(RTC-subtracted, metres). Use this when you also need the axis tags to
render grid bubbles / labels. See issue #945.
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).
Empty when the file has no grids.
Optionalframe: RtcFrameParse IFC content and return symbolic representations (Plan, Annotation, FootPrint) These are pre-authored 2D curves for architectural drawings
Optionalframe: RtcFramePlan coordinate compatibility patches; all domain math remains in Rust.
Reset the JS wrapper state. This does not reload wasm-bindgen's module singleton after a fatal WASM panic.
Enable / disable per-entity geometry fingerprinting (issue #924).
Pass a positive tolerance in metres to enable; null disables.
Safe to call before init() — the value is cached and re-applied on
the freshly-constructed IfcAPI.
Enable / disable Revit-style multilayer-wall merging (issue #540).
Safe to call before init() — the value is cached and re-applied
on the freshly-constructed IfcAPI.
Toggle the tier-independent small-cut skip (issue #1286). Safe to call
before init() — the value is cached and re-applied on the freshly
constructed IfcAPI. Applies to meshes produced AFTER the call.
Select the tessellation detail level for curved geometry (issue #976).
null restores the engine default ('medium' — output identical to the
pre-quality pipeline). Safe to call before init() — the value is cached
and re-applied on the freshly-constructed IfcAPI. Applies to meshes
produced AFTER the call; already-emitted geometry is not regenerated.
Demesher: simplify already-produced element meshes (flattened parallel
arrays, one record per MeshData entry) at per-element levels 1-5. Returns
the wasm SimplifiedMeshes result object (render meshes in the boundary
Y-up convention + IFC-local file-unit geometry per element).
@ifc-lite/geometry - Geometry processing bridge Now powered by IFC-Lite native Rust WASM (exact-arithmetic CSG kernel)