Skip to content

Wrong topology and solids #10

Description

@yorikvanhavre

Hi Thomas, here is a specific case we found the other day:
https://dl.dropboxusercontent.com/u/7546976/slab.ifc

The above file contains an IfcFooting (#3142), which body representation is made of several Brep solids (#235). Apparently, as far as I can see, some faces of the breps seem to have wrong normals (which is visible when converting the ifc file to obj and opening it in blender).

As a result (probably), when creating the shape with IfcImport.create_shape(), the inner solids are lost, and the shape comes as a big compound of faces. This piece of code, run inside FreeCAD, shows you what happens:

import IfcImport,Part
f=IfcImport.open("/home/yorik/slab.ifc")
f
<IfcImport.IfcFile; proxy of <Swig Object of type 'IfcParse::IfcFile *' at 0x7f44f430a780> >
o=f.by_id(3142)
o

3142=IfcFooting('0dFQTrJef12fHj9B6Va$DI',#4,' ',$,$,#233,#3129,$,.NOTDEFINED.)

b=IfcImport.create_shape(o)
s=Part.Shape()
s.importBrepFromString(b)
s.ShapeType
'Compound'
s.Solids
[]
s.Shells
[]
s.Faces
[Face object at 0x758dfd0, ... , Face object at 0x75936a0]

Normally IfcOpenShell recreates those solids correctly. Do you think there could be a way to recover the solid information with such malformed objects? I'm not sure it's worth the effort, though. It might involve a lot of extra operations...

Anyway, I'd like to have your opinion on this...
Cheers
Yorik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions