This project implements NativeIFC concept into FreeCAD. It allows FreeCAD users to open, manipulate and create IFC files natively in FreeCAD.
Although FreeCAD already supports opening and saving IFC files through the Arch workbench, it does so, like most other BIM applications, by translating to and from the IFC file format and FreeCAD's internal data model. This means two translations, one when opening and another one when saving, which cause a) data loss, and b) a complete rewrite of the file, which turns it unsuitable for version control systems like Git.
NativeIFC means that the IFC file is itself the data structure in FreeCAD. When opening an IFC file in FreeCAD, what you see on the screen is a direct rendering of the contents of the IFC file. Anything you modify will directly modify the IFC file. If you open a file, modify one element and save the file, the only thing that will have changed in the file is the line concerning that element. The rest of the file will be 100% identical to how it was before you saved. No data loss, and very identificable changes.
The Native IFC idea itself comes from this paper by Bruno Postle.
This project is heavily inspired by BlenderBIM and tries as much as possible to use the same concepts and reuse the code. The final goal is to offer in FreeCAD the same level of functionality and performance found in BlenderBIM, and to upstream as much as possible to IfcOpenShell, the common IFC engine used by both applications.
The roadmap below will show you an overview of the current state of the implementation. Check the documentation to learn how to use this addon, and I also write regular updates on this project at https://yorik.uncreated.net/blog/nativeifc
- Write an importer that allows an initial import of an IFC file into FreeCAD
- Write a custom parametric FreeCAD object that represents an IFC document in the FreeCAD tree
- Do an initial geometry import
- Write a custom parametric FreeCAD object that represents in IFC product in the FreeCAD tree
- Reveal the document structure in the FreeCAD tree
- Allow an object shape to be built automatically from its children
- Allow to expand a document (reveal its children)
- Use group extension
- Support colors
- Use enums in enum-based properties
-
Fetch attribute documentationcanceled for now because it yields too much text - Fetch context-dependent IFC types
- Find a way to not store the whole enum in the file
- Add progress feedback
- Allow to change an attribute of an object
- Allow to manually save the linked IFC file
- Implement mesh mode
- Allow different storage strategies (full shape or only coin representation)
- Write a hook system that allows FreeCAD to save the IFC document
- Test (and solve!) what happens when opening a NativeIFC file in vanilla FreeCAD
- Add a shape caching system
- Tie the shape caching to the corresponding IFC document
- Allow to change the class of an object
- Allow late loading/rebuilding of coin representation
- Allow different import strategies (full model, only building structure...)
- Allow to create an IFC document without an existing IFC file
- Allow to add building structure (building, storey...)
- Allow to add a simple generic IFC product
- Allow to delete objects
- Allow to hide children of an object
-
Tie all of the above to BIM commandscancelled because the only one necesary is the Project tool
- Allow to edit placements
- Define a strategy for expanding non-IfcProduct elements
-
Expand attributescancelled for now because only non-link attributes need to be shown so far - Expand materials
- Expand properties
- Allow to regroup elements
- Handle drag/drop
- Allow to change the IFC schema
- Support layers
- Support groups
- Support Arch walls
- Support Arch structures
- Support Arch objects with subtractions and additions
- Support Arch windows
- Support custom openings and protrusions
- Support Draft 2D entitties
- Support Draft dimensions
- Support Part extrusions
- Support Part booleans
- Implement single document mode
- Handle undo/redo
-
Add this to the addons managercancelled because it will be merged with BIM - Add to BIM WB dependencies/ reorganize addon
- Verify and adapt 2D view generation workflow
- Verify and adapt quantifying workflow
- Verify and adapt cost/surveying workflow
- Document everything
- Upstream all pure ifcopenshell functionality to ifcopenshell.utils
- Transfer Arch exportIFC.getRepresentation() functionality to ifcopenshell.api.geometry
- Common system: Geometry properties are created on entering edit mode, on-screen trackers system
- Edit single-line axis endpoints for walls
- Edit single-line axis endpoints for extruded profiles
- Edit rectangle widths
- Edit non-axis extrusion lengths
- Edit polyline profiles
- Support Types
- Support quantity sets
- Support mapped geometry
- Wall joining system
- Mixed or single document mode must be clearly choosable and identified by the user:
- When opening an IFC file: Option in the import dialog to choose between Single/Hybrid
- When opening a FreeCAD file: Implicit - The file carries the mode already
- When creating a FreeCAD file: Dialog pops up to choose between Single/Hybrid
- When inserting an IFC file:
- If the active file has objects:
- If the active file is singledoc:
- Pop up dialog to ask between Merge/Hybrid
- Else: Hybrid
- If the active file is singledoc:
- Else:
- Hybrid
- If the active file has objects:
- Create example workflows:
- I am opening an existing IFC file and I want to modify/add/remove some of its contents: Opening in singledoc mode, modifying, saving.
- I am opening an IFC file and I want to include additional IFC files in it: Opening in singledoc mode, insert, choose if merging or not
- If merging, merge additional IFC
- If not, creating a doc object. Any changes to that doc object must take precedence over host doc
- I am creating an IFC file from scratch: Creating a file, choose if singledoc
- I am creating a FreeCAD file from scratch, not only IFC: Creating a file, choose no singledoc
- I am working on a hybrid FreeCAD file containing a BIM model. I want to export the IFC data consistently while still being able to modify the BIM objects with normal tools
- I am working on an IFC file and I want to produce 2D documents out of it, I want to benefit of the full FreeCAD 2D capabilities while saving the result as IFC data
- Installing
- Usage
- IfcOpenShell code examples
- IfcOpenShell github
- IfcOpenShell docs
- BlenderBIM docs
- IfcOpenShell matrix structure
- IfcOpenShell to FreeCAD matrix conversion
Tests performed on a AMD Ryzen 9 5900HX
File | File size | Import time (shape) | Import time (coin) | BlenderBIM |
---|---|---|---|---|
IfcOpenHouse | 0.1Mb | < 1s | < 1s | < 1s |
AC20 FCK Haus | 2.6Mb | 2s | 1s | 1s |
Schultz residence | 22Mb | 27s | 6s | 5s |
King Street simplified | 26Mb | 1m17s | 34s | 14s |
Schependomlaan | 49Mb | 21s | 6s | 5s |
King Street full | 155Mb | Fails | 46s | 36s |
Nineteen plots | 4.3Mb | 40s | 10s | 4s |
This project is sponsored by: