FreeCAD BIM update 19

One more weekly report of what I've been doing this week in FreeCAD, BIM and NativeIFC:

the casa Martirani by Artigas, modeled in FreeCAD


The saving system is now up and working. There are basically two modes, depending on the locked state of the document:

  1. Your document is locked (The FreeCAD document is the IFC document): The "save" command of FreeCAD is replaced by the IFC save command. If you press Ctrl+S, or use menu File->Save, you will be saving the IFC file, no FreeCAD file is saved. There is still one little problem, you will still get warned by FreeCAD that you didn't save the file on closing it. But I'm working towards having this solved.

  2. Your document is unlocked (You have both FreeCAD objects and IFC objects): When you save your document, as a FreeCAD file, all IFC projects inside it get saved too automatically.

So to resume, you just need to worry about saving your document. Everything that is IFC is saved automatically.

Still some minor improvements still need to be done, like:

  • Solving the document marked as unsaved problem I described above

  • Also replace the save button on the File toolbar, when in locked mode

  • Also replace the "Save As..." command when in locked mode

commits: 18dc454

Support for groups

IfcGroups are now properly rendered and populated when opening an IFC file. Most IFC files I've seen out there use IfcGroups as a kind of layers system. You have layers described once in the file, and they just contain different objects.

In FreeCAD, however, groups are used in a much more powerful way: You can embed them inside other structures like buildings or storeys. This is actually supported in IFC as well, only not used. I believe FreeCAD was the first application to ever support that feature (It has been working in the BIM workbench for a long time). This is now correctly working in NativeIFC as well.

commit: b454cb9

Converting to IFC project

After the lock/unlock system we introduced last week, one more step was needed, which is to allow you to easily convert part of your FreeCAD project to a NativeIFC project.

When working on an architecture project, we often want more freedom than what the rigid IFC structure allows. I would even say those are opposite advantages: At some stage of project development, you want a freedom that IFC can't offer you. But at some other, later stage, you need the contrary: You WANT the IFC schema to come into place and restrict how things can be dome. Because restriction also means it helps you to stick to the standard. It actually becomes a good thing, what is non-standard is not permitted.

FreeCAD often plays with these two concepts, and I like that a lot. Part has no restriction, PartDesign is a restricted environment. In CAD and BIM, we often need one and the other at different moments.

So a workflow I find really powerful in FreeCAD is to allow you to develop your project without thinking much about anything else than space, volume and structure. That's not a moment you should have to think about BIM stuff. You should be thinking about architecture.

Later on, though, things get very different: If more people will be working with you on the project, then having your model standardized, analyzable, versionable, is the best way to make it trustable when it goes and comes back from different project developers. That's what IFC is good at. So at some point, your model is mature enough, and we now have a "Convert to IFC project" command for that. Select objects, often the top container of your model (a group or BuildingPart), run the command, and it's done, it's converted into an IFC document.

Internally, it uses the Arch IFC export to export the selected object to IFC, deletes them from the document, and reimports the saved IFC file. Simple as that.

If some of the objects to be deleted have external dependencies, that is, if some other object depend on them, they are not deleted so your model does not break. That is not ideal, though, as this will likely not avoid model breaking. But it is at least easier to track what needs to be changed. But we might need further work on this. Maybe pop up a dialog to warn the user?

commits: 18dc454

Outside the above, I also fixed a number of bugs.

the casa Martirani modeled in FreeCAD

The images I used to illustrate this article are of a wonderful house by Brazilian architect Vilanova Artigas (this links to the site of the famous architecture photographer Nelson Kon, go see, lots of stunning Brazilian modernist stuff there). I am building a new (free of course) BIM course for Solare where I'm using that house as a model. Although that course is in Portuguese, I'll make sure to make English captions available too.

The University of São Paulo as all the original drawings of that house in their archive, it's amazing to see them, it says a lot about Artigas's creative process.

collage of Artigas's drawings

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