IFC exporting issues

This forum section is only for IFC-related issues
User avatar
joancabeza
Posts: 49
Joined: Tue Apr 03, 2018 5:51 pm
Contact:

IFC exporting issues

Post by joancabeza »

I'm starting this topic in order to report all the issues that happen while exporting to IFC.

In my professional enviroment it has been stablished the IFC as the deribelable in which everybody in BIM works, allthoght Revit has a major presence. But in the end you have to have an IFC (I think it's a fantastic decision work in OpenBIM). That means using FC as the modeling tool but having always an eye how it's going to be in the IFC.

I understand everything is pretty new and it's in development so I see this topic as a tool in order to correct or simply make decisions. Some are errors but some might not be.

An example: If you export a building whose pillars have been made with Axis system it only export the original, not the rest. In fact there,s only one pillar (that can't be also because future quantification). But may be this have not to change. There can be situations when you know you don't have to export and you can use this tool. I don't know if it's better having like a good practice modeling book that explains that every object in FC has to be made individually if you want to export it correctly. It might be wiser model differently depending the purpose. FC gives us this chance.
Captura de pantalla 2018-07-25 15.18.57.png
Captura de pantalla 2018-07-25 15.18.57.png (380.56 KiB) Viewed 2656 times
Captura de pantalla 2018-07-25 15.18.35.png
Captura de pantalla 2018-07-25 15.18.35.png (109.07 KiB) Viewed 2656 times
User avatar
joancabeza
Posts: 49
Joined: Tue Apr 03, 2018 5:51 pm
Contact:

Re: IFC exporting issues

Post by joancabeza »

Error when you asign psets on a pillar

Version:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14148 (Git)
Build type: Release
Branch: master
Hash: 6c51cdd6633a39299cdff9ff7f544b849d04a98e
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Catalan/Spain (ca_ES)


Report:

Traceback (most recent call last):
File "C:\Users\CABE\Desktop\FreeCAD_0.18.14148_x64_dev_win\Mod\Arch\ArchStructure.py", line 865, in setEdit
FreeCADGui.Control.showDialog(taskd)
<type 'exceptions.RuntimeError'>: Active task dialog found
Traceback (most recent call last):
File "<string>", line 4, in <module>
File "C:\Users\CABE\Desktop\FreeCAD_0.18.14148_x64_dev_win\Mod\Arch\importIFC.py", line 1676, in export
p = ifcbin.createIfcPropertySingleValue(str(key),str(ptype),pvalue)
File "C:\Users\CABE\Desktop\FreeCAD_0.18.14148_x64_dev_win\Mod\Arch\importIFC.py", line 1290, in createIfcPropertySingleValue
key = name + ptype + pvalue
<type 'exceptions.TypeError'>: cannot concatenate 'str' and 'float' objects
pillar.FCStd
(13.91 KiB) Downloaded 76 times
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC exporting issues

Post by yorik »

Coincidently, I have fixed this issue (provisorily, unfortunately, but will fix better soon) yesterday night :)
User avatar
joancabeza
Posts: 49
Joined: Tue Apr 03, 2018 5:51 pm
Contact:

Re: IFC exporting issues

Post by joancabeza »

Block wall properties don't export. Again, I don't know if the could / should be exported to IFC.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14148 (Git)
Build type: Release
Branch: master
Hash: 6c51cdd6633a39299cdff9ff7f544b849d04a98e
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Catalan/Spain (ca_ES)

Captura de pantalla 2018-07-28 18.29.28.png
Captura de pantalla 2018-07-28 18.29.28.png (353.73 KiB) Viewed 2595 times
Captura de pantalla 2018-07-28 18.29.32.png
Captura de pantalla 2018-07-28 18.29.32.png (113.65 KiB) Viewed 2595 times
I also have to say there's still joint problems on walls that turn.
Captura de pantalla 2018-07-28 18.23.41.png
Captura de pantalla 2018-07-28 18.23.41.png (356.25 KiB) Viewed 2595 times
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: IFC exporting issues

Post by bitacovir »

Building part created with BIM Setup Building panel cannot be exported as IFC file
I get this:

Code: Select all

Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "C:\Users\Rafael\Documents\Programs\FreeCAD_0.18.14148_x64_dev_win\Mod\Arch\importIFC.py", line 1508, in export
    axis = ifcfile.createIfcGridAxis(ax[2],pol,True)
  File "C:\Users\Rafael\Documents\Programs\FreeCAD_0.18.14148_x64_dev_win\bin\lib\site-packages\ifcopenshell\__init__.py", line 109, in create_entity
    for idx, arg in attrs: e[idx] = arg
  File "C:\Users\Rafael\Documents\Programs\FreeCAD_0.18.14148_x64_dev_win\bin\lib\site-packages\ifcopenshell\__init__.py", line 88, in __setitem__
    getattr(self.wrapped_data, "setArgumentAs%s" % attr_type)(idx, entity_instance.unwrap_value(value))
  File "C:\Users\Rafael\Documents\Programs\FreeCAD_0.18.14148_x64_dev_win\bin\lib\site-packages\ifcopenshell\ifcopenshell_wrapper.py", line 1304, in setArgumentAsString
    return _ifcopenshell_wrapper.entity_instance_setArgumentAsString(self, i, v)
<type 'exceptions.TypeError'>: in method 'entity_instance_setArgumentAsString', argument 3 of type 'std::string const &'
building_setup_layout.FCStd
(13.49 KiB) Downloaded 63 times
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14148 (Git)
Build type: Release
Branch: master
Hash: 6c51cdd6633a39299cdff9ff7f544b849d04a98e
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/Australia (en_AU)
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC exporting issues

Post by yorik »

First problem, blocks: You need to either turn their "export as Brep" flag on (either from Arch->Utils) or from their edit mode panel -> IFC properties screen). I know this is not practical, but I'm not sure yet if it is a good idea to change that, because otherwise you won't be able to export "blocked" walls as straight. Still need a good idea to handle this case.

