IFC is a popular standard file format within the building information model world. Architects, designers, and city planners use IFC to model anything from small structures to entire cityscapes.
As of version 2022.0, LuciadFusion provides native support for converting IFC to OGC 3D Tiles. While technically still valid, the article below describes a deprecated way of handling IFC data. Please refer to the Data Formats: IFC section of the documentation for the recommended way of handling IFC data. |
To process IFC to OGC 3D Tiles, you must first convert it to a 3D format that you can use inside LuciadFusion.
To do so, we recommend using IfcConvert
. You can download it from www.ifcopenshell.org.
IfcConvert
is a cross-compatible, free, open-source tool that you can use to convert IFC to various other formats.
After downloading IfcConvert
, you can use these commands to convert your IFC file:
./IfcConvert --use-element-guids your_file.ifc your_file.obj
./IfcConvert --use-element-guids your_file.ifc your_file.xml
By running those commands, you create an OBJ file and an XML document. The OBJ file contains all the 3D visual data. The XML document contains all the metadata of the IFC file.
The important option here is --use-elements-guids
, which encodes the globally unique IDs to the output files.
This figure shows you a comparison between the output OBJ file and XML file, and how you can match the various objects by ID:
We can take the output OBJ file and create an OGC 3D Tiles service using LuciadFusion. When we preview this in LuciadRIA, we can perform selection operations, as shown in Figure 2, “The resulting project in LuciadRIA with selection and metadata enabled by default.”:
To customize what metadata ends up in the output OGC 3D Tiles dataset, have a look at Customizing metadata in your dataset.
You can use the metadata XML document as input for your own custom ILcd3DTilesProcessorMetadataMapper
.