IFC export

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

IFC export

Post by bernd »

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 87 times
solid_ifc_export.FCStd
(131.86 KiB) Downloaded 62 times
screen.jpg
screen.jpg (435.15 KiB) Viewed 1979 times
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC export

Post by yorik »

strange.. it might have to do with edge sorting. I'll have a look ASAP
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC export

Post by yorik »

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
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: IFC export

Post by bernd »

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 89 times
import into FreeCAD --> No errors
excavation1.FCStd
(295.64 KiB) Downloaded 54 times
export from FreeCAD
excavation2.ifc
(248.59 KiB) Downloaded 88 times
reimport into FreeCAD --> Error
screen.jpg
screen.jpg (254.38 KiB) Viewed 1715 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
Post Reply