IFC export

A forum dedicated to the Arch module development
User avatar
bernd
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

IFC export

Postby bernd » Wed Nov 09, 2016 10:45 am

I have a few cases where ifc export does not export valid solids. Attached an example. The solid has no errors in FreeCAD. Export to brep or step and save as FreeCAD file works as well as reloading them. But export to ifc and reload the file does not work. At reload in FreeCAD some faces at the bottom of the solid are missing :( ! If the ifc file is imported into another application (in my case Allplan) all faces are there but it is no longer a Solid, means Allplan can not build a solid out of the faces in the ifc. :(

Attached the FreeCAD and the exported IFC
solid_ifc_export.ifc
(171.88 KiB) Downloaded 9 times

solid_ifc_export.FCStd
(131.86 KiB) Downloaded 8 times

screen.jpg
screen.jpg (435.15 KiB) Viewed 400 times
User avatar
yorik
Site Admin
Posts: 8672
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: IFC export

Postby yorik » Thu Nov 10, 2016 11:13 pm

strange.. it might have to do with edge sorting. I'll have a look ASAP
User avatar
yorik
Site Admin
Posts: 8672
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: IFC export

Postby yorik » Tue Nov 29, 2016 3:43 pm

i had a better look... seems that the culprit is the direction of face loops. IfcFace expects the direction of vertices to be consistent, and Shape.OrderedVertexes doesn't seem to consider direction. Probably we need to do a check against the face normal, in importIFC before lines 1652 and lines 1663.
User avatar
bernd
Posts: 3924
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: IFC export

Postby bernd » Mon Jan 30, 2017 11:02 am

Thanks Yorik,

I havn't had the time to have a deeper look myself, but came across another file. Just post it here for reference.

import to FreeCAD works great, the solid has no errors. Exporting to ifc and reimporting into FreeCAD. No faces seams to missing, but the solid has errors.

BTW: Nemetschek Allplan imports the FreeCAD export without errors.

export from Allplan
excavation1.ifc
(284.68 KiB) Downloaded 6 times


import into FreeCAD --> No errors
excavation1.FCStd
(295.64 KiB) Downloaded 4 times


export from FreeCAD
excavation2.ifc
(248.59 KiB) Downloaded 4 times


reimport into FreeCAD --> Error
screen.jpg
screen.jpg (254.38 KiB) Viewed 136 times



OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9796 (Git)
Build type: Release
Branch: master
Hash: bebda4c6adcad59c4abe82bcbc8703e90c8e1ceb
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0