Title: Assigning a MaterialProfileSet to an IfcStructuralCurveMember destroys its IfcEdge topology → "Show Loads" crashes with AttributeError · Issue #10050 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Assigning a MaterialProfileSet to an IfcStructuralCurveMember destroys its IfcEdge topology → "Show Loads" crashes with AttributeError · Issue #10050 · IfcOpenShell/IfcOpenShell
X Title: Assigning a MaterialProfileSet to an IfcStructuralCurveMember destroys its IfcEdge topology → "Show Loads" crashes with AttributeError · Issue #10050 · IfcOpenShell/IfcOpenShell
Description: Bug Description Found while testing the structural analysis workflow discussed here: https://community.osarch.org/discussion/3699/structural-analysis-in-bonsai-what-im-working-on Environment BonsaiPR 0.9.1-alpha261023-321089d (weekly bui...
Open Graph Description: Bug Description Found while testing the structural analysis workflow discussed here: https://community.osarch.org/discussion/3699/structural-analysis-in-bonsai-what-im-working-on Environment Bonsai...
X Description: Bug Description Found while testing the structural analysis workflow discussed here: https://community.osarch.org/discussion/3699/structural-analysis-in-bonsai-what-im-working-on Environment Bonsai...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/10050
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Assigning a MaterialProfileSet to an IfcStructuralCurveMember destroys its IfcEdge topology → \"Show Loads\" crashes with AttributeError","articleBody":"### Bug Description\n\nFound while testing the structural analysis workflow discussed here: https://community.osarch.org/discussion/3699/structural-analysis-in-bonsai-what-im-working-on\n\n### Environment\n\nBonsaiPR `0.9.1-alpha261023-321089d` (weekly build of Bonsai with merged open IfcOpenShell PRs; build report lists the merged PRs), Blender 5.2, Windows, IFC4 project, mm units. Could not reproduce against the official Bonsai build because it fails earlier in this workflow due to bugs already fixed in the merged PRs.\n\n### Steps to reproduce\n\n1. New mm project; structural point connections A (0,0,0), B (4000,0,0); curve member A→B via edge → member representation is `IfcTopologyRepresentation` with `IfcEdge((0,0,0),(4000,0,0))` ✓\n2. Connect member to A and B ✓ (edge still intact)\n3. **Assign a material profile set (S235 / HEB 160) to the member**\n4. Add Structural Analysis Model, load case, linear load (-25 N/mm), then \"Show Structural Load Case\" → crash\n\nI exported the IFC after every step. Everything is clean until step 3; only step 3 breaks the model (attached: `simply_supported_beam_01..07.ifc`, diff between `_04` and `_05` shows the breaking change).\n\n### What goes wrong\n\nStep 3 replaces the member's `IfcProductDefinitionShape`:\n\n```\n/* before */\n#111=IFCPRODUCTDEFINITIONSHAPE($,$,(#110)); /* #110 = TopologyRepresentation 'Edge' with IfcEdge */\n\n/* after: edge topology deleted */\n#111=IFCPRODUCTDEFINITIONSHAPE($,$,(#140,#133));\n#131=IFCCARTESIANPOINTLIST3D(((0.,0.,0.),(0.,0.,0.))); /* degenerate axis */\n#133=IFCSHAPEREPRESENTATION(#12,'Axis','Curve3D',(#132));\n#139=IFCEXTRUDEDAREASOLID(#125,#137,#138,0.); /* depth 0 */\n#140=IFCSHAPEREPRESENTATION(#11,'Body','SweptSolid',(#139));\n```\n\nThis violates IFC4 (curve members shall be represented by `IfcEdge`/`IfcEdgeCurve`/`IfcOrientedEdge`, per `IfcStructuralItem`) and produces degenerate geometry: axis points taken from the placement instead of the edge, extrusion length not derived from the edge/connected nodes (0).\n\nStep 4 then crashes in the load decorator, which assumes an edge without checking:\n\n```\nFile \".../structural/load_decoration_data.py\", line 455, in get_curve_member_rotation\n origin = edge.EdgeStart.VertexGeometry.Coordinates\nAttributeError: entity instance of type 'IFC4.IfcExtrudedAreaSolid' has no attribute 'EdgeStart'\n```\n\n(call chain: `operator.py:1439 → operator.py:146/149 → decorator.py:76/101 → load_decoration_data.py:111/861 → :455`)\n\n### Expected behaviour\n\n- Material assignment must not delete the member's `IfcEdge` topology; a body/axis representation is optional for structural members and, if generated, must be derived from the edge (non-zero length).\n- `get_curve_member_rotation()` should guard with `is_a(\"IfcEdge\")` / fall back to the placement, so one broken element cannot take down the load display.\n\n### Related fallout from the same root cause (seen while cleaning up broken models)\n\n- Degenerate shape representations left behind by replaced members end up attached to other structural items (e.g. a point connection's `IfcProductDefinitionShape`).\n- `IfcRelConnectsStructuralMember` can be left with an unset `RelatingStructuralMember` after replacing a member.\n- `operator.py:171`: `assert relating_structural_member` in `add_structural_member_connection` crashes when the field is unset (v0.7 silently finished).\n- Minor UX: linear load input shows no unit; internally N/mm is expected (auto-generated name \"Z -25 N/mm\"), inviting factor-1000 mistakes for N/m users.\n\n[simply_supported_beam_01-07.zip](https://github.com/user-attachments/files/33899928/simply_supported_beam_01-07.zip)\n\nNote: this report was created with AI assistance; all reproduction steps, exports and the traceback are from my own testing.\n\n### Attachments\n\n_No response_\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/balrobs","@type":"Person","name":"balrobs"},"datePublished":"2026-10-24T06:59:36Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/10050"}
| 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:d776dabc-af05-2a52-00cd-a755b5f7a33f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C32:1E7453:5A5D05:7EFF9F:6B047582 |
| html-safe-nonce | 8ecea9deace4891e0736649b7423815cf2a2b7ac6dd1c5d395a71ff3389e630c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzMyOjFFNzQ1Mzo1QTVEMDU6N0VGRjlGOjZCMDQ3NTgyIiwidmlzaXRvcl9pZCI6IjMyOTUyNTAwMTY4MjYwNjIyMTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ec4702c970191b2cde1c27193af8ea41759c3911dbb6a007af655662f4b8326d |
| hovercard-subject-tag | issue:6010363121 |
| 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/10050/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ddd4dcd9bbc695f324e23c767f003cf9c4e554fd933916349c601805d5d7c3eb/IfcOpenShell/IfcOpenShell/issues/10050 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ddd4dcd9bbc695f324e23c767f003cf9c4e554fd933916349c601805d5d7c3eb/IfcOpenShell/IfcOpenShell/issues/10050 |
| og:image:alt | Bug Description Found while testing the structural analysis workflow discussed here: https://community.osarch.org/discussion/3699/structural-analysis-in-bonsai-what-im-working-on Environment Bonsai... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | balrobs |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| 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 | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| 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