Title: Bonsai: skip fully off-screen edges in 2D proximity snap (#8187) by petruconduraru · Pull Request #8261 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: skip fully off-screen edges in 2D proximity snap (#8187) by petruconduraru · Pull Request #8261 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: skip fully off-screen edges in 2D proximity snap (#8187) by petruconduraru · Pull Request #8261 · IfcOpenShell/IfcOpenShell
Description: Implements the crash fix (Problem 1) from #8187, diagnosed and field-tested by @valentenet — all credit for the analysis to them. Problem In Raycast.ray_cast_by_proximity_2d, edge endpoints are projected with location_3d_to_region_2d, which returns None behind the camera. The builder only handles the XOR case (exactly one endpoint off-screen); when both endpoints are off-screen — an entire edge behind the camera, common when the viewport sits inside dense linked geometry — (None, None) lands in edge_verts and the proximity loop crashes on p0x, p0y = p0 with TypeError: cannot unpack non-iterable NoneType, on every handle_mouse_move. Fix Guard the loop and continue on a None endpoint. Such edges are not on screen, so no usable snap is lost; this also covers intersect_edge_region_border returning None in the XOR branch. Verify Logic guard in Blender-bound code; the reporter confirmed exactly this change eliminates the crash on their federated project (~1.42M verts). Syntax-checked; no headless test is possible for the modal path. Not included Problem 2 from the issue (snap evaluating heavy linked models, ~30s stalls) is a performance/design change with a user-facing toggle proposal — left for a follow-up so this crash guard can land independently. 🤖 Generated with Claude Code
Open Graph Description: Implements the crash fix (Problem 1) from #8187, diagnosed and field-tested by @valentenet — all credit for the analysis to them. Problem In Raycast.ray_cast_by_proximity_2d, edge endpoints are pro...
X Description: Implements the crash fix (Problem 1) from #8187, diagnosed and field-tested by @valentenet — all credit for the analysis to them. Problem In Raycast.ray_cast_by_proximity_2d, edge endpoints are pro...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8261
X: @github
Domain: github.com
IPv4 address: 140.82.113.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:8a5954a4-eab3-db56-ebb3-4fb05b761718 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 858A:147081:5ED34E:7DDC2F:6B04E20D |
| html-safe-nonce | 39d179ed917acf29b5a72583b803cb65991fa85c87ab815bef5f93cfd986221e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NThBOjE0NzA4MTo1RUQzNEU6N0REQzJGOjZCMDRFMjBEIiwidmlzaXRvcl9pZCI6IjExMjAyMzczNTkzMzA1NTAyODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 16ba8735afc8e95afa92a3adeea21b7dd71efae3674ce728237b3070b37a22b9 |
| hovercard-subject-tag | pull_request:3993461377 |
| 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/8261/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 | Implements the crash fix (Problem 1) from #8187, diagnosed and field-tested by @valentenet — all credit for the analysis to them. Problem In Raycast.ray_cast_by_proximity_2d, edge endpoints are pro... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 970f03f35f02bb123d2b6f1884601d89a570dc02e5ef9612b1b6ca5c033b1796 |
| 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 | ebcec4199c8521b643c068ef118a1ba9a43b678a |
| 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