This article explains how to convert IFC data to OGC 3D Tiles.

If you want to visualize large IFC datasets and maintain application performance, you must convert the IFC data to the OGC 3D Tiles format. OGC 3D Tiles is an optimal format for visualizing large geographical datasets. After the conversion, you can visualize the data on a Lightspeed view, as explained in the Visualize OGC 3D Tiles data on a Lightspeed map article, or in LuciadRIA, as explained in the LuciadRIA documentation about handling BIM data.

LuciadFusion can natively serve IFC data as an OGC 3D Tiles service. For that use case, you don’t need a manual conversion to OGC 3D Tiles.

Check the LuciadFusion Serving BIM data article for more information on how to serve the IFC data as OGC 3D Tiles.

To convert the IFC data to OGC 3D Tiles, you have two options: you can perform the conversion programmatically, or you can run the IFC data conversion script from the command line.

Converting IFC data to OGC 3D Tiles in your code

To convert IFC data to OGC 3D Tiles:

  1. Decode the IFC data into an ILcdModel using a TLcdIFCModelDecoder.

    ILcdModelDecoder decoder = new TLcdIFCModelDecoder();
    ILcdModel model = decoder.decode(sourceName);
  2. Encode the generated model to OGC 3D Tiles using a TLcdOGC3DTilesModelEncoder.

    TLcdOGC3DTilesModelEncoder encoder = new TLcdOGC3DTilesModelEncoder();
    encoder.export(model, outputPath);

The resulting OGC 3D Tiles dataset is written to the given outputPath location.

Converting IFC data to OGC 3D Tiles from the command line

To convert IFC data to OGC 3D Tiles from the command line, go to the samples folder, and select the appropriate script to run:

  • bim.converter.bat on Windows systems

  • bim.converter.sh on Linux and Mac systems

For example, run:

bim.converter.sh -i /data/Formats/IFC/someIFCFile.ifc -o /project/3dtilesoutput

If you run the script with invalid or insufficient arguments, the converter tool prints its usage documentation.

You must run the script with these parameters:

  • -i path/to/<projectfile>: specify the IFC dataset, either a .ifc or a .ifc.index file.

  • -o path/to/output/: specify the path to the output folder for the OGC 3D Tiles.

Optionally, you can add the -g and -m command parameters:

  • You can use the -g command parameter to add a GeoJSON file to the output folder.

    bim.converter.sh -g -i /data/Formats/IFC/someIFCFile.ifc -o /project/3dtilesoutput

    The GeoJSON file contains the metadata of the individual elements in the IFC data, such as doors and walls. A bounding box is also included, but not the full geometry. For more information about GeoJSON conversion, see the Converting IFC data to GeoJSON tutorial.

  • You can use the -m command parameter to specify the mesh compression you want to apply. You can set it to either DRACO or NONE. See ELcdOGC3DTilesMeshCompressionType for more information about the meaning of these values. If this parameter isn’t specified, the DRACO compression is used.

    bim.converter.sh -m DRACO -i /data/Formats/IFC/someIFCFile.ifc -o /project/3dtilesoutput