This commit is contained in:
Andrej730
2025-08-28 10:57:26 +05:00
parent 39100b7c97
commit 43fbdf57c8
20 changed files with 57 additions and 47 deletions
@@ -19,7 +19,8 @@
import ifcopenshell
from ifcopenshell import entity_instance
def get_referent_nest(file: ifcopenshell.file,entity: entity_instance) -> entity_instance:
def get_referent_nest(file: ifcopenshell.file, entity: entity_instance) -> entity_instance:
"""
Searches for the IfcRelNest that contains IfcReferent. If one is not found, a empty IfcRelNests is created.
@@ -32,5 +33,5 @@ def get_referent_nest(file: ifcopenshell.file,entity: entity_instance) -> entity
if related_object.is_a("IfcReferent"):
return nest
nest = file.createIfcRelNests(GlobalId=ifcopenshell.guid.new(),RelatingObject=entity,RelatedObjects=[])
nest = file.createIfcRelNests(GlobalId=ifcopenshell.guid.new(), RelatingObject=entity, RelatedObjects=[])
return nest