Title: Bonsai: window preview is offset by the host wall's translation · Issue #9347 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: window preview is offset by the host wall's translation · Issue #9347 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: window preview is offset by the host wall's translation · Issue #9347 · IfcOpenShell/IfcOpenShell
Description: Bug Description The blue preview for an IfcWindowType is displaced from its snapped host wall by approximately the wall's world translation. To reproduce: Start a new IFC project in Bonsai. Create or position an IfcWall so its object ori...
Open Graph Description: Bug Description The blue preview for an IfcWindowType is displaced from its snapped host wall by approximately the wall's world translation. To reproduce: Start a new IFC project in Bonsai. Create ...
X Description: Bug Description The blue preview for an IfcWindowType is displaced from its snapped host wall by approximately the wall's world translation. To reproduce: Start a new IFC project in Bonsai. Cre...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9347
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bonsai: window preview is offset by the host wall's translation","articleBody":"### Bug Description\n\nThe blue preview for an `IfcWindowType` is displaced from its snapped host wall by approximately the wall's world translation.\n\nTo reproduce:\n\n1. Start a new IFC project in Bonsai.\n2. Create or position an `IfcWall` so its object origin is away from the world origin (for example, X = 10 m).\n3. Select an `IfcWindowType` and activate the Window Tool.\n4. Hover over the wall and snap to its base axis.\n5. The blue window preview appears away from the wall instead of at the snap point.\n\nExpected: the preview is drawn at the snapped point on the host wall.\n\nActual: the preview appears to receive the wall translation twice and is offset by roughly the same distance as the wall is from the world origin.\n\nThis looks like a transform composition bug in [`ProductDecorator.get_generic_preview_data()`](https://github.com/IfcOpenShell/IfcOpenShell/blob/2b429dc605303154af3680a78241c0d617271fca/src/bonsai/bonsai/bim/module/model/decorator.py#L1532-L1600). In the base-axis branch, `rot_mat = snap_obj.matrix_world` retains the wall translation. That matrix is then composed after `translate_mouse`, which already places the preview at the snapped world point. The side-axis branch uses a rotation-only matrix instead.\n\nRelated: #5551 introduced the occurrence preview, but this report is specifically about the extra host-object translation.\n\n### Attachments\n\nThe original screenshot contained a private floor plan, so it isn't attached. The steps above should reproduce the problem in a fresh file.\n\n### Debug and Error Output\n\n```yes\nos: Darwin\nos_version: macOS Tahoe 26.5.2 (Darwin 25.5.0)\npython_version: 3.13.13\narchitecture: arm64\nmachine: arm64\nblender_version: 5.2.0 LTS\nbonsai_version: 0.8.6-alpha260819\nbonsai_commit_hash: 2b429dc\nbonsai_commit_date: 2026-08-19T20:07:52-03:00\nbonsai_git_branch: v0.8.0\nlast_error: None\n```\n\n\u003cimg width=\"1914\" height=\"1380\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/95022d5f-b38f-47b6-b1f7-01fb51212f70\" />\n","author":{"url":"https://github.com/PaulRBerg","@type":"Person","name":"PaulRBerg"},"datePublished":"2026-08-22T14:36:53Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9347"}
| 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 | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:452ea06f-9efa-6c2a-41fb-45128747796d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D324:1B09F6:534490:728538:6B0472B0 |
| html-safe-nonce | 1cf27d0509e815356c1d81b6427237584ca0f17becde68425f03b1707711172f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzI0OjFCMDlGNjo1MzQ0OTA6NzI4NTM4OjZCMDQ3MkIwIiwidmlzaXRvcl9pZCI6IjQxNDM3NDA4NTkzNTMxNjY1MTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 64647ff85f78de43e33a9d6bbe55e6a9f332ed7d66d56202c7a42bb6b2c084f1 |
| hovercard-subject-tag | issue:5222396753 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/9347/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76566f78aa070ae586b3ceb70b04b5c027770ebe659f37454067042d04523078/IfcOpenShell/IfcOpenShell/issues/9347 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76566f78aa070ae586b3ceb70b04b5c027770ebe659f37454067042d04523078/IfcOpenShell/IfcOpenShell/issues/9347 |
| og:image:alt | Bug Description The blue preview for an IfcWindowType is displaced from its snapped host wall by approximately the wall's world translation. To reproduce: Start a new IFC project in Bonsai. Create ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PaulRBerg |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cfb5f24c6e01d85f70804652a5107e5cac03a161 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width