@@ -520,21 +520,21 @@ def create_relationship(self, parent: Base, child: Base) -> Base:
520520 if child .is_a ("IfcSpatialStructureElement" ):
521521 return self ._create_entity ("IfcRelAggregates" , GlobalId = guid , RelatingObject = parent , RelatedObjects = [child ])
522522 return self ._create_entity ("IfcRelContainedInSpatialStructure" , GlobalId = guid , RelatingStructure = parent , RelatedElements = [child ])
523-
523+
524524 if parent .is_a ("IfcElementAssembly" ) or child .is_a ("IfcBuildingElementPart" ):
525525 return self ._create_entity ("IfcRelAggregates" , GlobalId = guid , RelatingObject = parent , RelatedObjects = [child ])
526-
526+
527527 if parent .is_a ("IfcPort" ):
528528 if not child .is_a ("IfcPort" ):
529529 return self ._create_entity ("IfcRelConnectsPortToElement" , GlobalId = guid , RelatingPort = parent , RelatedElement = child )
530530 return self ._create_entity ("IfcRelConnectsPorts" , GlobalId = guid , RelatingPort = parent , RelatedPort = child )
531-
531+
532532 if parent .is_a ("IfcElement" ) and child .is_a ("IfcElement" ):
533533 return self ._create_entity ("IfcRelConnectsElements" , GlobalId = guid , RelatingElement = parent , RelatedElement = child )
534-
534+
535535 if parent .is_a ("IfcGroup" ):
536536 return self ._create_entity ("IfcRelAssignsToGroup" , GlobalId = guid , RelatingGroup = parent , RelatedObjects = [child ])
537-
537+
538538 # Default case
539539 return self ._create_entity ("IfcRelAggregates" , GlobalId = guid , RelatingObject = parent , RelatedObjects = [child ])
540540
0 commit comments