Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

This forum section is only for IFC-related issues
wmayer
Founder
Posts: 20318
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by wmayer »

I also noticed another thing: when loading objects, the create time goes up with the number of objects, from about 1ms to 5ms during the ~6000 objects. The time seems to vary linearly with number of objects, so it might be worth looking into whether the data structures holding the document objects could be made better (constant or logarithmic).
The pure object creation and adding them to the document is very fast. What makes it slow is also the whole signalling to the GUI and creating the tree items. If you run this snippet in the command line version of FreeCAD then it finishes after around ten seconds.

Code: Select all

doc=App.newDocument()
for i in range(10000):
    l=doc.addObject("Part::Box")
To speed up things on GUI side I think we have to implement functions that get a list of objects and do all the signalling only once.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by bernd »

as promised in London here a simple building export of Allplan which makes usage of:

- IfcElementQuantity to save geometrical measurements inside an ifc
- IfcComplexProperty to save Wall Attributes of a single layer wall

cheers bernd

Code: Select all

#345= IFCWALLSTANDARDCASE('3sq4L1o5PCQvHHI2OoPthA',#4,' ',$,$,#281,#282,$);
#357= IFCELEMENTQUANTITY('2HGiaVQxb8sQ2MkoujXatF',#4,'WallQuantities',$,$,(#349,#350,#351,#352,#353,#354,#355,#356));
#359= IFCRELDEFINESBYPROPERTIES('3xukQoribF3ujYDcINNlo8',#4,$,$,(#345),#357);
#382= IFCCOMPLEXPROPERTY('Object Layer Attributes #1','Layer #1','Layer #1',(#368,#369,#370,#371,#372,#373,#374,#375,#376,#377,#378,#379,#380,#381));
#398= IFCPROPERTYSET('2w7O1id8z018c1tFUF3fvA',#4,'Allplan Attributes',$,(#363,#364,#365,#366,#367,#382));
#400= IFCRELDEFINESBYPROPERTIES('1yON4QUArBnQ4FbcOsNqV$',#4,$,$,(#345),#398);
Attachments
simple-building.ifc
(16.75 KiB) Downloaded 147 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by Kunda1 »

wmayer wrote: Sun Mar 13, 2016 12:49 pm To speed up things on GUI side I think we have to implement functions that get a list of objects and do all the signalling only once.
Should I open a ticket for this @wmayer ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by bernd »

User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by bernd »

wmayer wrote: Sun Mar 13, 2016 12:49 pm If you run this snippet in the command line version of FreeCAD then it finishes after around ten seconds.

Code: Select all

doc=App.newDocument()
for i in range(10000):
    l=doc.addObject("Part::Box")

Code: Select all

boxes = 10000

import time
doc = App.newDocument()

start = time.time()
for i in range(boxes):
    l = doc.addObject("Part::Box")

end = time.time()
print(end - start)


start = time.time()
doc.recompute()
end = time.time()
print(end - start)
for me takes ...

Code: Select all

196.180708885
>>> 
>>> 
>>> start = time.time()
>>> doc.recompute()
10000
>>> end = time.time()
>>> print(end - start)
29.1634120941
But it takes another 3 and a half minutes until the python console and the gui is again usable (GUI and python console are blocked). Means in summary more than 7 minutes, which is far more than 10 seconds ...

Werner, you do not have installed FreeCAD on one of these, do you ? :ugeek: :ugeek: https://www.top500.org/list/2017/06/

bernd

OS: Debian GNU/Linux 8.9 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12324 (Git)
Build type: Debug
Branch: master
Hash: 81e2480ca62c48b992db6e438cc69640a5166631
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: German/Switzerland (de_CH)

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
EDIT in 2020 on FreeCAD 0.19:
I missed the command line versions text in Werners post :oops: . With FreeCADCmd it takes 5.3 seconds with FreeCAD (with Gui) it takes 65 seconds on my brand new intel xeon.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by bernd »

