From 051da8e481998535c4dc447c1756401f94a2a6c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Perdig=C3=A3o?= Date: Mon, 23 Dec 2024 17:55:19 -0300 Subject: [PATCH] Allow mitre join to create a connection between contiguous walls. --- src/bonsai/bonsai/bim/module/model/wall.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bonsai/bonsai/bim/module/model/wall.py b/src/bonsai/bonsai/bim/module/model/wall.py index c64ff9a7c8..d52a587b45 100644 --- a/src/bonsai/bonsai/bim/module/model/wall.py +++ b/src/bonsai/bonsai/bim/module/model/wall.py @@ -1191,6 +1191,12 @@ class DumbWallJoiner: axis1 = tool.Model.get_wall_axis(wall1) axis2 = tool.Model.get_wall_axis(wall2) intersect = tool.Cad.intersect_edges(axis1["reference"], axis2["reference"]) + # Allow connecting contiguos walls + if not intersect: + for v1 in axis1["reference"]: + for v2 in axis2["reference"]: + if tool.Cad.are_vectors_equal(v1, v2, 1e-5): + intersect = (v1, v2) if intersect: intersect, _ = intersect else: