BIM Workbench

A forum dedicated to the Draft, Arch and BIM workbenches development.
alex_V
Posts: 17
Joined: Wed Aug 08, 2018 5:25 pm

Re: BIM Workbench

Postby alex_V » Tue Jul 09, 2019 9:42 pm

hi guys,
What do you think is the best solution to deal with the size of the files? Currently I am able to connect to my BIM Server (1.5) and keep the session open, then select my project and the revision that I want to download. (I divided the process in 3 steps since FreeCAD crashes dealing with big projects). But my main problem is importing the IFC file, sometimes it takes a really long time, so if I have 2 or more architects working on the same project it would take ages to download, convert to IFC, import the IFC to FreeCAD, and then the other way around.

I really don't know how we can have a single file (project) that could be shared with the users. I thought BIM and IFC could be the answer but i am a little bit lost about how to do it, what do you guys think?
Attachments
revision.png
revision.png (318.25 KiB) Viewed 1878 times
bimserver.png
bimserver.png (211.96 KiB) Viewed 1878 times
Patrick Jörg
Posts: 8
Joined: Fri May 17, 2019 6:03 am

Re: BIM Workbench

Postby Patrick Jörg » Wed Jul 10, 2019 6:23 am

Hi Yorik

Wow, i knew FreeCAD Bim is awesome, but since i am not an architect i never really made a building. Otherwise i would have be stepped on that library tool sooner.

I have access to the API, but still trying to figure out how it works and what i am allowed to do.
You could have a look too at theyr proof of concept: https://github.com/bimobject/public-api ... of-concept
If i'm right you can upload a kind of filter App to theyr website and then access that one.

We have just startet with them, the output is .rfa and .lcf, which is kind of stupid because we have neither of them :lol: . The plan now is to get IFC, so I will see what quality there will be.
User avatar
yorik
Site Admin
Posts: 11577
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: BIM Workbench

Postby yorik » Wed Jul 10, 2019 3:17 pm

The problem of huge IFC files is becoming more and more present...

There are several paths we can follow. One is of course that we need to make IFC import/export in FreeCAD faster. The current bottlenecks are 1) geometry is transferred from IfcOpenShell to FreeCAD as strings, which means extra encoding/decoding operation and 2) creating a lot of document objects in FreeCAD is slow and costly, since objects come with complex series of signal/slot processing.

Issue 2) Can be addressed very well with working with partial IFC files and using Arch References. You can save the contents of an IFC file as one FreeCAD file, place all the objects inside a few BuildingParts, and use an Arch Reference to reference those BuildingParts in another file. In the other file, all objects inside the BuildingParts appear as one object. This allows to scale things up petty far. But it requires a bit of planning as how to "compose" a project using different partial IFC files.

