2023.02.16

Hi all!

Great news, I received a good funding from OpenToolChain foundation to work on, among other things, the NativeIFC add-on for FreeCAD. I'll take the opportunity to try to get back to more regular blogging. I invested a lot of time last year into the FPA, this blog suffered from it, and my efforts to get back at it have failed miserably

So during the coming weeks I'll try posting here shorter, weekly updates of what I am working on with FreeCAD, BIM and the NativeIFC add-on. Hopefully we'll create a healthy habit!

For who is curious of what we already have and where we are going, I maintain a list of goals on the NativeIFC github repository. Hopefully, we get to the end of the list sooner than I thought!

Thanks again to everybody who sponsors me on Patreon, LiberaPay or GitHub! A large part of my working hours have been dedicated to FreeCAD, for years now, and that's thanks to you!

Here are what I have been doing this week:

  • NativeIFC: Massive performance improvement. Reasonably large files import now in less than a minute, which is comparable to BlenderBIM's performance, and is generally considered good. Setting solid bases with a good and powerful model seem pretty important to me, before going further and developing more features. This is now done, and we can move on.

  • NativeIFC: Per-file cache system: The NativeIFC now disposes of a good caching system, so shapes that have already been generated out of IFC objects don't need to be generated another time when revealing children. This makes the "expand children" operations pretty fast now.

  • FreeCAD: Option to hide scrollbars on start page: I was always annoyed that these scrollbars are rendered by the web engine, and therefore look different than the main application scrollbars. There is now an option in Start preferences to hide them. Scrolling is still possible using mouse wheel, arrow keys or touchpad, though.

  • FreeCAD: Allow to define import modules on start page: If you click a file, for example an IFC file on the start page, it will be opened using the first available importer module, even if several are available on your system. You can now define an import module to use for a specific file type instead of the default one.

  • NativeIFC: Open files on vanilla FreeCAD: FreeCAD files containing NativeIFC objects will now open without errors on a FreeCAD installation that has no NativeIFC add-on installed. It will inform you that the NativeIFC add-on is needed for viewing and editing, but you can still view the contents of the object.

That's it for this week, check back next week for more!

2023.02.23

Hi all,

A short overview of what I've been working on this week:

  • NativeIFC: unit tests: Unit tests are a fundamental stone of any software project. It is basically a suite of programs which test the different functionalities of the software, basically "mimicking" what the user would do. So each time you make a change to the code, by running the tests you do the same as opening FreeCAD and testing if everything still works well. This ensures your code changes don't introduce new bugs or make some functionality cease to work, automatically. The NativeIFC add-on now has proper unit tests, which you can try by running FreeCAD -t ifc_selftest from a terminal, or opening FreeCAD then switching to the Test Workbench, pressing the "self test" button and choosing ifc_selftest in the list. See commit

  • NativeIFC: Methods to handle changes to ifcopenshell object: This is not done yet, but a work in progress following this discussion. The aim is to give more flexibility to the Python coder to interact with the ifcopenshell engine.

  • FreeCAD: Start page redesign ideas: The start page hasn't been changed for a long time. Among some changes I am looking into, are 1) a "first time" wizard, which would guide the first-time FreeCAD users through some typical scenarios, 2) fetch updates from the FreeCAD blog and 3) redesign the "Help" tab to give more immediate and general overview of the documentation, through the use of the Help workbench.

  • GSoC organizing: As you might have seen, FreeCAD is accepted as an org in Google Summer of Code 2023! So I've spent some time setting everything up so we are ready to welcome potential interested students. Do you know any student who might be interested in participating? Send them to us!

  • FreeCAD: Per-document Draft working plane: Up to now, the Draft working plane is kept as one instance through your entire FreeCAD session. So if you have several documents open, they all share the same working plane. We aim at changing this so each document, and even each view, has its own working plane, and that working plane would be restored on file load. Discussion

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

2023.03.09

Hi all!

