BIM/Arch development news articles from Yorik's blog

Here is today’s post from https://yorik.uncreated.net/blog/2023-023-freecad-news-15

Hi all!

Here we are for one more update showing what I am doing currently with FreeCAD, specifically on the BIM and NativeIFC fronts.

These last weeks I had less time to develop BIM/NativeIFC stuff, mostly because of the FreeCAD 0.21 release (be sure to grab yours!), also because what I’m doing now is basically boring refactoring, and also because it’s school holidays now and it’s too cool to spend time with the kids. Anyway, as you might have perceived this is becoming more monthly updates than weekly. Nevertheless, I’m really happy I managed to resume blogging, so I’ll leave it like that and try to post as often as I can. So here we go:

FreeCAD 0.21

The new stable release of FreeCAD is there! There are installers ready for Windows, MacOS and Linux. This release is mostly a last stable release before we start implementing Toponaming mitigation algorithms, which will potentially affect stabilty and performance. On the other side, toponaming issues are the last stone that blocks the way up to the mythical FreeCAD 1.0 release, where we can consider (sort of, we all know such thing does not exist of course, even more for a FOSS project) FreeCAD a “finished product”. So you can expect this release to be the stable, reference release for a time, and, contrarily to what we have done before, we will start advising people to stay with a stable release and not use development release for production, because this time we might really break things on the way :slight_smile:

Even so, here are new features everywhere in this release. The most interesting changes for BIM users are:

  • New spline tools for the sketcher
  • A new, easy-to-use section tool that works interactively, and works for Arch/BIM objects too
  • Better styling tools for texts and dimensions, which now use an unified structure
  • The BIM layer manager is now in Draft too
  • FreeCAD now supports several different DWG converters to import and export DWG files
  • The FEM workbench has received a lot of improvements, and is now more and more fit for civil engineering (see this post and the work of Ebrahim)
  • Revamped addons manager

And much more in all of FreeCAD workbenches. Read on the full release notes for all the details.

Markdown documentation

While we have a Google summer of Code project over migrating the documentation system to a new structure, it will probably still need some time to get finished. So in the meantime I am working to keep the current markdown version up to date, clean and synced with the wiki. This version is used by FreeCAD’s Help module.

NativeIFC refactor

I’m still heavily busy with code refactor for the NativeIFC addon. Not much visible change, but all the code is now much easier to dig into and to read, and I’ve also put a second series of tests into place, to measure and keep track of the performance. All in all, the current code seems strong, reliable and efficient enough, and is now well tested. There are still a couple of less optimized, fuzzy areas, specially in the handling of FreeCAD object properties, but it’s all in good shape.

The goals list I had set up is in good way to be fullfilled soon, then there will be one more big piece to attack: UI, UX and workflows: How to unify all this and the BIM workbench in a cool, easy and convenient user experience. Hence, the following:

BIM Goals for FreeCAD 1.0

I would like very much the 1.0 release of FreeCAD to be a killer release in the BIM area too. So I have this very (or not so much) ambitious goals in my mind:

  • Unification of Arch, BIM and NativeIFC: If we want FreeCAD to be recognized as a mainstream BIM platform, BIM tools should be right there, simply, easily, included, no additional download required
  • Solving of the IFC/non IFC dilemma: Users should be able to use the BIM tools without caring about IFC (for example in other workbenches). But if you work with IFC, everything should work seamlessly, the fact that you are in an IFC environment should be somehow, implicit.
  • Refactor of the window tool: No comments on that one, I think everybody will agree..
  • Moving the IFC export code to IfcOpenShell: This will give IfcOpenShell users much more power to create IFC contents from FreeCAD, which can only benefit the whole open BIM ecosystem.

An additional question I’m toying with is to strip out the paradigm of one FreeCAD document containing different IFC projects, and making the FreeCAD document itself an IFC document. Imagine the possibilities! Each object inside would keep its FreeCAD object characteristics and capabilities! Is it even possible? It needs some experimentation, but the idea is just wild. More about this in the coming weeks..

I’m not sure If I understand it right. Does that mean, that if I modify the IFC inside FreeCAD and add e.g. new parts or place a machine in a Room. It would be possible to store the FreeCAD file of the machine inside the IFC or link a FreeCAD File? So if I Modify the IFC again the FreeCAD data is available?

