OSArch Community

[IfcOpenShell] get IfcRelAggregates from a IfcRoof by IfcOpenShell Python

  1. B

    example file IfcOpenHouse from https://github.com/aothms/IfcOpenHouse/blob/master/IfcOpenHouse_IFC2x3.ifc

    The roof does not have a representation ... see https://github.com/aothms/IfcOpenHouse/blob/master/IfcOpenHouse_IFC2x3.ifc#L195

    #188=IFCROOF('3fAI7uR$P3lvo4SXaPZKKZ',#5,'Roof',$,$,#147,$,$,.GABLE_ROOF.);

    Instead it is a container that aggregates all components via IfcRelAggregates see https://github.com/aothms/IfcOpenHouse/blob/master/IfcOpenHouse_IFC2x3.ifc#L194

    #187=IFCRELAGGREGATES('2GNGBFGuzAM9RYb7ozg35p',#5,$,$,#188,(#189,#190));

    How do I get the aggregates entry 187 from the product 188 ?

    In https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcsharedbldgelements/lexical/ifcroof.htm are lots of Has ... but none seams to work to get the IfcRelAggregates entry ...

    In python I can not find something either

    
    >>> ifcfile[188].__dir__()
    
    ['ConnectedFrom', 'ConnectedTo', 'ContainedInStructure', 'Decomposes', 'Description', 'FillsVoids', 'GlobalId', 'HasAssignments', 'HasAssociations', 'HasCoverings', 'HasOpenings', 'HasPorts', 'HasProjections', 'HasStructuralMember', 'IsConnectionRealization', 'IsDecomposedBy', 'IsDefinedBy', 'Name', 'ObjectPlacement', 'ObjectType', 'OwnerHistory', 'ProvidesBoundaries', 'ReferencedBy', 'ReferencedInStructures', 'Representation', 'ShapeType', 'Tag', '__class__', '__del__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattr__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__len__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rge__', '__rgt__', '__rle__', '__rlt__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'attribute_name', 'attribute_type', 'compare', 'get_info', 'get_info_2', 'id', 'is_a', 'is_entity', 'to_string', 'unwrap_value', 'walk', 'wrap_value']
    
    >>> 
    

    cheers bernd

  2. M
  3. B

    YEAH, all I need ...

    BTW: Slowly I'll be back on the various projects and forums I am involved ... :-)

  4. B

    actually this should be used for all IfcRoof, IfcRamp and IfcStair. I have not been aware of this and lots of CAD do not make use of it but directly assign a Representeation to these.

    https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcsharedbldgelements/lexical/ifcramp.htm

    https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcsharedbldgelements/lexical/ifcroof.htm

    https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcsharedbldgelements/lexical/ifcstair.htm

Login or Register to reply.