Import and export models using the
IFC
(Industry Foundation Classes) open standard.
Overview
The xeokit SDK provides support for loading IFC STEP files, the
industry-standard exchange format for Building Information Modeling (BIM)
in the Architecture, Engineering, and Construction (AEC) domain.
IFC represents both geometry and rich semantic structure, enabling
querying, classification, and analysis workflows after import.
The SDK can also write a SceneModel + DataModel back out to an
IFC4 STEP file via IFCExporter, completing the
round-trip.
Use IFCExporter to write a SceneModel
and/or DataModel back out to IFC. The
exporter targets the IFC4 schema and resolves to the IFC STEP
file as a text string.
Shape
%%{init:{"theme":"dark"}}%%
classDiagram
direction TB
class IFCLoader {
+format / versions / fileDataType
+load(params, options?) Promise~void~
}
class IFCExporter {
+format / versions / fileDataType
+write(params, options?) Promise~string~
}
class ModelLoader {
<<formats>>
}
class ModelExporter {
<<formats>>
}
ModelLoader <|-- IFCLoader
ModelExporter <|-- IFCExporter
%%{init:{"theme":"default"}}%%
classDiagram
direction TB
class IFCLoader {
+format / versions / fileDataType
+load(params, options?) Promise~void~
}
class IFCExporter {
+format / versions / fileDataType
+write(params, options?) Promise~string~
}
class ModelLoader {
<<formats>>
}
class ModelExporter {
<<formats>>
}
ModelLoader <|-- IFCLoader
ModelExporter <|-- IFCExporter
classDiagram
direction TB
class IFCLoader {
+format / versions / fileDataType
+load(params, options?) Promise~void~
}
class IFCExporter {
+format / versions / fileDataType
+write(params, options?) Promise~string~
}
class ModelLoader {
<<formats>>
}
class ModelExporter {
<<formats>>
}
ModelLoader <|-- IFCLoader
ModelExporter <|-- IFCExporter
Features
IFC2x3 + IFC4 + IFC4x3 — multi-version parser; auto-detects
the schema from the FILE_SCHEMA(...) header.
Geometry + semantics — fills a SceneModel with implicit
geometry (extrusions, sweeps, profiles) tessellated into
triangle meshes, and a DataModel with the IFC entity graph
(IfcProject → IfcSite → IfcBuilding → IfcBuildingStorey → …).
Stable type ids — IFC type constants are exported from
ifctypes_* sub-modules so application code references them
by symbol instead of magic strings.
Property-set passthrough — every IfcPropertySet attached
to an IfcObject becomes a PropertySet
on the matching DataObject.
IFC4 export — IFCExporter writes a SceneModel +
DataModel back out to an IFC4 STEP file, for round-tripping or
handing geometry + semantics to other BIM tools.
Installation
npminstall@xeokit/sdk
Example: loading an IFC model (with error checking)
ifc — IFC Importer / Exporter
Import and export models using the IFC (Industry Foundation Classes) open standard.
Overview
The xeokit SDK provides support for loading IFC STEP files, the industry-standard exchange format for Building Information Modeling (BIM) in the Architecture, Engineering, and Construction (AEC) domain.
IFC represents both geometry and rich semantic structure, enabling querying, classification, and analysis workflows after import.
The SDK can also write a SceneModel + DataModel back out to an IFC4 STEP file via IFCExporter, completing the round-trip.
Importing IFC
Use IFCLoader to load an IFC file into:
Exporting IFC
Use IFCExporter to write a SceneModel and/or DataModel back out to IFC. The exporter targets the IFC4 schema and resolves to the IFC STEP file as a text string.
Shape
Features
FILE_SCHEMA(...)header.ifctypes_*sub-modules so application code references them by symbol instead of magic strings.Installation
Example: loading an IFC model (with error checking)
Example: exporting an IFC model
IFCExporter.write resolves to the IFC4 STEP file as a text string, which you can save or upload:
Notes
result.ok === falsewhen calling xeokit factory methods.