How would that work If I get an Update of the IFC and I have to replace the machine in the room?

The BIM recommendation is: all ifc files are independent of each other (without a link) and are regularly updated, e.g. put together every 14 days during the construction phase

Sorry, I’m not so deep into IFC/BIM. I look from a view of a User that get a new customer that wish to design something into a specific environment. Mostly a single room. Since around two years. PDFs with room geometry or DXF are dropping and more and more IFC came in. (The IFC mostly contain the whole superstructure instead only the single room needed)

A lot of time get consume with arguing why the current CAD is not able to handle an IFC containing a superstructure with parking lots every Electric plug in and Office-desks sometimes decorated with plants and so on. (sometimes contacts to deal with, understand even less about IFC/BIM).

Sometimes updates arrive. I know it only from two cases. That their customers provide IFC Updates but do not tell if it contains even relevant changes for a job situation. I know people which do not anymore accept jobs if an IFC file is involved.

Unfortunately, the topics ifc and bim are ambiguous. lots of cooks spoil the broth. I have little hope that it will prevail

I really think we need to think as IFC as just the main format to store BIM models. At the moment it is often a bit clunky and unpractical, but that’s exactly what the NativeIFC idea aims at changing: Making it a reliable format. As much as FCStd. So you could basically start your project as an IFC file instead of an FCStd file…

You should indeed still be able to plug some IFC files you received from outside into your main project, of course. That’s one of the main use people do of IFC files. Ex: you get the IFC file of the building, and you use it to design your machines position. Or, you receive the building structure from an engineer, and you build your project around it.

+1

So, we need to update / create every FreeCAD Arch/BIM Objects with IFC in mind so they are ideally interchangeable?

Hope some guide may be available so peoples can help ? :slight_smile:

Right now I’m thinking (and implementing) two modes:

  • “strict” IFC: The FreeCAD document is an IFC document too. Everything you add/remove/change is changed in the IFC file itself
  • “hybrid” IFC: Same as currently: Your FreeCAD document contains both IFC and non-IFC objects.

I think there are use cases for both approaches, so we need both :slight_smile:

I think you’re doing too much work. IFC files are actually only used for referencing, digital twinning and collision checking. The way it is currently in freecad is sufficient

Indeed a lot of work, thought Yorik could make a simple wiki for more peoples to join in the development process to share workload maybe ?

Bitacovir posted in OSArch Yorik’s last blog, the link of the blog is attached below :-

https://yorik.uncreated.net/blog/2023-024-hard-time

It’s not unuseful work. IFC is definitely where we need to go when you start having several people working on a same project. But it is also true that when working alone, IFC is mostly unnecessary. Hence, we need both in FreeCAD :smiley:

Cross-post from https://yorik.uncreated.net/blog/2023-025-new-window-tool

A new window tool

We have a window tool in FreeCAD already. It can do both windows and doors (in the BIM workbench it is split into two tools, window and door, but underneath it’s the same tool). However, it has many limitations and annoyances. It is clear we need a new window tool for FreeCAD that compares decently to other BIM software. It should allow to easily:

  1. Build a window from scratch
  2. Place a window precisely relative to the edges of a wall
  3. Select a window type from a list of predefined types
  4. Change the type of already placed windows
  5. Support advanced annotation display such as opening graphics or tags

Advantages of the current tool

  • It is highly flexible: There is virtually no type of window that you can’t make with it. It can have components of any shape, Any part can be made openable, and even custom parts like handles can be made stick to the openable parts. Openings can also be highly customized.


  • It is compact: The window object is mostly self-contained, and just needs an external shape like a sketch to work.
  • It is based on wire loops, which makes it very intuitive to design. The way you would draw a window in a 2D drawing is what you need to do to build a BIM window.

Problems of the current tool

  • Placement is cumbersome: One mostly needs to place a window into a wall, and position a window relatively to the edges of that wall. Ex: at 100cm from the left border of that wall. That is currently impossible to achieve in one go, one needs to basically place the window anywhere then move it into place
  • No good support for instances: Ideally, in a project, one defines windows types, and you should be able to pick a window in a list of types, and place it. You should also be able to change the type of a window. It should also play nice with IFC types.
  • Creating window components is complicated and non-intuitive. The interface is not well designed.