Issue 1) is a bit more complex. Although IfcOpenShell and FreeCAD speak the same geometry language (OpenCasCade's brep format), the data is currently transferred from one to the other as strings.One solution would be to code a new IFC importer in C++, which would be able to manipulate OpenCasCade geometry directly from one app to the other, but there is always the downside of making the importer cryptic for non-C++ coders... The ideal would be to be able to still work in python. We should explore more ways to transfer OCC geometry more "natively" from one to the other, that would work in python (pythonOCC, etc...)
Patrick Jörg wrote:
Wed Jul 10, 2019 6:23 am
I have access to the API, but still trying to figure out how it works and what i am allowed to do.
You could have a look too at theyr proof of concept: https://github.com/bimobject/public-api ... of-concept
If i'm right you can upload a kind of filter App to theyr website and then access that one.
I'll have a better look... It's a pity that instead of writing nice documentation on how to access and use the API, they chose to write cyptic windows-only C sharp code :D
Patrick Jörg
Posts: 8
Joined: Fri May 17, 2019 6:03 am

Re: BIM Workbench

Postby Patrick Jörg » Wed Jul 10, 2019 3:44 pm

I agree that is hard to follow. There is a API Dokumentation when you get the access to theyr developer site, but as far as I can see it only describes how to filter theyr website with some JSON stuff. I will try out more with it when i find the time.
User avatar
Cyril
Posts: 70
Joined: Wed Aug 23, 2017 5:04 pm
Location: Geneva (Switzerland)
Contact:

Re: BIM Workbench

Postby Cyril » Wed Jul 10, 2019 7:56 pm

yorik wrote:
Wed Jul 10, 2019 3:17 pm
The problem of huge IFC files is becoming more and more present...

There are several paths we can follow. One is of course that we need to make IFC import/export in FreeCAD faster. The current bottlenecks are 1) geometry is transferred from IfcOpenShell to FreeCAD as strings, which means extra encoding/decoding operation and 2) creating a lot of document objects in FreeCAD is slow and costly, since objects come with complex series of signal/slot processing.
It is transferred as string because of the issue I am talking about here : Part.__fromPythonOCC__ issue : Segmentation fault ?
yorik wrote:
Wed Jul 10, 2019 3:17 pm
Issue 2) Can be addressed very well with working with partial IFC files and using Arch References. You can save the contents of an IFC file as one FreeCAD file, place all the objects inside a few BuildingParts, and use an Arch Reference to reference those BuildingParts in another file. In the other file, all objects inside the BuildingParts appear as one object. This allows to scale things up petty far. But it requires a bit of planning as how to "compose" a project using different partial IFC files.
For HVAC being able to compute an entire system is a very big advantage and honestly I was making fun of software which requiring to split system at each level to be bearable. :oops:
I have been working on large projects. eg. I was working with and managing multiple 600-700 Mio (Revit->IFC) files for ventilation (4 files), hydraulic (4 files) and plumbing (4 files). I don't expect FreeCAD to be able to handle this kind of project anytime soon but the current bottleneck according to your last blog post talking about 15.20 Mb files is really too low even for smaller projects.
yorik wrote:
Wed Jul 10, 2019 3:17 pm
Issue 1) is a bit more complex. Although IfcOpenShell and FreeCAD speak the same geometry language (OpenCasCade's brep format), the data is currently transferred from one to the other as strings.One solution would be to code a new IFC importer in C++, which would be able to manipulate OpenCasCade geometry directly from one app to the other, but there is always the downside of making the importer cryptic for non-C++ coders... The ideal would be to be able to still work in python. We should explore more ways to transfer OCC geometry more "natively" from one to the other, that would work in python (pythonOCC, etc...)
I agree but we definitely need an improved version.
About your BIM bot I saw somewhere. Isn't it possible to import/export a first heavy file then import/export only changes ? It would partially solve the import/export performance issue.
I was thinking about a hash for element element to see if they have changed but it would probably won't work with IFC as exporter currently recreate everything even on identical elements hash is probably different. Or a «change tag» similar to when you become proprietary of an element on Revit (forbidding anyone else to modify it).
I blog about HVAC / BIM / Energy : pythoncvc.net. If you like you can follow the RSS feed.
User avatar
bernd
Posts: 8479
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: BIM Workbench

Postby bernd » Wed Jul 10, 2019 8:20 pm

Cyril wrote:
Wed Jul 10, 2019 7:56 pm
... the current bottleneck according to your last blog post talking about 15.20 Mb files is really too low even for smaller projects.
I must agree here.

Whereas our ifc files (as structural engineer for concrete) are not more than 20 MB even for bigger projects (FreeCAD handles them very well) the Architecture or HVAC for the same projects had 100 ... 200 MB . FreeCAD did handle them (means it did not crash) but it just took ages to import.
User avatar
Cyril
Posts: 70
Joined: Wed Aug 23, 2017 5:04 pm
Location: Geneva (Switzerland)
Contact:

Re: BIM Workbench

Postby Cyril » Wed Jul 10, 2019 9:15 pm

bernd wrote:
Wed Jul 10, 2019 8:20 pm
FreeCAD did handle them (means it did not crash) but it just took ages to import.
Let's be fair about this I never compared but Revit also takes ages to import / export. (often ≥ 15 minutes for large models I don't know exactly as I took the habit to do something else and forget it for often 1 hour) And when you think it crashed just wait a little more just in case :lol:
I blog about HVAC / BIM / Energy : pythoncvc.net. If you like you can follow the RSS feed.
User avatar
yorik
Site Admin
Posts: 11577
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: BIM Workbench

Postby yorik » Thu Jul 11, 2019 3:19 pm

In most scenarios where I worked with both FreeCAD and Revit, there is a huge difference in size.. A 100Mb Revit model can sometimes correspond to a 10 or 15Mb FreeCAD model... (I fail to understand where all that data goes... The other day I made a simple 200-verts polyline extrusion in Revit, it weighted 70Mb :shock: ) So we must take care of what we're talking about when we say "a 100Mb model".

That said, indeed 100Mb IFC files are not rare. But it also seems to me that it's hugely bloated and often the "real stuff" you extract and use from these files could hold in a couple of Mb. Specially with parametric stuff.

A typical example would be pipes where you actually would only need guidelines and a couple of properties like diameter to recreate the pipe. That would weight just a couple of Kb. In the IFC file, there is often a full triangulated mesh version of that pipe which can quickly go into the Mbs.

Maybe we could also do some heavier parsing of the IFC data prior to real import, and discard more stuff.

Actually that's another point to optimize, the giant parsing operation that starts at https://github.com/FreeCAD/FreeCAD/blob ... FC.py#L340 is inefficient and takes a lot of time. We could optimize that a lot by using the inverse attributes of IFC objects, that IfcOpenShell now supports very well
alex_V
Posts: 17
Joined: Wed Aug 08, 2018 5:25 pm

Re: BIM Workbench

Postby alex_V » Fri Jul 12, 2019 1:53 pm

yorik wrote:
Wed Jul 10, 2019 3:17 pm
There are several paths we can follow. One is of course that we need to make IFC import/export in FreeCAD faster. The current bottlenecks are 1) geometry is transferred from IfcOpenShell to FreeCAD as strings, which means extra encoding/decoding operation and 2) creating a lot of document objects in FreeCAD is slow and costly, since objects come with complex series of signal/slot processing.
It would be cool if there was a parser between .ifc and .fcstd on the server. So when FreeCAD try to download a project it would download as a .fcstd file. I know i am dreaming but that would solve all my problems :lol:
User avatar
yorik
Site Admin
Posts: 11577
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: BIM Workbench

Postby yorik » Fri Jul 12, 2019 2:36 pm

What server?