FreeCAD BIM update 28

screenshot of FreeCAD with the included BIM example file opened and converted to IFC

Hello there!

You thought nothing happened during the winter holidays? You thought wrong. We have a lot of new stuff on the table.

By the way, the house in the image above, that we use as the built-in BIM example in FreeCAD, is on sale

Support for types

It took a while to understand how I wanted to do this, but it's finally in: There is now support for types in FreeCAD's native IFC module. It is still not finished and not totally useful yet, but the system is there, and usable.

Basically, it's very simple: Each native IFC object now has a Type property. That property is a link property that points to another object. You can point it to a type object (any native IFC object with a corresponding type, for ex: An IfcWall object can have an IfcWallType object as its type), and that's done, your wall will be using that other object as its type.

The mechanism is there so if you use a wrong object as a type (a non-native IFC object, or an nativeIFC object of the wrong class), it simply won't work and you'll get notified.

Creating a new type is extremely easy: You create a wall first, then you convert it to a WallType by right-clicking it and choosing IFC -> Convert to Type. You'll be offered to keep your wall object or not.

Once your object uses a type, that change is immediately done in the IFC file, and nothing might change immediately or apparently in FreeCAD. Basically there is much more that we still need to refactor, for example multilayered walls and profile-based structural members. That's on my TODO list. But semantically, the wall will correctly be registered as using the WallType, and any property you add to the WallType will apply.

Pull request: BIM: NativeIFC: Support for types · Pull Request #18264

Support for classification systems

screenshot of FreeCAD showing the classification manager open, and editing an IFC object

The BIM workbench already had support for classification systems, and that same system has simply been extended to native IFC objects. As a guideline through all this work, my main idea is always to try to seamlessly join BIM functionality and native IFC, so the same tools, concepts and everything apply transparently to both modes.

So you can now either:

  1. Fire the classification manager, select native IFC or non-native IFC objects in the left panel, and apply a classification

  2. Select objects, be them native IFC or not, fire the classification manager and pick a classification

To ease the download of classification systems, that are not included in FreeCAD by default, a new macro allows to download them all automatically at once.

There is little standard in IFC for classification systems, basically 3 entities are created: 1) A classification system, 2) a classification number, related to the system, and 3) the objects that use that number. Classification systems and numbers are defined by a piece of text, so I did what seemed logical there, but there is still room for improvement of course.

Pull request: BIM: Quantities support for nativeIFC objects · Pull Request #18689

Support for quantities

screenshot of FreeCAD with the quantities manager open, and a standard quantity set loaded

Explicit quantities in IFC are a super useful and also dangerous mechanism: It allows to write, together with an object, a series of quantities similarly to properties. For example, together with a wall, you could write 3 quantities: width, length and height. That allows other, non-graphical applications (a spreadsheet application, for example), to open the IFC file, and extract quantities without having to understand the object geometry, which those apps are not equipped for.

The bad side, of course, is that you could lie: You could state that your wall has a length of 3 meters when its geometry is actually 3.2m long.

So in FreeCAD, exporting quantities is not something automatic. You need to explicitly specify which object you want to export explicit quantities for, and which quantities. In most cases, you won't want to do that, and rely on the sole geometry to define the quantities. Also because it adds a fair quantity of data, which makes little sense if it won't be used.

Defining explicit quantities for objects was already possible in the BIM workbench, using the quantities manager. Well, good news, that tool has been extended to support native IFC objects too, so basically, here too, nothing changes!

Actually one thing changes: in IFC, quantities have a similar system as properties: There are "standard" quantity sets for different object types such as beams, walls, etc. The quantities manager has gained an extra button that allows you to automatically apply such a standard set to selected objects.

Pull request: BIM: Quantities support for nativeIFC objects - Pull Request #18689

FOSDEM

Just a last note about FOSDEM, the famous open-source week-end that happens in Brussels each year, it is in less that two weeks now, and there will be much FreeCAD content there and around. Read the blog post to know all the details! See you there maybe?

That´s all for this week I guess! Thank you once again to everybody who sponsors my FreeCAD BIM work on Patreon, LiberaPay or GitHub!

Cheers

Yorik