Skip to main content
IFC export is experimental and may change. If you hit an exporter limitation or confusing output, reach out on Discord.

Overview

OpenGeometry can export B-Reps and scenes to IFC4 (text / Part 21 style). You can export a single B-Rep payload or export a whole scene through OGSceneManager. IFC export supports an optional semantics mapping that lets you control which IFC classes to emit and attach properties.

Initialization

Initialize the WASM module once before using OGSceneManager:

Export APIs

exportBrepToIfc

exportSceneToIfc / exportCurrentSceneToIfc

Result type

export*ToIfc(...) returns an OGIfcExportResult:
string
IFC text output.
string
A JSON string containing export statistics (elements written, semantics applied, fallbacks, and more).

Config JSON

All IFC exports accept an optional config_json string. If it is null, undefined, or an empty string, OpenGeometry uses defaults. If you provide config_json, it must deserialize into the full IfcExportConfig shape (required fields must be present). Example JSON payload:

Semantics mapping

The semantics map is keyed by your entity_id values in the scene. When you specify ifc_class, OpenGeometry validates it against the allowed list and:
  • Uses the requested class when it is supported
  • Falls back to IFCBUILDINGELEMENTPROXY in best-effort mode
  • Errors in strict mode
Supported classes:
  • IFCBUILDINGELEMENTPROXY
  • IFCWALL
  • IFCSLAB
  • IFCCOLUMN
  • IFCBEAM
  • IFCMEMBER
  • IFCDOOR
  • IFCWINDOW
  • IFCROOF
  • IFCSTAIR
  • IFCRAILING
  • IFCFOOTING

Examples

Export and download IFC in the browser

Native-only file export

Native-only builds also expose exportSceneToIfcFile(...) (not available in browser/WASM builds).

Live demo

There is no dedicated IFC export demo page yet. Start from the demo index: OpenGeometry demos.
Last modified on March 14, 2026