Title: Bonsai: re-orthonormalize item placement in Item Mode (#6996) by petruconduraru · Pull Request #8516 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: re-orthonormalize item placement in Item Mode (#6996) by petruconduraru · Pull Request #8516 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: re-orthonormalize item placement in Item Mode (#6996) by petruconduraru · Pull Request #8516 · IfcOpenShell/IfcOpenShell
Description: Fixes #6996. Problem Entering and leaving IFC Item Mode on an element with IfcExtrudedAreaSolid items flips their orientation, and the corruption persists after save and reopen. Root cause get_axis2placement uses the placement's RefDirection as the X axis without projecting it onto the plane perpendicular to Axis. IFC permits a non-perpendicular RefDirection (only its projection matters), so a legal placement yields a sheared, non-orthonormal matrix. import_item assigns it to the Blender item object's matrix_world, but a Blender transform stores only location/rotation/scale and cannot represent shear, so the next depsgraph evaluation recomposes it into a wrong rotation. sync_item_positions then writes that corrupted matrix back into IfcExtrudedAreaSolid.Position. Fix Re-orthonormalize the frame right after get_axis2placement (keep Z, project X onto the plane perpendicular to Z, recompute Y). This is the same Gram-Schmidt projection the geometry kernel already applies, so rendered geometry is unchanged; it only removes the shear Blender cannot store. No-op when RefDirection is already perpendicular/absent, guarded against the degenerate parallel case. Verification (live headless Blender, enter+leave+save over 50 solids) Max change in the normalized extrusion axis: without fix: 1.026 (segments flip, the bug) with fix: 7e-6 (identity within float noise) The items are no longer flagged as moved, so their Positions are left untouched. This contribution was generated with the assistance of an AI coding tool. 🤖 Generated with Claude Code
Open Graph Description: Fixes #6996. Problem Entering and leaving IFC Item Mode on an element with IfcExtrudedAreaSolid items flips their orientation, and the corruption persists after save and reopen. Root cause get_axis...
X Description: Fixes #6996. Problem Entering and leaving IFC Item Mode on an element with IfcExtrudedAreaSolid items flips their orientation, and the corruption persists after save and reopen. Root cause get_axis...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8516
X: @github
Domain: github.com
IPv4 address: 140.82.114.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:f76154f9-146b-c1e9-a227-5275f4eee50d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DC48:AC748:175CEA5:1E9CDBF:6B05504A |
| html-safe-nonce | 0b8417e3380f7624f6ed65948bc0ce07925c433d6e752c0fb4507b110a27d9c2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzQ4OkFDNzQ4OjE3NUNFQTU6MUU5Q0RCRjo2QjA1NTA0QSIsInZpc2l0b3JfaWQiOiIzNzM0MTIzNTM2MjA2NjE0NjAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 609b0e9957bd2aff14bc7d4f271d23e20c7304880a53f6424635f14ce2e9e18e |
| hovercard-subject-tag | pull_request:4035419920 |
| 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/8516/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 | Fixes #6996. Problem Entering and leaving IFC Item Mode on an element with IfcExtrudedAreaSolid items flips their orientation, and the corruption persists after save and reopen. Root cause get_axis... |
| 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