Title: bonsai: catch kernel RuntimeError when finishing an arbitrary profile edit by petruconduraru · Pull Request #8635 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: bonsai: catch kernel RuntimeError when finishing an arbitrary profile edit by petruconduraru · Pull Request #8635 · IfcOpenShell/IfcOpenShell
X Title: bonsai: catch kernel RuntimeError when finishing an arbitrary profile edit by petruconduraru · Pull Request #8635 · IfcOpenShell/IfcOpenShell
Description: Problem Finishing an edit on an arbitrary profile sometimes crashes with a raw traceback instead of the intended "INVALID PROFILE" popup. Root cause auto_detect_profiles() reconstructs an IfcIndexedPolyCurve from the edited Blender mesh and calls ifcopenshell.geom.create_shape() on it to sort outer boundaries from voids. Every other invalid-profile case in that function (unclosed loops, malformed arcs or circles) returns a graceful (False, reason) tuple, but this create_shape call had no exception handling at all. When the reconstructed curve is geometrically valid topology but numerically degenerate at the kernel's internal tolerance, create_shape raises RuntimeError, which propagated straight through export_profile and crashed bim.edit_arbitrary_profile with a raw traceback. Fix Catch RuntimeError around the create_shape call and treat it the same as the other invalid-profile branches, so a bad edit surfaces the existing friendly error message instead of an unhandled crash. Testing Live-verified in headless Blender 5.2 with a weld-safe mesh whose coordinates land near the kernel's internal degeneracy tolerance once converted to project length units: before the fix, create_shape raised RuntimeError and crashed the operator; after the fix, the same case returns gracefully and surfaces the friendly INVALID PROFILE message instead. Fixes #6259. Generated with the assistance of an AI coding tool.
Open Graph Description: Problem Finishing an edit on an arbitrary profile sometimes crashes with a raw traceback instead of the intended "INVALID PROFILE" popup. Root cause auto_detect_profiles() reconstructs an...
X Description: Problem Finishing an edit on an arbitrary profile sometimes crashes with a raw traceback instead of the intended "INVALID PROFILE" popup. Root cause auto_detect_profiles() reconst...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8635
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
| 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:aef41ffc-8327-1da0-6763-a2e7a899da5b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B1FA:2739CD:C134B0:100FA5A:6B050244 |
| html-safe-nonce | 54c9e25c566f259298eb0f2aacab15da69f36f8870eff969d835fb3849c3205b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUZBOjI3MzlDRDpDMTM0QjA6MTAwRkE1QTo2QjA1MDI0NCIsInZpc2l0b3JfaWQiOiI3OTExNTk4NDM3MDAxNjU4OTQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1031c0d3c6c89a82d8f515e7ca383002ef8f9b5f7688154c4dcdf1d534f49824 |
| hovercard-subject-tag | pull_request:4069029730 |
| 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/8635/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 | Problem Finishing an edit on an arbitrary profile sometimes crashes with a raw traceback instead of the intended "INVALID PROFILE" popup. Root cause auto_detect_profiles() reconstructs an... |
| 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