From 7daec254542d6f4c1fd53df74aaa31b483fda5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Perdig=C3=A3o?= Date: Tue, 27 Aug 2024 09:59:26 -0300 Subject: [PATCH] Polytool, fixed decorator to show the mouse snapping point on top. --- src/bonsai/bonsai/bim/module/model/decorator.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/model/decorator.py b/src/bonsai/bonsai/bim/module/model/decorator.py index 7393a09434..e9e1cfd3b4 100644 --- a/src/bonsai/bonsai/bim/module/model/decorator.py +++ b/src/bonsai/bonsai/bim/module/model/decorator.py @@ -655,13 +655,6 @@ class PolylineDecorator: except: ref_point = None - if snap_prop.snap_type in ["Face", "Plane"]: - self.draw_batch("POINTS", mouse_point, decorator_color_unselected) - else: - self.draw_batch("POINTS", mouse_point, (1.0, 0.6, 0.0, 1.0)) - - if ref_point: - self.draw_batch("POINTS", ref_point, (1.0, 0.6, 0.0, 1.0)) default_container_elevation = tool.Ifc.get_object(tool.Root.get_default_container()).location.z projection_point = [] @@ -716,3 +709,12 @@ class PolylineDecorator: for i in range(1, len(polyline_points) - 1): edges.append((0, i, i + 1)) self.draw_batch("TRIS", polyline_points, (0, 1, 0, 0.1), edges) + + # Mouse points + if snap_prop.snap_type in ["Face", "Plane"]: + self.draw_batch("POINTS", mouse_point, decorator_color_unselected) + else: + self.draw_batch("POINTS", mouse_point, (1.0, 0.6, 0.0, 1.0)) + + if ref_point: + self.draw_batch("POINTS", ref_point, (1.0, 0.6, 0.0, 1.0))