-
Notifications
You must be signed in to change notification settings - Fork 295
Creating Files for Offline BIM
See also:
- Viewing BIM Models Offline - loading BIM models from the file system
- Viewing Models from BIMServer - loading IFC models from BIMServer
In this quick tutorial you'll learn how to download model metadata from BIMServer, for use when viewing BIM models offline with xeokit.
We'll use IFC models from the Schependomlaan dataset.
We'll use these CLI tools to transform IFC into glTF:
- ifcConvert to convert IFC files to DAE
- COLLADA2GLTF to convert DAE to glTF
We'll assume that these are installed relative to the current working directory.
Convert the Schependomlaan IFC STEP file into a COLLADA file:
./IfcConvert --use-element-guids schependomlaan.ifc schependomlaan.dae
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
Download and install BIMServer v1.5.120 - the standalone JAR version is easiest.
Note the admin login credientials.
Create a project in BIMServer and check in the IFC file.
Note the project ID.
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.
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.