You can now add ports to types, and ports are created when placing occurrences of that type

This commit is contained in:
Dion Moult
2022-05-03 14:32:18 +10:00
parent 32c101cf74
commit f8acde0801
3 changed files with 21 additions and 7 deletions
@@ -40,7 +40,8 @@ def get_ports(element):
results = []
for rel in getattr(element, "IsNestedBy", []) or []:
results.extend([o for o in rel.RelatedObjects if o.is_a("IfcDistributionPort")])
for rel in element.HasPorts or []:
# IFC2X3 only, deprecated in IFC4
for rel in getattr(element, "HasPorts", []) or []:
results.append(rel.RelatingPort)
return results