Skip to content

Creating Files for Offline BIM

xeolabs edited this page Feb 7, 2019 · 31 revisions

See also:

Introduction

In this quick tutorial you'll learn how to download model metadata from BIMServer, for use when viewing BIM models offline with xeokit.

Contents

Creating a glTF Model

1. Download an IFC File

We'll use IFC models from the Schependomlaan dataset.

2. 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

Convert the Schependomlaan IFC STEP file into a COLLADA file:

./IfcConvert --use-element-guids schependomlaan.ifc  schependomlaan.dae

4. Convert COLLADA to glTF

Then convert the COLLADA into a single glTF 2.0 text file with embeddded geometry:

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

Creating JSON IFC Metadata

1. Install BIMServer

Download and install BIMServer v1.5.120 - the standalone JAR version is easiest.

Note the admin login credientials.

2. Upload IFC to BIMServer

Create a project in BIMServer and check in the IFC file.

Note the project ID.

3. Install and run xeokit-bimserver-utils

Download and install xeokit-bimserver-utils.

Tweak the configurations within that util as described in the README.md. You'll need to configure it with your project ID and login credentials that have permission to read the project (just use admin, it's easier than creating and authorizing a new user via the BIMServer API).

Run the utility, which will write out a file of JSON metadata for the confgured model.

Conclusion

Now we have a glTF file with an accompanying JSON file that specifies metadata for it. We can now load a BIM model from those two files as described in Viewing BIM Models Offline.

Clone this wiki locally