mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
keep the default flow direction for ports NOTDEFINED as it's not yet set
This commit is contained in:
@@ -57,10 +57,9 @@ class MEPGenerator:
|
|||||||
ports = tool.System.get_ports(element)
|
ports = tool.System.get_ports(element)
|
||||||
if not ports:
|
if not ports:
|
||||||
start_port_matrix = Matrix()
|
start_port_matrix = Matrix()
|
||||||
# TODO: what are the best default directions here?
|
for mat in [start_port_matrix, end_port_matrix]:
|
||||||
for mat, flow_direction in zip([start_port_matrix, end_port_matrix], ("SINK", "SOURCE")):
|
|
||||||
port = tool.Ifc.run("system.add_port", element=element)
|
port = tool.Ifc.run("system.add_port", element=element)
|
||||||
port.FlowDirection = flow_direction
|
port.FlowDirection = "NOTDEFINED"
|
||||||
tool.Ifc.run("geometry.edit_object_placement", product=port, matrix=obj.matrix_world @ mat, is_si=True)
|
tool.Ifc.run("geometry.edit_object_placement", product=port, matrix=obj.matrix_world @ mat, is_si=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -206,8 +205,7 @@ class MEPGenerator:
|
|||||||
else:
|
else:
|
||||||
obstruction_obj.location += segment_rotation @ V(0, 0, new_segment_length)
|
obstruction_obj.location += segment_rotation @ V(0, 0, new_segment_length)
|
||||||
|
|
||||||
# TODO: what's best default direction here?
|
tool.Ifc.run("system.connect_port", port1=related_port, port2=obstruction_port, direction="NOTDEFINED")
|
||||||
tool.Ifc.run("system.connect_port", port1=related_port, port2=obstruction_port, direction="SOURCE")
|
|
||||||
return obstruction, None
|
return obstruction, None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user