mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
You can now add ports to types, and ports are created when placing occurrences of that type
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user