This is an online JS-based backend that allows converting IFC files to a number of other formats (LBD, ifcOWL, DAE, GLTF)
You need:
- Java version 8+
- Node.js
Open console and run:
npm install
npm run start
After starting the tool, a web service is running on HTTP port 4800 (default). This web service allows converting IFC to a number of other data formats.
You can use this web service in a number of ways, of course. To test whether it is running, we recommend using https://www.postman.com/:
Open Postman and run the following HTTP Request:
GET /test
Host: localhost:4800
This should lead to the following response, showing that the code works.
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 9
It Works!
Open Postman and run the following HTTP Request:
POST /convert
Host: localhost:4800
Content-Type: multipart/form-data
Body: {
ifcFile: <fileUpload>
conversions: "LBD, ifcOWL, DAE, GLTF"
}
Selecting a file in the body should look as follows:
You can specify LBD, ifcOWL, DAE, or GLTF as values for the conversion process. This request should lead to the following response, namely a ZIP folder as output file. Save the output and extract the converted file.
HTTP/1.1 200 OK
Content-Type: application/zip
Content-Disposition: attachment; filename="attachment.zip"
- The file path where the convertor is running should not contain spaces (e.g. this issue occurs in "Onedrive - myCompany" subfolders)
- for larger files, some subprocesses (Java) may require to increase the allocated heap space (e.g. -Xms32G -Xmx32G -jar IFCtoLBD_Desktop_Java8.jar)
If you care to extend the application so it can also output other formats: this is easily possible with a small number of code edits as long as you have an executable available of the conversion process.
Jeroen Werbrouck, UGent - jeroen.werbrouck@ugent.be