Title: bonsai: preserve original tessellation edges from the CGAL kernel by petruconduraru · Pull Request #8634 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: bonsai: preserve original tessellation edges from the CGAL kernel by petruconduraru · Pull Request #8634 · IfcOpenShell/IfcOpenShell
X Title: bonsai: preserve original tessellation edges from the CGAL kernel by petruconduraru · Pull Request #8634 · IfcOpenShell/IfcOpenShell
Description: Problem A tessellated IFC representation deliberately split into two coplanar faces (e.g. two coplanar quads sharing an edge) silently collapses into one merged n-gon the moment the object is edited in Bonsai, even though nothing in the source IFC file asked for that simplification. Root cause tool.Loader.create_settings() builds the geometry settings used for every import without enabling the CGAL kernel's cgal-original-edges option. Bonsai's default geometry library is hybrid-cgal-simple-opencascade, so most elements are triangulated by CGAL, which groups all mutually adjacent coplanar triangles into a single face boundary and only reports edges between non-coplanar components. Any edge between two distinct but coplanar source faces is therefore never recorded, so Geometry.dissolve_triangulated_edges silently merges those faces. This root cause was already independently diagnosed by the maintainers across #5862 (Gorgious56) and #6173 (aothms, who built the cgal-original-edges setting specifically for this), but nobody had wired it into Bonsai's loader. Fix Enable cgal-original-edges in Loader.create_settings(), so the kernel reports genuine face boundaries instead of grouping by coplanarity. Testing Live-verified in headless Blender 5.2 with a synthetic tessellated wall split into two coplanar quads: before the fix the imported mesh collapsed to a 6-vertex ngon plus a quad (10 edges), after the fix it kept 3 separate quads (11 edges), matching the OpenCASCADE kernel's output. Also verified against a synthetic wall with an opening (the case aothms flagged as risky, since booleans/voids have no meaningful original topology to preserve), using Bonsai's actual default hybrid-cgal-simple-opencascade library end to end: face and edge counts were identical with and without the setting, because that library already falls back to OpenCASCADE for boolean/void geometry, so this change does not affect that path. One caveat: if a user explicitly switches Geometry Library to plain CGAL on a model with lots of openings, a synthetic-only check of that combination showed more exposed triangulation edges. That combination was not the reported bug and is not the default path, so it was not chased further here. Fixes #5711. Also relevant to #5862 and #6747. Generated with the assistance of an AI coding tool.
Open Graph Description: Problem A tessellated IFC representation deliberately split into two coplanar faces (e.g. two coplanar quads sharing an edge) silently collapses into one merged n-gon the moment the object is edite...
X Description: Problem A tessellated IFC representation deliberately split into two coplanar faces (e.g. two coplanar quads sharing an edge) silently collapses into one merged n-gon the moment the object is edite...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8634
X: @github
Domain: github.com
IPv4 address: 140.82.114.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:4d3b7e40-b0da-e0d1-2add-877d493a0cb2 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E762:6FB4F:2AE2D2:3975A2:6B051696 |
| html-safe-nonce | c8fe691c174b02dc07ffa238ecf1fc873930880f8185a2515fff7353016e411f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzYyOjZGQjRGOjJBRTJEMjozOTc1QTI6NkIwNTE2OTYiLCJ2aXNpdG9yX2lkIjoiNzY1ODYxMDk2NDc1MzA5NDI5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b276ce857aae3a6a46a4d89f3ac8baaa96c4d82482f90e6fd492ebd0e8e86239 |
| hovercard-subject-tag | pull_request:4069026224 |
| 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/8634/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 A tessellated IFC representation deliberately split into two coplanar faces (e.g. two coplanar quads sharing an edge) silently collapses into one merged n-gon the moment the object is edite... |
| 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