The problems with corners, indeed, there is still much to solve there.

The IFC export of axes I just fixed in git commit 269a4a558. But this also made me discover that IFC prohibits grids made of only one direction of axes. So I also updated the BIM project script to create a system with the two series of axes. Then it exports as expected. When a model contains only one series of axes, or more than one that are not in an axes system, these won't be exported.
User avatar
joancabeza
Posts: 49
Joined: Tue Apr 03, 2018 5:51 pm
Contact:

Re: IFC exporting issues

Post by joancabeza »

About blocks, I think it works fine this way.
User avatar
joancabeza
Posts: 49
Joined: Tue Apr 03, 2018 5:51 pm
Contact:

Re: IFC exporting issues

Post by joancabeza »

Classification

I've created an IFC file made by Revit with 2 kind of classification systems. One is the Uniformat created by Assembly Code and the other is an invented classification created by Classification Configuration while exporting the IFC from Revit.

I attach the IFC file in case it helps finding a way to export classifications
Captura de pantalla 2018-08-04 23.02.23.png
Captura de pantalla 2018-08-04 23.02.23.png (119.41 KiB) Viewed 2511 times
pillar_Class.ifc
(8.5 KiB) Downloaded 68 times
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC exporting issues

Post by yorik »

Thanks for that file... It shows quite clearly how it works (writing this below mostly for myself):

- for each classification system, an IFCCLASSIFICATION('Source','Version',['Date'],'Name') ex: ('http://www.csiorg.net/uniformat','1998',$,'Uniformat')

- for each classification number, an IFCCLASSIFICATIONREFERENCE(['Location','ItemReference','Name',Classification]) ex: ('http://www.csiorg.net/uniformat','B1010240','Columns - CIP',#152) the 'Location' item seems a bit silly if you use the same url as the classification itself, but it's optional, and it could be useful if it would point to the exact number online

- for each object, an IFCRELASSOCIATESCLASSIFICATION(id,ownerhistory,['Name','Description'],(Relatedobjects),classificationreference) ex: ('0_DDVbe6TBnfEnsG6I36D7',#41,'Uniformat Classification','',(#167),#192);

Worth noting that this is a "weak" implementation (as they say themselves in the docs), that is, there is no strong structure to follow, you can basically use these things the way you see fit, many arguments are optional, you can even not use any IfcClassification at all, and handle everything only with IfcClassificationReference. The name of the classification system can be included in the class name or not, etc. So there might be many different uses out there. But I think we can more or less follow the above...
User avatar
joancabeza
Posts: 49
Joined: Tue Apr 03, 2018 5:51 pm
Contact:

Re: IFC exporting issues

Post by joancabeza »

Hi!

I've created a pillar. I've clicked quantities to be exported, I've asigned it a CommonPSet, and an Standard Code.

When I try to export to IFC it shows this on the Report View:

Traceback (most recent call last):
File "<string>", line 4, in <module>
File "C:\Users\CABE\Desktop\FreeCAD_0.18.14575_x64_dev_win\Mod\Arch\importIFC.py", line 1783, in export
p = ifcbin.createIfcPropertySingleValue(str(key),str(ptype),pvalue)
File "C:\Users\CABE\Desktop\FreeCAD_0.18.14575_x64_dev_win\Mod\Arch\importIFC.py", line 1351, in createIfcPropertySingleValue
key = name + ptype + pvalue
<type 'exceptions.TypeError'>: cannot concatenate 'str' and 'float' objects


When I try to go again to the IFC Elements Manager it appears this:

Running the Python command 'BIM_IfcElements' failed:
Traceback (most recent call last):
File "C:\Users\CABE\AppData\Roaming\FreeCAD\Mod\BIM\BimIfcElements.py", line 104, in Activated
self.update()
File "C:\Users\CABE\AppData\Roaming\FreeCAD\Mod\BIM\BimIfcElements.py", line 167, in update
it.setCheckState(True)

'PySide.QtGui.QStandardItem.setCheckState' called with wrong argument types:
PySide.QtGui.QStandardItem.setCheckState(bool)
Supported signatures:
PySide.QtGui.QStandardItem.setCheckState(PySide.QtCore.Qt.CheckState)



OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14575 (Git)
Build type: Release
Branch: master
Hash: a624fee2c27bbbb869df6a8ce40438953a282a8c
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Catalan/Spain (ca_ES)

Pillar.FCStd
(12.59 KiB) Downloaded 57 times
Regards!
Post Reply