Following with our third weekly update, showing what I have been doing this week with FreeCAD, specifically on the BIM and NativeIFC fronts. Sorry for the lack of update last week, I happen to have had caught Covid and I decided to give me a week off. But here we are, back into action:

  • NativeIFC: Save IFC as: When right-clicking an IFC project object, you now have a new "Save as" option, next to the "Save" action. When using it, you can save the attached IFC document as another file. This can be useful for example to compare the current state with the original file. After saving, you will be asked if you want this new file to become the linked IFC file of the project. commit
  • NativeIFC: Document observer: A new document observer is now in place whenever you launch FreeCAD with the NativeIFC addoninstalled. It monitors opened FreeCAD document containing IFC documents, and if any of them is saved, you will be asked if the IFC documents must be saved too (you can mark the answer as "do this always"). commit
  • NativeIFC: Late loading of coin representation: When loading an IFC file, besides "Full shape" and "Coin representation only", you can now choose "No representation". This will load the entire IFC document without rendering anything in the 3D view. This turns the loading of huge files very fast. You can still explore the document structure, and choose to render anything you need later, by right-clicking an object and choosing "Load representation". commit
  • FreeCAD: Moved BIM Layers manager to Draft: Starting to move some sensitive and well-tested features from the BIM workbench to FreeCAD, I started with the layers manager, which finally offers a decent manager to deal with your Draft layers. The new layer manager appears on theBIM and Draft toolbars, and in the Draft and Arch menus. PR
  • FreeCAD: Fixed usage of the Draft grid: The different preferences options aimed at setting the behaviour of the Draft grid were not funcionning properly, this is now solved. issue - PR

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

2023.03.15

Hi all!

Here goes our fourth weekly update, showing what I have been doing this week with FreeCAD, specifically on the BIM and NativeIFC fronts. Here is what we have this week:

  • NativeIFC: Ability to create an IFC doc from scratch: For now, it's available from Python only. The idea I have with the NativeIFC addon is not to have any UI tools on its own, but rather modify progressively all tools of the BIM workbench to work with NativeIFC. So the idea here is to have the Project tool handle this. But I'm still not 100% sure how to integrate that seamlessly and meaningfully, so for now this is not available via the UI. To test from Python, just run import ifc_tools; ifc_tools.create_document(FreeCAD.ActiveDocument). commit
  • NativeIFC: Tested workflow to create 2D views: I tested a bit how easy it is to generate 2D views from a NativeIFC file. Basically it works out of the box, as long as the objects have their shapes loaded. More work is needed, though, to handle cases such as container objects (need to include subobjects), autoload shapes when needed, or handle materials for the "Arch Fuse" property. screenshot of FreeCAD showing 2D views of a model
  • FreeCAD: Fixed DWG export output message: There is now a more meaningful message when a valid DWG exporter is not found PR
  • NativeIFC: Documentation: I started writing documentaiton for the NativeIFC addon. So far it's found on the NativeIFC README page but the idea is of course to elaborate and detail it further and move it to a more appropriate place later on.
  • NativeIFC: Handle change of properties: Each IFC type has a different set of attributes. Up to now, when you changed the IFC class of an object, the attributes were not rebuilt. This is now solved. commit

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

2023.03.24

Hi all!

Time for our fifth weekly update, showing what I have been doing this week with FreeCAD, specifically on the BIM and NativeIFC fronts. No new features this week but a lot of research and perparation:

  • NativeIFC: Exploring BBIM 2D output: One of the big stones in our shoes in a BIM workflow in FreeCAD, is the long time it takes for FreeCAD's - actually OpenCasCade's - HLR (Hidden Line Removal) algorithm to generate a 2D view of a model. BlenderBIM features a very fast 2D representation system, that is entirely done with IfcOpenShell. I am exploring how it works, and how it could be used in FreeCAD in place of the OpenCasCade algorithm. issue

  • NativeIFC: Enabled NativeIFC in BIM project tool: One of the original ideas of the NativeIFC mdodule is to not provide its own tools but rather integrate in the current FreeCAD BIM workflow. Since last week I implemented a Python method to create an IFC document from scratch, I now tied it to the BIM Workbench, as a proof of concept. Now, in the BIM workbench, if NativeIFC is installed, the Project tool will now create a NativeIFC project instead of the usual Arch Project. You will notice that the icon has an IFC overlay, to indicate that command is NativeIFC-enabled. Is it a good way forward? Tell me! commit

  • NativeIFC: Explored schema change: IfcOpenShell allows to change the schema of a file, currently only between IFC2x3 and IFC4. I am exploring how to integrate that within NativeIFC IFC documents. issue - branch

  • BIM: perpared removal of units selector: A global, FreeCAD-wide units selector in the status bar has recently landed in FreeCAD's master repo, turning the units selector in BIM obsolete. I prepared a commit to remove it, that will be merged once the main feature has arived to a stable release. PR

  • NativeIFC: Started translating BIM/FreeCAD objects to NativeIFC: Since the creation of a new IFC document works very well, it's now time to attack other kinds of objects. Since we already have a good workflow in BIM, a first way of doing it is pretty straightforward and obvious: We let people create normal, usual BIM objects, then we turn them into IFC objects, and integrate them to an IFC document. Most of the work is there already, as we can use our current IFC exporter to convert BIM objects (or any other FreeCAD object) to IFC. So I started to work on a simple structure that takes an object, "ifcize" it, and adds it to a given IFC document. This should get us pretty far already, and enabling NativeIFC for existing BIM tools should be just a matter of adding one line that ifcizes the object after it's created. Later on, the ifcizing system can also be used in drag and drop operations. And even later on, we can begin to think if any of those BIM tools needs to be adapted any further.

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

