[IFC Export] Problems with IFC (structural view) export

This forum section is only for IFC-related issues
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: [IFC Export] Problems with IFC (structural view) export

Post by bernd »

in the regard of material:

ATM only Arch Components (thus all Arch Objects) do have a property called Material. You can acces it like any other property. This property is a link to a material object. This material object does have a property "Material" which is a dictionary with all the data inside. This looks like this:

Code: Select all

>>> 
>>> App.ActiveDocument.Component.Material.Name
'Material'
>>> App.ActiveDocument.Component.Material.Label
'CalculiX-Steel'
>>> 
>>> 
>>> App.ActiveDocument.getObjectsByLabel("CalculiX-Steel")[0].Material
{'AuthorAndLicense': 'CalculiX-Steel', 'CardName': 'CalculiX-Steel', 'Color': '(0.8, 0.8, 0.8, 1.0)', 'Density': '7900 kg/m^3', 'Description': 'Standard steel material for CalculiX sample calculations', 'DiffuseColor': '(0.8, 0.8, 0.8, 1.0)', 'Father': 'Metal', 'Name': 'CalculiX-Steel', 'PoissonRatio': '0.3', 'ProductURL': '', 'SectionColor': '(0.8, 0.8, 0.8, 1.0)', 'SpecificHeat': '590 J/kg/K', 'StandardCode': '', 'ThermalConductivity': '43 W/m/K', 'ThermalExpansionCoefficient': '0.000012 m/m/K', 'Transparency': '0', 'ViewColor': '(0.8, 0.8, 0.8, 1.0)', 'YoungsModulus': '210000 MPa'}
>>> 
Just ask if you need further information ...
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: [IFC Export] Problems with IFC (structural view) export

Post by balrobs »

bernd wrote: Thu Jun 03, 2021 6:21 am in the regard of material:

ATM only Arch Components (thus all Arch Objects) do have a property called Material. You can acces it like any other property. This property is a link to a material object. This material object does have a property "Material" which is a dictionary with all the data inside. This looks like this:

Code: Select all

>>> 
>>> App.ActiveDocument.Component.Material.Name
'Material'
>>> App.ActiveDocument.Component.Material.Label
'CalculiX-Steel'
>>> 
>>> 
>>> App.ActiveDocument.getObjectsByLabel("CalculiX-Steel")[0].Material
{'AuthorAndLicense': 'CalculiX-Steel', 'CardName': 'CalculiX-Steel', 'Color': '(0.8, 0.8, 0.8, 1.0)', 'Density': '7900 kg/m^3', 'Description': 'Standard steel material for CalculiX sample calculations', 'DiffuseColor': '(0.8, 0.8, 0.8, 1.0)', 'Father': 'Metal', 'Name': 'CalculiX-Steel', 'PoissonRatio': '0.3', 'ProductURL': '', 'SectionColor': '(0.8, 0.8, 0.8, 1.0)', 'SpecificHeat': '590 J/kg/K', 'StandardCode': '', 'ThermalConductivity': '43 W/m/K', 'ThermalExpansionCoefficient': '0.000012 m/m/K', 'Transparency': '0', 'ViewColor': '(0.8, 0.8, 0.8, 1.0)', 'YoungsModulus': '210000 MPa'}
>>> 
Just ask if you need further information ...
Thank you @Bernd for your assistance.
As a newbie I often struggle with the simplest things so your help means a lot to me :D
Unfortunately the material stuff has to wait a little more.
Bevor that I want to finalize the export of IfcStructuralSurfaceMember. Here I encountered some more problems that may be related to the IFC version. Usually I exported in IFC4, but as you already have noticed some Viewer (i.e. BIMcollab ZOOM) don't import the surfaces ... but if I change the line

Code: Select all

FILE_SCHEMA=(('IFC4'))
to

Code: Select all

FILE_SCHEMA=(('IFC2X3'))
by hand in the output file everything works like a charme :?:
So I tried to export directly to IFC2X3 by setting the corresponding IFC-version option in the ARCH preferences ... as a result i got a lot of console errors.
By learning the code I fixed this errors. Here is my pull request: https://github.com/FreeCAD/FreeCAD/pull ... -661278951
I think it should be merged before I continue with the IfcStructuralSurfaceMember stuff.
Cheers
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: [IFC Export] Problems with IFC (structural view) export

Post by balrobs »

