Adding "Representations" to an object.

I'm having problems with an object that doesn't have a "Representations" attribute. I can't explain how this happened (I built it the same as others that do) but the fact is that it doesn't have it and it gives me a lot of problems in subsequent operations.
It's not possible to delete it: IfcDelete produces an error because it doesn't find the "Representations" attribute.
I can extract it with IfcPatch but if I try to load or process the extracted file afterwards I get the same error.
I've tried to add a "Representations" item in "Geometry and Materials"->"Representations item" but I don't know how to do it. I haven't found any information about "Representations utilities" (Advanced Users Only).
Any ideas/tips?

Comments

  • Can you share a pared down version of the file for analysis?

  • I have extracted several objects from the original project (generated in the same way) because the file is large (12 M the ifc and 10 the associated blend. If required I can send them too but I assume that it will not be possible at first).
    I cannot open this extracted file in Blender/Bonsai and using IfcPatch (with OffsetObjectsPlacement for example) I have an error; in another ifc viewer (Bimcollab) the object that causes problems (BarreraMetalica_BMSNC2/T_N2WSA/1.02_03) does not appear but editing the ifc file, this element is there.

  • Defer to others on this one. :)
    Perhaps @Andrej730 might have an idea.

  • I'm having problems with an object that doesn't have a "Representations" attribute. I can't explain how this happened (I built it the same as others that do) but the fact is that it doesn't have it and it gives me a lot of problems in subsequent operations.
    It's not possible to delete it: IfcDelete produces an error because it doesn't find the "Representations" attribute.

    Do you have some example?

    I cannot open this extracted file in Blender/Bonsai and using IfcPatch (with OffsetObjectsPlacement for example) I have an error; in another ifc viewer (Bimcollab) the object that causes problems (BarreraMetalica_BMSNC2/T_N2WSA/1.02_03) does not appear but editing the ifc file, this element is there.

    I couldn't open the file in Bonsai since it's invalid - it's using some weird ifc elements for elements placements, see below (supposed to be IfcObjectPlacements instead).

    import ifcopenshell
    ifc_file = ifcopenshell.open(r"PC-CMB-17037_PE_Barrera_Local.ifc")
    elements = ifc_file.by_type("IfcElement")
    
    #31=IfcPolyLoop((#28,#29,#30))
    #230686=IfcFaceOuterBound(#230685,.T.)
    #230747=IfcFace((#230746))
    for element in elements:
        print(element.ObjectPlacement)
    

    "extracted" - you mean this file was extracted using ExtractedElements from some valid ifc project and got broken in the process or original project was invalid too? If original project is invalid too you can run IFC validation on it and then you'll need to make changes either manually or by writing ifcopenshell scripts.

Sign In or Register to comment.