Did another test at work on a 64 bitb Win10 with FreeCAD release version. The machine has 16 GB Ram and a 3.5 GHz Intel Xeon It‘s faster, but the main problem resists.

Code: Select all

>>> end = time.time()
>>> print(end - start)
101.88499999
>>> 
>>> 
>>> start = time.time()
>>> doc.recompute()
10000
>>> end = time.time()
>>> print(end - start)
26.2319998741
>>> 
Same here After the console print it takes another 2 minutes. Means it's faster, but the main problem resists. It takes araound 5 minutes for 10000 boxes.


OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12324 (Git)
Build type: Release
Branch: master
Hash: 81e2480ca62c48b992db6e438cc69640a5166631
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Switzerland (de_CH)

bernd
SirCezz
Posts: 6
Joined: Tue May 26, 2020 5:31 am

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by SirCezz »

Hello!
I'd like to add something, however I'm not familiar with programming the source code, so let me just focus on the practical point of view, not the implementation in Python.
I'm a structural designer, and I use BIM modelling to exchange files with the architects. It's common to work on .ifc files to check the geometry of the building on the basis of the .ifc file sent by other engineers. However what I cannot get from Freecad is to export only the MOST CRUCIAL parameters for the designers.

So my most important question is:
Is it possible to edit the FreeCADPropertySet, which is exported to ifc?and how to do this? There are couple of essential properties, while rest of them are not - i'd like to be able to edit this list and refine it to just couple of parameters.

Let's focus on the wall - What engineers want to know is the material, the thickness, lenth , volume of the wall..simple as that
However FreecadPropertySet contains lots of informations, not very practical.
(please check it yourselt - create a simple wall and then export it to .ifc and open it with BIM Vision. then set yourself into a posision of an engineer who needs just to design the structure, on the basis of geometry of the object, obtained from the .ifc file :)

PS. Please don't write "please programm it yourself, or "it's not true - you just need to find it" :)) I was searching for the solution, but I'm not able to get into the programme code. FreeCAD is really great software, it would be great if explanations would be more staight instead of getting into the lines of the source code :)

Thank you in advance
SirCezz
Posts: 6
Joined: Tue May 26, 2020 5:31 am

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by SirCezz »

Nobody?? Thats a pitty :(
Anyway, i suppose there is a bug in ifc property manager-the properties sets cannot be deleted, you can add more property sets, but cannot delete any of them. When you do this(and think you suceeded), then click on the same bim element again, the property set that you'd just deleted is still there. Please check this out. Thanks :)
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by yorik »

Hi,
I don't really understand your first problem (create a simple wall in FreeCAD and it will be full of properties you don't need). If you don't add any IFC property yourself, normally, the wall will not carry any property. I have no BIMVision unfortunately because not using windows... Could you attach an IFC file that shows the problem?

Regarding the second problem I just checked, indeed there is a bug there... Will look at it ASAP
*EDIT* Fixed in https://github.com/yorikvanhavre/BIM_Wo ... 0280898bca
SirCezz
Posts: 6
Joined: Tue May 26, 2020 5:31 am

Re: Import/Edit/Export IfcPropertySet and IfcPropertySingleValue

Post by SirCezz »

Yorik,
Thank you for your reply, and fixing the bug.
In terms of ifc properties - what I meant was that when I export the freecad model to .ifc with full freecad parparametric model option enabled, I get lots of not very important parameters (please see the image attached - https://we.tl/t-ROJz5ydlrP . I underlined only 2 parameters, which are really usefull for me).
In general what I'd like to get is a set of specific ifc parameters of each BIM element. For example when I export walls, columns or beams, I'd like to get width, length and type of material properties - nothing more.
Is there any way of filtering the exported data, and preventing not desired properties from showing up?

Thank you, in my opinion filtering ifc data would help to use BIM in FreeCad in more efficent way :)
Post Reply