Title: Bonsai: fix/report IFC Set Origin no-op on SweptSolid representations (#6727) by petruconduraru · Pull Request #8584 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: fix/report IFC Set Origin no-op on SweptSolid representations (#6727) by petruconduraru · Pull Request #8584 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: fix/report IFC Set Origin no-op on SweptSolid representations (#6727) by petruconduraru · Pull Request #8584 · IfcOpenShell/IfcOpenShell
Description: Summary Fixes #6727. "IFC Set Origin" silently did nothing on IfcExtrudedAreaSolid/SweptSolid representations, OverrideOriginSet._execute skipped anything non-meshlike with a bare continue, giving the user no feedback. Approach A hybrid, not a blanket enable: real fix where it's safe to re-derive the extrusion, an explicit warning where it isn't. Bonsai already has a mature "regenerate SweptSolid from mesh" path (bim.update_representation via ifcopenshell.api.geometry.add_representation) that re-derives a single simple IfcExtrudedAreaSolid from a tessellated mesh outline, the same mechanism used whenever a wall/column mesh is edited directly and "Update Representation" is run. For that well-scoped case (can_regenerate_swept_solid), Set Origin now runs through the exact same path as the meshlike case. For anything riskier, a parametric material profile/layer set (IfcMaterialProfileSet/IfcMaterialLayerSet, used by walls/columns/beams) or a representation too complex to re-derive, add_representation would silently downgrade the parametric SweptSolid to a plain Tessellation, which is worse than the original no-op. Those now get an explicit self.report({"WARNING"}, ...) instead, matching the existing warning convention already used elsewhere in this file. Verification Live-tested in headless Blender (swap-protocol against the installed extension, restored after): Simple column, single rectangle extrusion, no material set: origin moved as expected, world-space bbox unchanged, representation stayed SweptSolid/IfcExtrudedAreaSolid. Wall with IfcMaterialLayerSet: operator now reports "IFC Set Origin is not supported for '...': its representation ('SweptSolid') is parametric and cannot be safely re-centered.", object left completely untouched (previously silent no-op). This change was made with the assistance of an AI tool. Refs #6205
Open Graph Description: Summary Fixes #6727. "IFC Set Origin" silently did nothing on IfcExtrudedAreaSolid/SweptSolid representations, OverrideOriginSet._execute skipped anything non-meshlike with a bare continu...
X Description: Summary Fixes #6727. "IFC Set Origin" silently did nothing on IfcExtrudedAreaSolid/SweptSolid representations, OverrideOriginSet._execute skipped anything non-meshlike with a bare...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8584
X: @github
Domain: github.com
IPv4 address: 140.82.112.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:7a7aca93-464f-64ab-39f9-40e82cd30bf8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9378:A5A21:62957:8671A:6B04AEDD |
| html-safe-nonce | ddd809391638142da34ec63dc7fcb91b8035cde29984a1fb934d709f1c3f0f67 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Mzc4OkE1QTIxOjYyOTU3Ojg2NzFBOjZCMDRBRUREIiwidmlzaXRvcl9pZCI6IjY3ODU1NTY1ODE0ODk4ODA3OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 93b676550cd9a2d76e24d74267924e370ddfbf80943a482329f06041eaa3e8d6 |
| hovercard-subject-tag | pull_request:4043360567 |
| 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/8584/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 | Summary Fixes #6727. "IFC Set Origin" silently did nothing on IfcExtrudedAreaSolid/SweptSolid representations, OverrideOriginSet._execute skipped anything non-meshlike with a bare continu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| 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