I did some further testing for my IFC export of StructuralSurfaceMembers :?
Now that IFC2x3 should work in FreeCAD I exported my test model test_structure_with_stairs_SurfaceMember.FCStd to IFC2X3 and IFC4 (test_structure_with_stairs_SurfaceMember_IFC2X3.ifc, test_structure_with_stairs_SurfaceMember_IFC4.ifc) and loaded them with some for me avialable software
What I see is:
IFC_imports_comparision.jpg
IFC_imports_comparision.jpg (458.92 KiB) Viewed 5514 times
- all imports work without error messages
- FreeCad imports all geometries correctly
- RFEM imports all geometries correctly too
- BIMcollab ZOOM shows some problems with StructuralSurfaceMembers for IFC4
- wikiifc viewer shows problems with StructuralCurveMembers for IFC2X3 and IFC4
- Goat viewer shows problems with StructuralCurveMembers for IFC2X3 and nothing at all for IFC4

Now I'm quite confused. What do you think @Bernd? Should I still go for a pull request or should we investigate further?
Thanks in advance for your valuable advice! :D
test_structure_with_stairs_SurfaceMember.FCStd
(67.72 KiB) Downloaded 123 times
test_structure_with_stairs_SurfaceMember_IFC2X3.ifc
(18.13 KiB) Downloaded 125 times
test_structure_with_stairs_SurfaceMember_IFC4.ifc
(18.24 KiB) Downloaded 122 times
User avatar
Moult
Posts: 321
Joined: Sat Jan 05, 2019 11:46 am
Contact:

Re: [IFC Export] Problems with IFC (structural view) export

Post by Moult »

By the way, here is the output from the BlenderBIM Add-on for the IFC4 file. Hopefully its ability to inspect some of the more native IFC capbilities helps debug and discover issues. Let me know if you'd like to check any properties :)

This work is largely done by Jesusbill who you can find on the community.osarch.org forums :)
2021-06-07-165553_424x532_scrot.png
2021-06-07-165553_424x532_scrot.png (119.18 KiB) Viewed 5437 times
Last edited by Moult on Mon Jun 07, 2021 9:38 am, edited 1 time in total.
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: [IFC Export] Problems with IFC (structural view) export

Post by balrobs »

Moult wrote: Mon Jun 07, 2021 6:58 am By the way, here is the output from the BlenderBIM Add-on for the IFC4 file. Hopefully its ability to inspect some of the more native IFC capbilities helps debug and discover issues. Let me know if you'd like to check any properties :)

2021-06-07-165553_424x532_scrot.png
Thank you @Moult for showing me this possibility ;)

I'm very glad to see that BenderBIM imports all StructuralCurveMember and StructuralSurfaceMember geometries together with their thickness, and this for IFC2X3 and IFC4. I would say: And the winner is ... :D
For the sake of completeness I've added BlenderBIM to my previous comparision table:
BlenderBim_IFC_import.jpg
BlenderBim_IFC_import.jpg (120.81 KiB) Viewed 5423 times
Reassured by this result I think it would make sense to re-submit a pull request with my latest improvements.
If changes should be necessary, they still could be made in the future!

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

Re: [IFC Export] Problems with IFC (structural view) export

Post by bernd »

balrobs wrote: Sun Jun 06, 2021 9:58 am - BIMcollab ZOOM shows some problems with StructuralSurfaceMembers for IFC4
I will get in contact with the support.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: [IFC Export] Problems with IFC (structural view) export

Post by bernd »

another viewer is http://view.ifcopenshell.org I try all the time ... It is a viewer for the library FreeCAD and BlenderBIM are based on.
Jesusbill
Posts: 7
Joined: Wed Jun 10, 2020 11:53 pm

Re: [IFC Export] Problems with IFC (structural view) export

Post by Jesusbill »

Hey @balrobs fantastic work, great to see this development in FreeCAD.
I have downloaded your file and want to try import it in Code_Aster with ifc2ca scripts, will report back here.

As @Moult said we have been working on structural stuff in BlenderBIM, let's keep in touch, it would be nice to push forward related developments in both software!

Keep up the great work!
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: [IFC Export] Problems with IFC (structural view) export

Post by balrobs »

Jesusbill wrote: Mon Jun 07, 2021 9:51 pm Hey @balrobs fantastic work, great to see this development in FreeCAD.
Thank you for your kind words @Jesusbill and welcome here in the forum :)
Jesusbill wrote: Mon Jun 07, 2021 9:51 pm I have downloaded your file and want to try import it in Code_Aster with ifc2ca scripts, will report back here.
Unfortunatly I'm not an instructed developer but only a hobbiest who tries to learn a lot of new things (FreeCAD, Python and IFC) in order to improve the actual IFC export of FreeCAD. Therefore, my progress is slow and certainly does not have the best quality :mrgreen:

In the last few weeks I found your mentioned scripts on github and took a lot of inspiration while learning from them. I know I still have to learn a lot .. so I would be very happy to keep in touch and help bundle synergies between FreeCAD and BlenderBim.

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

Re: [IFC Export] Problems with IFC (structural view) export

Post by bernd »

Post Reply