From ad79c63a37e1e46f25ededb09c9212666e4fffd7 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 2 Oct 2023 10:57:24 +0500 Subject: [PATCH] Fixed #3832 --- .../ifcopenshell/api/system/connect_port.py | 4 ++-- .../ifcopenshell/api/system/disconnect_port.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py index 20380d9dc4..a39794a5d7 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py @@ -82,8 +82,8 @@ class Usecase: # Create 2 ports, one for either end of both the duct and fitting. duct_port1 = ifcopenshell.api.run("system.add_port", model, element=duct) duct_port2 = ifcopenshell.api.run("system.add_port", model, element=duct) - fitting_port1 = ifcopenshell.api.run("system.add_port", model, element=duct) - fitting_port2 = ifcopenshell.api.run("system.add_port", model, element=duct) + fitting_port1 = ifcopenshell.api.run("system.add_port", model, element=fitting) + fitting_port2 = ifcopenshell.api.run("system.add_port", model, element=fitting) # Connect the duct and fitting together. At this point, we have not # yet determined the direction of the flow, so we leave direction as diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py index eddfae5f59..3782e8e27b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py @@ -52,8 +52,8 @@ class Usecase: # Create 2 ports, one for either end of both the duct and fitting. duct_port1 = ifcopenshell.api.run("system.add_port", model, element=duct) duct_port2 = ifcopenshell.api.run("system.add_port", model, element=duct) - fitting_port1 = ifcopenshell.api.run("system.add_port", model, element=duct) - fitting_port2 = ifcopenshell.api.run("system.add_port", model, element=duct) + fitting_port1 = ifcopenshell.api.run("system.add_port", model, element=fitting) + fitting_port2 = ifcopenshell.api.run("system.add_port", model, element=fitting) # Connect the duct and fitting together. At this point, we have not # yet determined the direction of the flow, so we leave direction as