FreeCAD BIM weekly update 6

Hi all!

Time passes, and we are here already at our sixth weekly update showing what I have been doing this week with FreeCAD, specifically on the BIM and NativeIFC fronts. Much of the stuff I was working on last week is now ready:

  • NativeIFC: ifcization: The NativeIFC toolbox now possess a pretty important tool that will be used everywhere: an ifc_tools.aggregate(object, parent) function. It takes any kind of FreeCAD object as a first argument, and aggregates it to whatever NativeIFC object. The base object will be converted to IFC and added to the IFC document the parent belongs to. I just tested this with simple objects likes walls and cubes so far, but the idea is to support each and every BIM or FreeCAD object. So the idea here is that later on all BIM tools will ifcize their production if they are in an NativeIFC environment. Under the hood, the ifcization currently relies on the current Arch IFC export structure, so expect the exact same type of object to be created in your IFC file. We can see later on if this needs to be changed. commit

  • NativeIFC: schema switching: IFC document objects now have a "Schema" property which is set to the schema of the file when loading. It allows you to change the schema to any other supported by your version of ifcopenshell. A word of warning, though, this is done through some deep ifcopenshell magic, and I think it has not been extensively tested, and as far as I did test gives some strange and puzzling results. The functionality is there in FreeCAD, but use it at your own risk If you use this through the GUI, though, a warning message will be shown before doing it. commit

  • NativeIFC: Talk with Moult: I also had a great talk with Dion Moult, the main developer of BlenderBIM. We reviewed the FreeCAD NativeIFC code together, and I got a load of hints and ideas. Dion has an incredible understanding of the IFC file format, and it is always so refreshing when he says "remove all that crap, you don't need it" The more I work with IFC, the more I realize how actually flexible and simple it can be, how the legendary awful load of complexity you find in many IFC files is actually pretty bad exporting by many BIM applications. If you ever worked, at the dawn of the internet, with HTML files generated by MS Word, you'll know what I'm talking about It's not entirely false to say those apps don´t give a shit, pardon the poor wording, about the quality of the IFC contents they produce... Anyway, don't let me rant more. I got many clues to remove unnecessary stuff, use more built-in ifcopenshell functionality, and later on transfer some parts of the NativeIFC addon upstream to ifcopenshell, which is thrilling as it will give ifcopenshell natively more ability to work with FreeCAD.

  • NativeIFC: More unit tests: Unit tests now test creating a full IFC file from scratch, usinfg the aggregate tool above. This will ensure that the whole process is always well tuned and functional. commit

  • NativeIFC: Diff tool: When an IFC project is marked as modified with a red dot, a "View diff..." right-click context menu option becomes available, which opens a dialog window that shows the diff between the saved version of the IFC document and the unsaved version, the one that is currently being edited. Later on we can think of more fancy things, such as being able to hover or click the lines and highlight the corresponding object in the FreeCAD 3D view. commit

That's it for this week! As always, thanks to everybody who sponsors me on Patreon, LiberaPay or GitHub!