Title: Bonsai: clean error instead of a traceback for Extend To Underside on a non-wall selection (#7454) by petruconduraru · Pull Request #8536 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: clean error instead of a traceback for Extend To Underside on a non-wall selection (#7454) by petruconduraru · Pull Request #8536 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: clean error instead of a traceback for Extend To Underside on a non-wall selection (#7454) by petruconduraru · Pull Request #8536 · IfcOpenShell/IfcOpenShell
Description: Refs #7454 (fixes the reported traceback; see scope note below). Problem Selecting a non-wall pair (e.g. a column and a slab) and pressing Shift+E surfaced a developer Python traceback ending at: File ".../bonsai/bim/module/model/workspace.py", line 1283, in hotkey_S_E bpy.ops.bim.extend_walls_to_underside() RuntimeError: ... Hotkey.hotkey_S_E's catch-all else unconditionally called bpy.ops.bim.extend_walls_to_underside(). When the selection has no path-connectable wall, that nested operator reports an ERROR and returns CANCELLED, which - invoked via bpy.ops from inside the outer operator - re-raises as an unhandled RuntimeError, so the user sees a full traceback. Fix (src/bonsai/bonsai/bim/module/model/workspace.py) Guard the selection with the operator's own predicate (tool.Parametric.is_path_connectable_wall): dispatch to extend_walls_to_underside only when at least one wall and at least one other element are selected, otherwise self.report({"ERROR"}, ...) with a clear message. Mirrors the accepted pattern already used by hotkey_S_X (align) for the analogous #6246. The valid wall + target path is unchanged. Scope This hardens the reported crash. It does not implement extending a column to a slab underside, which is the separate feature the issue title also asks for; that is left for a follow-up. Hence this references rather than closes #7454. Verification (live, headless Blender) Column + slab selected, bim.hotkey(hotkey="S_E"): Before: Python: Traceback ... with workspace.py / extend_walls_to_underside frames (the reported crash). After: a single clean Error: Please select at least one LAYER2 element and at least one other IFC element — no traceback. Generated with the assistance of an AI coding tool. 🤖 Generated with Claude Code
Open Graph Description: Refs #7454 (fixes the reported traceback; see scope note below). Problem Selecting a non-wall pair (e.g. a column and a slab) and pressing Shift+E surfaced a developer Python traceback ending at: F...
X Description: Refs #7454 (fixes the reported traceback; see scope note below). Problem Selecting a non-wall pair (e.g. a column and a slab) and pressing Shift+E surfaced a developer Python traceback ending at: F...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8536
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b68c471f-3c36-1336-d2a6-d9252945c78c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AA26:23AE4E:6AAFEE:89500D:6B05046D |
| html-safe-nonce | ba0eee3906676e07f4e0b8d2d0b728045f2e78467bc35c45a657cbd42f7aecf9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTI2OjIzQUU0RTo2QUFGRUU6ODk1MDBEOjZCMDUwNDZEIiwidmlzaXRvcl9pZCI6IjY0MDEyMzU1NzYzMzQ2NDg0MjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 09a98bbc9afc8d621ff66bce021b32ee4a4bcac14ed881e441f56329ddae7193 |
| hovercard-subject-tag | pull_request:4038167338 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/IfcOpenShell/IfcOpenShell/pull/8536/files |
| twitter:image | https://avatars.githubusercontent.com/u/139251053?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/139251053?s=400&v=4 |
| og:image:alt | Refs #7454 (fixes the reported traceback; see scope note below). Problem Selecting a non-wall pair (e.g. a column and a slab) and pressing Shift+E surfaced a developer Python traceback ending at: F... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width