Skip to content

Commit e48a3a0

Browse files
committed
Fixed bug with adding obstruction fittings
1 parent c07371c commit e48a3a0

File tree

1 file changed

+9
-1
lines changed
  • src/blenderbim/blenderbim/bim/module/model

1 file changed

+9
-1
lines changed

src/blenderbim/blenderbim/bim/module/model/mep.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,15 +402,23 @@ def are_segments_compatible(test_segment_data, base_segment_data):
402402
return len(segments_data) == 0
403403

404404
def pack_return_data(fitting_type, ports, segments_data):
405+
packed_data = {"fitting_type": fitting_type}
406+
407+
if predefined_type == "OBSTRUCTION":
408+
return packed_data
409+
405410
for port in ports:
406411
port_local_position = V(*port.ObjectPlacement.RelativePlacement.Location.Coordinates)
407412
if tool.Cad.is_x(port_local_position.length, 0.0):
408413
start_port = port
409414
break
415+
410416
connected_port = tool.System.get_connected_port(start_port)
411417
connected_element = tool.System.get_port_relating_element(connected_port)
412418
element_type = ifcopenshell.util.element.get_type(connected_element)
413-
return {"fitting_type": fitting_type, "start_port_match": element_type == segments_data[0][0]}
419+
packed_data["start_port_match"] = element_type == segments_data[0][0]
420+
421+
return packed_data
414422

415423
fitting_types = tool.Ifc.get().by_type(self.get_mep_element_class_name(segments[0], "FittingType"))
416424
for fitting_type in fitting_types:

0 commit comments

Comments
 (0)