From e9ebba90505598b5c08a80370f2481b820ccaf55 Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Thu, 28 May 2026 09:44:59 -0500 Subject: [PATCH] Add Extend to Cursor button to active tool panel - Rename PROFILE panel button from "Extend Height" to "Extend to Cursor" with corrected description - Add "Extend to Cursor" button for basic extrusions (has_extrusion) in the else branch of draw_operations - Add extend_to_cursor icon files (copies of extend icon) Generated with the assistance of an AI coding tool. --- .../bonsai/bim/data/icons/dm_extend_to_cursor.png | Bin 0 -> 308 bytes .../bonsai/bim/data/icons/lm_extend_to_cursor.png | Bin 0 -> 346 bytes src/bonsai/bonsai/bim/module/model/workspace.py | 7 ++++++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/bonsai/bonsai/bim/data/icons/dm_extend_to_cursor.png create mode 100644 src/bonsai/bonsai/bim/data/icons/lm_extend_to_cursor.png diff --git a/src/bonsai/bonsai/bim/data/icons/dm_extend_to_cursor.png b/src/bonsai/bonsai/bim/data/icons/dm_extend_to_cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..7374945a28ee82d1704c884a8ceb032fd631efcb GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?4j!ywFfJby(BP*AeO zHKHUqKdq!Zu_%?Hyu4g5GcUV1Ik6yBFTW^#_B$IXprV7GE{-7)t#7Xzda)RauszW4 z-uu9I+fAn!^Ad856!@5#t@KZ*P0&*L?|#DDyZ(Ym1fwM<>(d5;4cb9QL$IQ2092H(Sp z4aR#G9Q^nDz#XGMxx42`X~eay{Ku`efQe7;1MBBwN(&!fRu2byhQZU-&t;ucLK6U^ CZg~{| literal 0 HcmV?d00001 diff --git a/src/bonsai/bonsai/bim/data/icons/lm_extend_to_cursor.png b/src/bonsai/bonsai/bim/data/icons/lm_extend_to_cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..afefb0e6b9a1b64b603b3f2d158b2d054ed64e9c GIT binary patch literal 346 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?4j!ywFfJby(BP*AeO zHKHUqKdq!Zu_%?Hyu4g5GcUV1Ik6yBFTW^#_B$IXprYrVE{-7)t#7XzavcibVS8Y| zZTAB6mkN(GR*JCuKX_s&BO<$}b+UPZmYGGDMTN-0y{dY;BAEvdF6(%|HvfnHA@4)V zp{}!+U(VXaY|+5Xpz!AT)@BEB_AIFjRjf7L0%>+kFN80ecuq?Hd2SU`ID>MiZENBU zQ}&J%d9N&D=TD zoFRHFVdQ&MBb@01CE(cK`qY literal 0 HcmV?d00001 diff --git a/src/bonsai/bonsai/bim/module/model/workspace.py b/src/bonsai/bonsai/bim/module/model/workspace.py index 834f6ab556..befae13be0 100644 --- a/src/bonsai/bonsai/bim/module/model/workspace.py +++ b/src/bonsai/bonsai/bim/module/model/workspace.py @@ -893,7 +893,7 @@ class EditObjectUI: add_layout_hotkey_operator(row, "Extend", "S_E", "", ui_context) row = cls.layout.row(align=True) if ui_context != "TOOL_HEADER" else row add_layout_hotkey_operator( - row, "Extend Height", "C_E", "Extend wall height to 3D cursor Z position", ui_context + row, "Extend to Cursor", "C_E", "Extend profile/extrusion to 3D cursor", ui_context ) row = cls.layout.row(align=True) if ui_context != "TOOL_HEADER" else row if AuthoringData.data["active_class"] in ( @@ -945,6 +945,11 @@ class EditObjectUI: add_layout_hotkey_operator( cls.layout, "Extend To Underside", "S_E", bpy.ops.bim.extend_walls_to_underside.__doc__, ui_context ) + if AuthoringData.data["has_extrusion"]: + row = cls.layout.row(align=True) if ui_context != "TOOL_HEADER" else row + add_layout_hotkey_operator( + row, "Extend to Cursor", "C_E", "Extend extrusion to 3D cursor", ui_context + ) if AuthoringData.data["is_flippable_element"]: cls.draw_flip(ui_context, row)