2023.03.31

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!

2023.04.14

Hi all!

Here is the seventh weekly update showing what I ham doing this week with FreeCAD, specifically on the BIM and NativeIFC fronts. Sorry about the missing update last week, school holidays and kids got the priority

  • NativeIFC: Edit placements: This has been a bit of a headache, because of several aspects: 1) Placements in IFC are notoriously a complex affair, 2) Placement matrixes are different in FreeCAD and IfcOpenShell, and 3) Placement properties are triggered pretty often in FreeCAD, and there was a whole question of sorting out when the IFC placement of the object needed to be updated. This is now all (hopefully) sorted out, and you can now edit placements of IFC objects in FreeCAD, which will correctly reflect on the stored IFC placement. This means changing the placement of an object manually works, but also all other commands that work on placements, such as the Move command. As this is using the IfcOpenShell API, all needed internal complexity of dealing with local and relative placements is taken care of magically! commit
  • FreeCAD: Draft memory leak: The Draft workbench has since a very long time a nasty memory leak, which means the memory usage is increasing during use. Usually this is normal when running a program, as structures (data, variables, etc...) are created during the execution, that take space in memory. However, there are usually destruction mechanisms in place, for example all variables or objects created inside a function are automatically destroyed when the function ends, or there are garbage collection systems that automatically clean up unused variables and data structures. A memory leak occurs when something escaped these mechanisms and is not automatically destroyed, and is recursively being created, which makes the memory consumption raise over time. The Draft workbench has had one of these for a long time. To see the effect by yourself, you just need to start a Draft command such as Line, click a point and simply hover your mouse around instead of clicking the second point. If you watch the memory consumption (for example running top -p pidof \freecad`` in a terminal), you will see a small memory increase. This used to be huge, and is now mostly solved, as the garbage collection manages to keep it under control and on the long run, memory usage does not increase anymore. There is however still some minor leak happening, that I couldn't pinpoint yet. There are so many things happening in Draft, with so many different parts of FreeCAD involved (Qt interface, widgets on the Coin3D view,...) that it turns debugging very difficult. issue - PR
  • NativeIFC: Allow to delete objects: Deleting an object in FreeCAD now correctly deletes the corresponding object in the IFC file. As usual when using the IfcOpenShell API, everything is taken care of automatically, and all needed subobjects and dependencies are deleted automatically too. As always, when you perform an operation that affects internal IFC objects, the project object is marked as modified, and by right-clicking it in the tree view you can select "Show Diff..." to see the modifications that have been made to the IFC file. This is a great way to make sure the right operation was done. commit
  • NativeIFC: Allow to shrink children: You can now perform the reverse operation to "Expand children": When an object has its children expanded, you can now reverse the operation by right-clicking the object and choosing "Shrink children". The child objects (and all their descendents too) will be removed from the FreeCAD document, causing the base object to gather and show the shapes of them all. This allows you to keep your FreeCAD document fast and light, even when working on large IFC files, by shrinking the structures you don't need to edit. commit

That's it for this week I guess! As always, thanks to everybody who sponsors me on Patreon, LiberaPay or GitHub! As a side note, the OpenToolChain Foundation grant I have received to help funding this project has officially ended, but I am a bit late on schedule and have not finished the entirety of what I had promised them (What is missing is basically be able to create NativeIFC elements with the BIM workbench tools) We are very close to it anyway, all the internal structure is in place, we just need to tie that up to the BIM commands. This will be done in the next weeks (I still want to work on drag & dropping first to make it really perfect).

I am really liking posting these weekly updates, for once it motivates me a lot to produce stuff every week, and also it syncs nicely with the weekly updates on the FreeCAD blog. So although this had started as a form of reporting related to the OTCF grant, I'm going to continue this for a while. Thanks to all of you who show support for this!

2023.04.21

  • Drag and drop
  • Documentation

2023.04.30

Hi all!