Conclusions & what we need

  • We need a better placement system. A way to place a window relatively to its host wall. Maybe this could be done entirely with the current Draft placement/grid/snapping system? So it would be usable by other tools as well. Ex:
  1. Place the working plane on the face of a wall
  2. Press the window button
  3. “Snap” an edge, or a vertex
  4. You can now insert coordinatess relative to that vertex or edge
    Basically this could be resumed in a “recenter” snap tool that can recenter the working plane on the currently snapped point:
  5. Define a new shortcut
    2. On pressing that shortcut, the working plane is recentered on the current snap location
    3. Relative coordinates get updated automatically
    4. Auto mode does not change
    5. Also allow to set a working plane on “face and edge” selection
  • We need a better UI for the window tool. Something more streamlined with a proper (tree-based?) view of the components, with a properties view, and what component is subject to what other, and more direct visual feedback on changes. Basically, an UI similar to the FreeCAD combo view. It should take more advantage of the current FreeCAD task system, with more use of collapsible panels, like the Sketcher does.
  • We need support for IFC types with:
  • A way to turn a window into a type, and manage the positioning
    • A way to place a window by choosing a type
    • A way to change the type of a window
    • A way to list windows by type
  • We need to be able to define common components such as frames or panels without the need for a sketch, just by giving dimensions. That would account for the majority of people’s needs and would reduce dependency on other objects.
  • We need a smart way to attach custom components made with other tools and workbenches. This includes also custom opening shapes.
  • We need a way to display additional, custom geometry and text like opening graphics and tag annotations

To conclude, I think the main points here are that we can keep the existing tool structure, but it needs more properties, both to define window parameters and to allow custom components, a new UI, and the Draft snapping system needs additional behaviours.

I think the current window system is wonderful. The only thing I miss is the ability to duplicate windows via array. A workaround is currently needed for this.


BTW
Thank you very much for your wonderful work. Your draft allows for real 3D “sketches” compared to Sketcher, which can only do 2D



example:

https://devtalk.freecad.org/t/challenges/61822/587

Bildschirmfoto_2023-12-20_14-11-31.png

Wow !

Excited to learn the new development direction; interested in understand more about IFC types :smiley:


As with existing Window Tool, a few earlier quick thoughts:-

  1. Window with Several Sketches as Base
  2. Sketch base is fine and simple. Just when sometime when closed loop edges overlap at some part, Sketch fail to return proper Wire.
  3. If Base accept a list of Sketches instead of only one, each may create a particular window component, there will be more flexibility
    With similar concept, using another Sketch with Part Extrude can create a custom opening shape as discussed in Question about custom doors: chamfer, screencapure as shown below.

  1. Placement of Window
    There were several concepts I experimented earlier in my add-on, e.g. (screencapture below)
  2. User-defined Alternative Window Origin
    1. Currently, the ‘origin’ of the Sketch roughly ‘define’ the origin, or ‘insertion point’ in AutoCAD’s concept
    2. Just add another placement attribute and user can e.g. use the mid-point of the bottom edge as its ‘origin’ / ‘insertion point’
      (more discussion in Intuitive Automatic Windows/Doors + Equipment Placement
  3. Pre-defined Alignment / Offset from edge e.g.
  4. Wall Left / Wall Right ( as Left or Right in Align of Wall object)
    2. Midpoint, Start, End etc.

Screenshot from 2023-12-21 01-24-54.png

Great ideas!

Let me also add that I would like to have a library object “empty opening”. I was very surprised when I discovered that there was no such possibility.

Now, in order to get a “hole” in the wall, I need to hide the existing object (but I may not keep track and it may appear again). Or invent your own window with a very thin outerframe and a removed innerframe. Or use Boolean operations and subvolume. All this is inconvenient.

I have created a new topic for the “empty opening” discussion.
https://devtalk.freecad.org/t/create-empty-wall-opening/74583/1

Thanks for the feedback guys!

paullee, some notes:

  1. having several sketches as a base: You can also compound those sketches prior to using them. I think that might be nicer because it will give a cleaner interface. But also, it should be possible to define custom components. So you could make several sketches, create different objects by extruding them, then use these objects as components of your window

  2. the custom placement point is an awesome idea, it would work very well with the placement/working plane idea I explained above

Great! I think the 2nd item about ‘Origin’ of the Window object is easier to achieve; anyone? :slight_smile: