IFC support in Castle Game Engine

IFC house model
Web demo of IFC format support

We’ve been extending in recent months our IFC support.

I talked about it at conference in Germany and I will talk about it at conference in Poland next week 🙂

General overview of what IFC is about:

  • You can open, save and manipulate 3D models in the IFC format. This is the standard 3D format used by the BIM (Building Information Modeling) industry and supported by tools like Revit, ArchiCAD, FreeCAD, BonsaiBIM (in Blender). It describes how real-world 3D objects are constructed, from cities and buildings to the individual furniture and appliances.

  • Using our engine you can open IFC files, manipulate their contents using “native IFC classes” (which means that your software works using the same concepts as the IFC specification), and save them back to IFC files.

  • You can develop browsers and editing tools for IFC files, and deploy them on all the platforms supported by our engine.

  • All the details, along with sample code, are documented on our IFC page.

New things we’ve done in recent months:

  1. Our IFC test files are published in demo-models.

  2. Our online converter supports IFC.

  3. Our command-line converter supports IFC, so you can do things like castle-model-converter simple_house.ifcjson output.stl

  4. We have basic knowledge of all IFC classes (thanks to reading their information from XSD) and for many of them (178 now) we have knowledge of all properties.

  5. IfcGridAxis, IfcGrid are handled and displayed now.

  6. New engine utility method:TCastleIfcMapping.ProductToNodes, used by ProductBoundingBox method in example.

  7. New algorithm for extrusions in IFC, simpler, more efficient, more correct in some cases.

    • Just use quads for sides + concave top/bottom caps, do not use X3D that tries to be “too smart” and e.g. rotates the spine.

    • Also optimized convex/concave extrusion top/bottom caps.

    • Also adjust circle slices based on radius, to make it more efficient.

  8. New efficient wireframe generation (e.g. for IfcBoundingBox, but also every other shape in CGE).

  9. IFC transformation handling fix.

  10. Much more optimized changing of IFC Translation by TIfcProduct.Translation.

  11. Better saving to X3D:

    • Fixed rotation defaults.

    • Reuse Coordinate node for IFC extrusions (across 2 X3D geometry nodes).

  12. Improvements to examples/ifc:

    • Button to view entire model.

    • Checkbox to toggle debug IfcBoundingBox display.

Have fun with IFC and 3D standards, and support our work on Patreon!