Here is the ninth weekly update showing what I ham doing this week with FreeCAD, specifically on the BIM and NativeIFC fronts. No big feature in, but I attacked several past issues this week:

  • NativeIFC: Default project structure: When you create a new project from scratch using the BIM Project tool, you will now see a dialog asking if you also wish to create a default project structure (Site, Building and Storey) under it. Note that this is not strictly mandatory by the IFC specs, you can very well have a flat file where all objects are simply related to a (mandatory) IfcProject. However, this site -> building -> storey structure is considered by many BIM applications as a standard. Your choice! commit

  • NativeIFC: Better attributes handling: I reenabled the display of non-link attributes (those that don't link to other IFC entities) by default when importing a file, as it seems to me they cannot change the geommetry or affect other objects so they should be safe for now, but this needs to be explored further. The "Description" property contents will also now show in the "Descriptipn" column of the FreeCAD tree view. commit

  • NativeIFC: Support for IfcSpaces: Spaces are now handled, displayed in the tre view when importing the project structure or expanding the children of an object. You can also add objects to an IfcSpace. The shape of IfcSpaces is shown in wireframe mode in the 3D view when the shape is loaded. In coin mode, you don't see anything in the 3D view (for now... better ideas are welcome). commit

  • NativeIFC: Loading of orphan objects: An IFC file might contain objects that are not related to an IFC project. This is not standard, but it is still used around and might even actually be a useful thing, for example in Work-In-Progress files where it was not clear to the author what would become of a certain object. In the import dialog, there is now an option to import these "orphan" objects. They will be placed into a special group under the project object. This feature is not complete yet, because we still need to permit people to add their own objects to that group. commit - issue

  • NativeIFC: First steps towards geometry edition: This is probably the most exciting feature of the lot: The ability to edit IFC objects. This is still an experiment to see if this is a valid path to follow, but it's proving really interesting so far. Basically, objects gained a new "expand geometry properties" right-click menu option. When that option is clicked, a new "Geometry" property group is created, and a few properties are added to it tha allow to edit the geometry. So far, you can edit the extrusion depth and direction of extruded objects, and length and width of their profile, if that profile is a rectangle. This works really well for Arch walls and structures (rectangular beams and columns). I'll add more types on the way. There is more to iron out too, such as updating the object history. And later on, of course, we should integrate all this in an edit mode and implement tools to edit these values graphically. But I think this is a pretty interesting start.

That's it for this week! The video will come soon, I promise As always, thanks to everybody who sponsors me on Patreon, LiberaPay or GitHub!

2023.05.05

  • rotation bug
  • polyline extrusions
  • group extension
  • appimages
  • gsoc

2023.05.25

Hi all!

Here is the twelfth weekly update showing what I ham doing this week with FreeCAD, specifically on the BIM and NativeIFC fronts. Sorry about the missed update last week, and the few novelties in this update, but we're now all pretty busy with the approaching FreeCAD release, I ended up having less yummy stuff to report. Nevertheless, here are the news for this week:

  • FreeCAD: release 0.21: As you might have seen in the mass media on social networks, we are preparing a new release of FreeCAD, which will be labeled 0.21. Hopefully, that's the last one before the big 1.0. We wanted this one to be 1.0 already, but it's better to do this the right way and given things the time they need than trying to stick to a predefined plan. After this 0.21 release, we will start merging toponaming code that can affect FreeCAD performance too, so it also makes sense to have a stable version now. The release date will depend on many factors, but we estimate it should be ready in about one month from now. announcement - help us!

  • NativeIFC: support for doors and windows: You can now create windows and doors from scratch in FreeCAD and add them to a NativeIFC project. The workflow is the same as other NativeIFC-ready objects, you create a window or a door using usual BIM or Arch tools, then you drag and drop it onto a wall. Simple as that! An opening will be generated automatically and the necessary relationships added to the IFC document. If you use other tools than Arch/BIM to model your window, make sure it has a "Subvolume" property pointing to a shape object that defines the opening volume otherwise no opening will be created in the host object. commit

  • NativeIFC: editing openings: When expanding individual IFC objects, windows and doors are shown embedded into their parent object (typically a wall). When expanding the children of that wall, both the opening element (which creates the "subtraction" in the wall) and the window or door that fits ito it get revealed. So we now have a possibility to edit the opening too, by moving it together with the window, or changing its extrusion parameters if it is extruded. commit

  • FreeCAD: Misc fixes: I also did a couple more BIM-related fixes in FreeCAD:

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

2023.06.08


Archives: