mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Bonsai: plain-language message for Extend To Underside guard (#7454)
Per the reporter's follow-up on #7454, replace the LAYER2 jargon error with a message that names walls as the supported selection and states that extending columns or similar elements is not implemented yet. Also drop the explanatory inline comment block per project comment standards; the guard exists so an invalid selection (e.g. column plus slab with no wall) reports a clean error instead of re-raising the nested operator's CANCELLED as a Python traceback. Refs #7454 Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -1280,11 +1280,6 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bpy.ops.bim.extend_profile(join_type="T")
|
||||
|
||||
else:
|
||||
# Extend LAYER2 walls to the underside of another selected element.
|
||||
# Guard the selection here so an invalid combination (e.g. a column
|
||||
# and a slab, with no wall involved) reports a clean end-user error
|
||||
# instead of surfacing the nested operator's ERROR as a developer
|
||||
# traceback (see #7454).
|
||||
walls = [
|
||||
obj
|
||||
for obj in bpy.context.selected_objects
|
||||
@@ -1294,7 +1289,10 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bpy.ops.bim.extend_walls_to_underside()
|
||||
else:
|
||||
self.report(
|
||||
{"ERROR"}, "Please select at least one LAYER2 element and at least one other IFC element"
|
||||
{"ERROR"},
|
||||
"Extend to underside works with layered walls (LAYER2): "
|
||||
"select at least one wall plus the target element. "
|
||||
"Extending columns or similar elements is not supported yet.",
|
||||
)
|
||||
|
||||
def hotkey_S_F(self):
|
||||
|
||||
Reference in New Issue
Block a user