FreeCAD BIM update 18

Here is your weekly dose of FreeCAD, BIM and NativeIFC:

The lock system

screenshot of UI improvements in the BIM workbench

This was merged last week, but I thought I'd explain a bit more how it works.

Basically you get a new little IFC button in the status bar, when using the BIM workbench. This is the IFC lock button, and it can be ON (locked) or OFF (unlocked). (I still think the icon needs a bit more work, maybe look different when locked or unlocked). It works like this:

  • When locked, your FreeCAD document is the IFC document. Everything you add or change happens directly in the IFC file. If you add non-IFC objects, for example from other workbenches, they get instantly converted to IFC. This is perfect when you are working on existing IFC files and you want total control over the changes you make. You cannot add other projects.
  • When unlocked, everything behaves like it does now in the BIM workbench. You can have IFC and non-IFC objects in the file. Only what's inside an IFC project is saved to IFC. This is great while you are still building your project and want the full modeling powers of FreeCAD at your fingertips. This mode also allows you to insert more than one IFC project, so it is suitable too for building "master" documents or check for interferences between different IFC files.

Most of the time, locked/unlocked state is set for you automatically, it can be illustrated by the cases below:

  • If you create a new, blank file, you will be asked if you want it locked or not, unless you have set in the preferences that you want to always start new files locked.

  • If you open an IFC file, you are automatically in locked mode. You need to unlock to be able to add non-IFC objects to that file.

  • If you insert an IFC file into an existing FreeCAD document, the document is automatically unlocked, because it would not be possible to insert an IFC file into another one.

  • If you lock an unlocked file, if you have more than one IFC project inside, it cannot be locked. Otherwise, everything inside the file gets converted to IFC. If there is an IFC project in the file already, that project becomes the IFC document.

  • If you unlock a locked file, the file contents go inside an IFC project object, allowing you to add non-IFC objects on the side.

In a typical workflow, and that's the last piece missing, you mostly start working on a project without caring too much about IFC. At some point when your project is mature enough, and you need to share it with others, you want to go IFC. That does not need you want to get rid of all the FreeCAD stuff around, though. But you'll want to "ifcize" some part of your project.

So that's what I'll add next, the ability to take a part of your FreeCAD model and say: "Okay, this should become an IFC project. Help me to set things up". After that, you decide if you keep working in locked or unlocked mode. My idea is that you, the original author of that file, will keep working in unlocked mode, while other people will use locked mode to make sure they control the changes they do to the file.

commits: b739b77, b739b77

Removal of the file load dialog

There is now no more dialog when opening or inserting an IFC file. Everything has become implicit. The locked/unlocked is automatically set as above, the rendering mode is always set to Coin (the shape is not loaded), and the strategy is always to expand the minimum possible, basically only the project when inserting, or only the site and buildings when opening.

All the other choices are kept off, as everything is late-loaded (they get loaded only when double-clicking an object). So now we always have the fastest possible import. Everything else is loaded as needed.

The dialog is still there though, if you want it. Just turn the option on in the NativeIFC preferences.

commits: a64871a


This is not ready because it required a lot of changes to FreeCAD, which take more time to get merged. Basically, when saving your FreeCAD file, all the needed IFC files are saved automatically too. This is almost fully working, only little problem left, in locked mode, you would not need to save the FreeCAD file anymore. Everything is inside the IFC file. I'm still looking at how to achieve that.

After completing this feature, the first chapter of our new roadmap will be completed too, and we can begin to attack more serious things such as the design tools themselves!

That's it for this week! As usual, thank you to everybody who sponsors this effort on Patreon, LiberaPay or GitHub!