thatopen-syntax-ifc-loading

Installation
SKILL.md

IFC Loading: IfcLoader & IfcImporter

Overview

IFC loading in ThatOpen converts IFC files into the internal Fragments binary format for high-performance 3D rendering. There are two approaches:

  1. IfcLoader (high-level, @thatopen/components) — The standard component for loading IFC files in a ThatOpen application. Wraps web-ifc and handles WASM setup, conversion to fragments, and scene integration.
  2. IfcImporter (low-level, @thatopen/fragments) — Direct fragment conversion without the component framework. Useful for server-side processing, Web Workers, or custom pipelines.

The time-consuming part is the IFC-to-Fragments conversion, not the actual fragment loading. ALWAYS convert once and store the Fragments binary for fast reloading.


Critical Rules

  1. ALWAYS call setup() before load() — IfcLoader implements Configurable. Calling load() before setup() causes WASM initialization failures.
  2. ALWAYS match WASM path version to installed web-ifc version — A version mismatch between the WASM files and the web-ifc npm package causes silent parsing failures or crashes.
  3. NEVER hardcode a web-ifc version in the WASM path without checking package.json — the installed version may differ.
  4. ALWAYS initialize FragmentsManager before loading IFC — Call fragmentsManager.init(workerURL) before any IFC loading to enable fragment processing.
Related skills
Installs
5
GitHub Stars
5
First Seen
Apr 28, 2026