Title: Bonsai: support IfcTrimmedCurve arc segments when editing a profile (#6929) by petruconduraru · Pull Request #8529 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: support IfcTrimmedCurve arc segments when editing a profile (#6929) by petruconduraru · Pull Request #8529 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: support IfcTrimmedCurve arc segments when editing a profile (#6929) by petruconduraru · Pull Request #8529 · IfcOpenShell/IfcOpenShell
Description: Closes #6929. Problem Tabbing into an extrusion to edit its profile crashes on Revit-exported geometry: Model.UnsupportedCurveForConversion: Profile has unsupported curve type: IfcTrimmedCurve(...,(IfcParameterValue(130.88...)),(IfcParameterValue(179.06...)),.T.,.PARAMETER.) tool.Model.convert_curve_to_mesh handles IfcPolyline, IfcCompositeCurve, IfcIndexedPolyCurve and IfcCircle, but not IfcTrimmedCurve. Revit exports a wall/opening profile as an IfcCompositeCurve mixing polyline segments with trimmed-circle arc segments, so the recursion hits an IfcTrimmedCurve, falls through to the else, and raises, aborting the whole tab-into-edit. Fix (src/bonsai/bonsai/tool/model.py) Add an IfcTrimmedCurve branch that reconstructs a circular arc as a 3-point (start, mid, end) arc into an IFCARCINDEX vertex group, exactly how IfcArcIndex segments already round-trip: trim parameters are read in the project plane-angle unit and converted to radians (the sample file uses DEGREE); both IfcParameterValue and IfcCartesianPoint trims are supported; SenseAgreement unwraps the end angle so the midpoint lands on the actually-swept arc, not its complement. Non-circular basis curves still raise UnsupportedCurveForConversion rather than emit silently wrong geometry (a deliberate, contained scope: circular arcs are the reported and by far most common Revit case). Verification (live, headless Blender, on the issue's file) Driving the real tool.Model.import_profile on the affected profile (#41622): Before: UnsupportedCurveForConversion raised, edit aborts. After: imports cleanly, 27 verts, 5 arc groups, no exception. Ground-truth check: each reconstructed arc's two endpoints coincide (to ~1e-6) with the endpoints of the adjacent polyline segments in the composite curve, and the midpoint lies on the swept arc, confirming both the angle-unit conversion and the SenseAgreement direction handling. Generated with the assistance of an AI coding tool. 🤖 Generated with Claude Code
Open Graph Description: Closes #6929. Problem Tabbing into an extrusion to edit its profile crashes on Revit-exported geometry: Model.UnsupportedCurveForConversion: Profile has unsupported curve type: IfcTrimmedCurve(.....
X Description: Closes #6929. Problem Tabbing into an extrusion to edit its profile crashes on Revit-exported geometry: Model.UnsupportedCurveForConversion: Profile has unsupported curve type: IfcTrimmedCurve(.....
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8529
X: @github
Domain: github.com
IPv4 address: 140.82.112.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:e4185f87-2c7c-7073-fe79-7f5d7ca13bb9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D8B0:20A7E7:352C60:4480AD:6B04F495 |
| html-safe-nonce | 765f65dd36783f30372fd26292d6db93b0bd33233cc7bf5ca0cf8f1c51b36a62 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEIwOjIwQTdFNzozNTJDNjA6NDQ4MEFEOjZCMDRGNDk1IiwidmlzaXRvcl9pZCI6IjQ5NjQzNTM3MjE5OTY5OTc3ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a5c094a892eac796d92a00f80ad7ee81f4728fd4bcfbcf7225b9fab4ca238cd4 |
| hovercard-subject-tag | pull_request:4037980620 |
| 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/8529/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 | Closes #6929. Problem Tabbing into an extrusion to edit its profile crashes on Revit-exported geometry: Model.UnsupportedCurveForConversion: Profile has unsupported curve type: IfcTrimmedCurve(..... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2c3971d6ab4be607cf9a26ac26ef0a7bfce380ec2ba14642e64028ad07a492b9 |
| 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 | b3f1d45dee14b3f87c64e9017a9c08d011561786 |
| 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