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!
Glovs
Posts: 16
Joined: Mon May 24, 2021 2:47 pm

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

Post by Glovs »

yorik wrote: Thu Mar 30, 2023 9:55 am Ok it's back! Sorry for the arbitrary decision ;)
@yorik I didnt get the update yet, is it already pushed for update, or do I need to get the version in any work around?

Addon-Manager tells me on BIM Plugin:
Version 2021.12.0 installed on 30.03.2023. This is the latest version available for branch master.

Maybe there's something wrong with my Addon Manager - bcause it tells me BIM Version 2021.12.0?
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

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

Post by yorik »

Oh sorry... I had pushed it to the wrong branch :oops: Please check again, it should be there now.
https://github.com/yorikvanhavre/BIM_Wo ... its/master
User avatar
yorik
Founder
Posts: 13664
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-weekly7

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 collapse 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 “Collapse 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!
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

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

Post by saso »

yorik wrote: Fri Apr 14, 2023 10:43 am NativeIFC: Allow to shrink children...
Nice progress! But maybe "collapse" would be a better word to use here?
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

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

Post by yorik »

saso wrote: Fri Apr 14, 2023 11:02 am Nice progress! But maybe "collapse" would be a better word to use here?
Haha i just thought the same thing, implemented and updated the post :)
User avatar
yorik
Founder
Posts: 13664
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-weekly8

Hi all!

Here is the eighth weekly update showing what I ham doing this week with FreeCAD, specifically on the BIM and NativeIFC fronts. Only one real update this week, but a pretty important one:
  • NativeIFC: drag and drop: This took quite some time to thoroughly test and fine-tune, but it is now working satisfyingly. It is basically the GUI counterpart of the aggregate() function I added last time. It allows to take any FreeCAD object, BIM or non-BIM, and add it to a NativeIFC document just by dropping it onto any NativeIFC spatial structure (site, building, storey or space) or object (in which case the new object becomes aggregated to the host object). This basically allows to create just any kind of NativeIFC object. If you drop a non-BIM object such as for example something created with the PartDesign workbench, it will be added as an IfcBuildingElementProxy, which you can then just change to any other type afterwards. In a sense, it is now even more powerful and simpler than using the BIM component tool to “bimize” any other FreeCAD object. One important detail to know, upon doing this, the original dropped object is converted to IFC (currently using the Arch IFC converter, but later we will add that functionality directly to IfcOpenShell), added to the IFC document, and a new FreeCAD object is created from that IFC element. So the original object is lost and cannot be edited with its original tools anymore. This is just temporary, and i’m still looking at a strategy to allow the editing of all IFC elements, not just the ones added from FreeCAD. Maybe making them inherit Arch objects functionality too? I am not sure yet. As of now, we still have workarounds, such as the BIM reextrude tool, which allows us to turn any extruded object editable, but the idea is to have something more robust. Nevertheless, we can already author NativeIFC files fully from scratch in FreeCAD, and it’s a big mark now achieved. commit
  • NativeIFC: Better documentation: I started working on bettering the NativeIFC documentation too, which is also very important. Since there is no real workbench, or UI tool in nativeIFC, I’m thinking of the documentation as a series of “How do I do this?” articles, that would answer common questions you ask yourself when working on a BIM model. Have a look, and would you think of something that needs to be documented, please tell me! (or, even better, make a pull request! ;) )
  • FreeCAD: per-view working planes: I have worked further on this issue too, which is slow due to how complex the Draft workbench has become :) But eventually we’ll get there, and have the proper, flexible working plane system we should have. issue
That’s it for this week! A big item on my todo list is to make a short video showcasing all of the above workflow, but for a better result I’m waiting to have editing capabilities in place, which should basically signify “version 1.0” of this NativeIFC addon. We’re getting there!

As always, thanks to everybody who sponsors me on Patreon, LiberaPay or GitHub! This really helps this to go forward, more than you think.
paullee
Veteran
Posts: 5120
Joined: Wed May 04, 2016 3:58 pm

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

Post by paullee »

Haven't figured out how to create NativeIFC spatial structure object from scratch, can elaborate?

Thanks :)
Screenshot from 2023-04-23 01-42-00.png
Screenshot from 2023-04-23 01-42-00.png (241.02 KiB) Viewed 6017 times
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

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

Post by yorik »

Basically:

1) You create a NativeIFC project
2) Optionally you save the IFC file of that project (right-click -> Save as)
3) You create a BIM wall, the normal way
4) You drag that BIM wall in the tree view and drop it under the NativeIFC project.

You can do the same with everything: Buildings, levels... so you can recreate a whole structure.
paullee
Veteran
Posts: 5120
Joined: Wed May 04, 2016 3:58 pm

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

Post by paullee »

Thanks some findings and more question :)

It seems in BIM WB, the Project button creates a Native IFC project object. In Arch WB, the Project button just a FreeCAD Arch Project object. Correct?


However, trying to drag and drop some Arch objects, like Wall, Site to the Native IFC object return error as shown below. Any idea ?

Thanks again.

Test_ Native IFC Project_ 01.FCStd
(15.5 KiB) Downloaded 73 times
Screenshot from 2023-04-26 03-12-52.png
Screenshot from 2023-04-26 03-12-52.png (227.65 KiB) Viewed 5867 times
User avatar
yorik
Founder
Posts: 13664
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, sorry, I forgot to mention it in the post... You need a fresh new version of FreeCAD with this patch in: https://github.com/FreeCAD/FreeCAD/pull/9304
Post Reply