Skip to content

Importing IFC Models

Lindsay Kay edited this page Apr 23, 2018 · 3 revisions

1. Download IFC models

We'll use IFC models from the Schependomlaan dataset, which is pretty much the BIM equivalent of the "Utah Teapot".

2. Download and Install Pipeline Tools

We'll use these CLI tools to transform IFC into glTF:

We'll assume that these are installed relative to the current working directory.

3. Convert IFC to COLLADA:

./IfcConvert schependomlaan.ifc  schependomlaan.dae

4. Convert COLLADA to glTF 2.0:

./COLLADA2GLTF/build/COLLADA2GLTF-bin -i schependomlaan.dae -o schependomlaan.gltf

Optionally, we can do a bunch of optimizations to the glTF, such as compress geometry:

node ./gltf-pipeline/bin/gltf-pipeline.js -i schependomlaan.gltf -o schependomlaan.optimized.gltf

5. Visualize the glTF

var model = new xeogl.GLTFModel({
    src: "path/to/model/schependomlaan.gltf"
});

var scene = model.scene;
var camera = scene.camera;

camera.eye = [-14.63, 22.88, 10.04];
camera.look = [10.98, 5.82, -11.23];
camera.up = [0.35, 0.88, -0.29];