FreeCAD BIM weekly update 13

Hi all!

Here is the thirteenth weekly update showing what I ham doing this week with FreeCAD, BIM and above all NativeIFC:

NativeIFC: hidden project groups

There is a lot of information that needs to be loaded from an IFC file, that is not geometry, for example materials, types, layers, etc... that should be organised inside the IFC project, that should be visible and manageable by the user, at times, but that should also not otherwise pollute your project tree.

All this data is loaded only when you request it (when marking the appropriate checkboxes on the import dialog or by right-clicking an object in the tree) and placed into those hidden groups. You can show them by right-clicking the project and choosing "show hidden items". There is also a preference option under Edit -> Preferences -> I/O -> NativeIFC to have these groups shown by default.


There is, together with this point above, a whole lot of new functionality in NativeIFC that is, at the moment, loosely gathered under the right-click context menu of objects. This is obviously not ideal, and is highly temporary. Simply, putting these things there at the moment is easy programming-wise as all the "UI" stuff is self-contained and in one place.

Obviously, we will need to better think to the UI later on. Ideally, I'd like all these tools to simply vanish, and the needed functionality to be expanded automatically and transparently while you work. I'll start experimenting with that soon.

NativeIFC: Editing the geometry tree

By right-clicking any object, you could already select "show geometry tree" and pop up a dialog window showing the geometry composition of that object. Since geometry can be constructed in a lot of different ways in IFC, this is useful info. Now, that dialog shows a side panel that allows you to select geometric components and modify some of their properties.

This is a work in progress, one step further in exploring possibly smart ways to edit IFC geometry without creating a ton of FreeCAD objects and keeping large models responsive, and might change more in the future. But it's amazing to see how revealing properties like these allows in terms of geometry editing.

And of course, once the "problem" is expressed in properties, the whole UI question next, that is, how to edit these properties graphically, gets much easier to solve. I think we are on a good path there.


NativeIFC: Materials support

Another important item on our list is now done: materials. You can now load all the materials from an IFC file at once, or right-click any object and load its materials. Materials are then stored into one of the hidden groups I described above, and linked to a "Material" property of the object. Within the BIM workbench, you can also create and manage materials the standard way, with the materials manager, and attribute those materials with the same material manager, as if it were a classic, non-NativeIFC material. Under the hood, when attributing a non-NativeIFC to a NativeIFC object, the material gets converted to NativeIFC.

So the basic system is now working, you can view, create and manipulate materials. There are more refinements needed, such as supporting material properties, and probably a better UI workflow, but I guess we need to test a bit how things work now to know better.


NativeIFC: Changed Type property to Class

The current Type property is confusing. Soon we will implement types (families) support. So better change now than later. So from now on, the object type (IfcWall, IfcWindow, etc) is called class.


NativeIFC: Regrouping

You can now drag an IFC element and drop it onto a building or storey, everything gets handled and reorganized smartly. It was actually already possible, but I just checked different scenarios to make sure it works


NativeIFC: Active containers

This is not fully working yet because it needs changes in FreeCAD, but you can now right-click a building structure object, like a building or storey, and make it active. When an object is active, it is highlighted in the tree, and when you create a new object it will automatically be added to it.

Right now you can already mark an object as active, and when the PR is merged, all new BIM objects will automatically be added to it.

commit - PR

FreeCAD: Export of structure axis

IFC objects can have different representations. For example, a wall can have a 3D shape and a 2D shape that is used in plan view (not sed/implemented yet in FreeCAD/NativeIFC, but we'll get there). Another representation type that is very useful, is an axis representation, which is a simple line that describe the object. So far, only the walls used it, but it's also commonly used for stucrtural elements like bams and columns. Now this is also supported in FreeCAD.


NativeIFC: API use + auto changes of IFC file

I reworked a couple of less polished parts of the NativeIFC code, and now each and every action that touches the IFC document (excepting creating new IFC representations, which still use the Arch IFC export code), use the IfcOpenShell API. Besides the increased stability and reliance on IfcOpenShell, it also has the side effect that we always know when the internal IFC file has changed. So we now have a much more reliable way to know that, and we can think of automatic operations such as writing the changes on the fly, or later on plugging to other management systems like Git.


That's it for this week! Thanks again to everybody who sponsors me on Patreon, LiberaPay or GitHub! See you next week or so!