BIM/Arch development news articles from Yorik's blog

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by yorik »

Repost from https://yorik.uncreated.net/blog/2022-006-nativeifc

Image
Hi everybody,

Sorry for the long time without posting! Each time I think it'll be easy to get back to blog often, and each time something happens that makes the plan fail miserably :/

The main reason is basically the new non-profit association behind FreeCAD, the FPA. It's taking me a lot of time, mostly because managing an NGO is pretty new for me and other FPA admins, so we have a lot to learn form scratch. The FPA is a huge success so far, though, money is coming in fast, and we are doing our best to start spending it well and responsibly. A huge thank you to everybody who has kept supporting me on Patreon, or [url=https://github.com/sponsors/yorikvanhavre]GitHub. This allowed us to do a lot, and the FPA would not be there without you.

I have some stuff to show to make a regular FreeCAD BIM development update, but I'll leave that for another post. What I want to show this time is a brand-new kick-ass concept: NativeIFC support in FreeCAD.

Image

The concept is basically what is behind BlenderBIM: The ability to edit IFC files natively, but this time in [FreeCAD](https://freecad.org). Most (all?) BIM applications out there, including FreeCAD up to now, do something else: When they open an IFC file, they convert all of its contents to the native format of the application. When exporting to IFC, they do the contrary, convert from their format to the IFC format. This double conversion, as you can easily imagine, is responsible for a considerable amount of data change or loss. It is not rare that only changing one wall in an IFC file changes each and every line of the file.

Image

The IFC format is actually a text format. One line is one entity like a point, a line, a wall, etc. If you change one entity, the logic would be that only that line would change.

This would have inumerous advantages: by comparing the file, before and after an edit (there are inumerous tools out there to compare two text files and pinpoint the differences) it becomes very easy to spot what has changed, and also to make sure nothing else has changed. If you want to read more, be sure to check Bruno Postle's excellent paper which sets the base for the NativeIFC concept.

The BlenderBIM people have put a lot of effort into BlenderBIM and its base component IfcOpenShell to support native editing of IFC files. In Blender, with the BlenderBIM addon, you can now open an IFC file, edit its contents or add new content to it, and you'll be actually editing the IFC data of the file directly. No more conversion involved.

Image
Image of BlenderBIM borrowed from osarch

Since FreeCAD also uses IfcOpenShell, and also since several other Free and Open-Source BIM tools are embracing the NativeIFC concept, it was high time for FreeCAD to join the band and implement it too.

So I proudly present you the new baby: the NativeIFC addon for FreeCAD. Note that this is a common effort, besides me other FreeCAD and BlenderBIM developers are also involved.

What can it do so far, will you ask me?

Well, basically open or import an IFC file, allow you to expand and explore its contents, and modify object attributes such as name, description, etc, and save the file back. After saving, you'll get the exact same IFC file, with as only differences the attributes that you changed.

Image
Expanding child objects

Image
Altering a parameter of an object

Image
Saving the IFC file

Image
Only what you changed in FreeCAD has changed in the file

Everything you do in FreeCAD is affecting directly the IFC data, which is kept in sync at all times. It is also the IFC data that produces the geometry you see and manipulate in FreeCAD. In fact, what you see in FreeCAD is basically a visual interface to the IFC content.

Of course there is much more to come so all this becomes part of a fast and fluent workflow, but this above is essentially what the addon will allow you to do. My plan at the moment is not to develop a new workbench for it, but rather integrate it with other existing workbenches such as the BIM workbench so they become NativeIFC-aware.

You can already install the addon and test, all the needed instructions are given on the addon page. Don't expect stunning performance yet (although it is already by far faster than the current IFC importers we use in FreeCAD), because there is much space for optimization that haven't been touched yet. Once we have a good workflow in place we'll work more on that side. But we should be able to obtain the same performance we have with BlenderBIM, which is already capable of swallowing huge IFC files with ease.

That's it for now, thanks for reading, don't hesitate to join the adventure by leaving me comments or open issues on the github repo if you have good ideas!
Mitchell
Posts: 1
Joined: Sat Jan 01, 2022 9:23 pm

Re: BIM/Arch development news articles from Yorik's blog

Post by Mitchell »

benkoren wrote: Mon Mar 14, 2022 1:46 pm
ragohix769 wrote: Thu Jan 20, 2022 12:51 pm
yorik wrote: Thu Jan 20, 2022 10:00 am
paullee wrote: Wed Jan 19, 2022 8:06 pm Just wondering how to choose betwen BuildingPart- Draft Objects- TechDraw ArchView works VS BIM- Draft Shape2DView - TechDraw
All together :)

You make your BIM model, use BuildingParts in it, as levels, buildings or whatever, then you take Shape2Dviews from it, and place these Shape2Dviews in another BuildingPart (which maybe we should rename something like "DraftView"? "DraftViewContainer"? "DraftShapeView"?), there you also add your dimensions, annotations, etc, then you create a TD view from that buildingpart.
It can be a real *huge* help a mini video-tutorial about this flow with a simple house (maybe with 2 level and a stair to undestand a classic flow) as example to pass all from draft => TD with dimension, colors, annotations... because now I'm really confused about all the new tools and names :-)
I'm having quite a bit of trouble with this flow as well, particularly with getting dimensions into TechDraw. Inserting Shape2DViews works just fine, but dimensions are omitted in TechDraw, despite having added them to the BuildingPart. Can you please clarify how this should work?
I have had the same issues trying to show dimensions and draft annotations in TechDraw. As you said Shape2DViews render fairly well but draft text objects have a problem rendering. Also it seems that when I try and use a draft Label or draft Text object using insert Draft Workbench Object the text renders without proper line spacing.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by yorik »

Yes I think a video is really deserved... I'll try to do one soon, promised!
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by yorik »

Cross-posted from https://yorik.uncreated.net/blog/2023-0 ... ad-weekly1

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!
paullee
Veteran
Posts: 5097
Joined: Wed May 04, 2016 3:58 pm

Re: BIM/Arch development news articles from Yorik's blog

Post by paullee »

Excited to learn there are improvements to Native-IFC support :)
User avatar
markko martin
Posts: 64
Joined: Tue Aug 09, 2016 5:51 pm
Location: Italy

Re: BIM/Arch development news articles from Yorik's blog

Post by markko martin »

It's always a pleasure to read Yorik's blog :-)
We missed you so much !
Loris
User avatar
ragohix769
Posts: 565
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: BIM/Arch development news articles from Yorik's blog

Post by ragohix769 »

markko martin wrote: Sun Feb 19, 2023 8:21 am It's always a pleasure to read Yorik's blog :-)
We missed you so much !
I totally agree and quote this one!
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough :-(
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same :-)
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by yorik »

Thanks for the kind comments, people :)

Here it goes:

From https://yorik.uncreated.net/blog/2023-0 ... ad-weekly2

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!
User avatar
ragohix769
Posts: 565
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: BIM/Arch development news articles from Yorik's blog

Post by ragohix769 »

yorik wrote: Tue Feb 28, 2023 12:55 pm Thanks for the kind comments, people :)

Here it goes:

From https://yorik.uncreated.net/blog/2023-0 ... ad-weekly2
👍
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough :-(
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same :-)
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by yorik »

Cross-posting from https://yorik.uncreated.net/blog/2023-0 ... ad-weekly3

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!
Post Reply