René's URL Explorer Experiment


Title: finish_editing_door/_window: crash when the filling's type has no representation; styles and material association dropped when it succeeds · Issue #9283 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: finish_editing_door/_window: crash when the filling's type has no representation; styles and material association dropped when it succeeds · Issue #9283 · IfcOpenShell/IfcOpenShell

X Title: finish_editing_door/_window: crash when the filling's type has no representation; styles and material association dropped when it succeeds · Issue #9283 · IfcOpenShell/IfcOpenShell

Description: Environment Bonsai / IfcOpenShell 0.8.5, Blender 5.2.0 LTS, Windows Model schema IFC4X3_ADD2, length unit METRE, contexts Model/Body/MODEL_VIEW + Model/FootPrint/PLAN_VIEW + Plan/Axis/GRAPH_VIEW (no Model/Profile/ELEVATION_VIEW) Both fin...

Open Graph Description: Environment Bonsai / IfcOpenShell 0.8.5, Blender 5.2.0 LTS, Windows Model schema IFC4X3_ADD2, length unit METRE, contexts Model/Body/MODEL_VIEW + Model/FootPrint/PLAN_VIEW + Plan/Axis/GRAPH_VIEW (n...

X Description: Environment Bonsai / IfcOpenShell 0.8.5, Blender 5.2.0 LTS, Windows Model schema IFC4X3_ADD2, length unit METRE, contexts Model/Body/MODEL_VIEW + Model/FootPrint/PLAN_VIEW + Plan/Axis/GRAPH_VIEW (n...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9283

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"finish_editing_door/_window: crash when the filling's type has no representation; styles and material association dropped when it succeeds","articleBody":"### Environment\n\n- Bonsai / IfcOpenShell **0.8.5**, Blender **5.2.0 LTS**, Windows\n- Model schema `IFC4X3_ADD2`, length unit METRE, contexts `Model/Body/MODEL_VIEW` + `Model/FootPrint/PLAN_VIEW` + `Plan/Axis/GRAPH_VIEW` (no `Model/Profile/ELEVATION_VIEW`)\n\nBoth findings below are triggered by the same operator and were reproduced on an 11-product file reduced from a production model. Happy to attach that file if useful.\n\n---\n\n## Finding 1 — crash when the filling's type carries no representation\n\n`bim.finish_editing_door` / `bim.finish_editing_window` aborts whenever the filling has an `IfcTypeProduct` that has no `RepresentationMap`.\n\n```\nFile \"bonsai/bim/module/model/door.py\", line 164, in update_door_modifier_representation\n    tool.Model.update_simple_openings(element)\nFile \"bonsai/tool/model.py\", line 1786, in update_simple_openings\n    new_representation = FilledOpeningGenerator().generate_opening_from_filling(...)\nFile \"bonsai/bim/module/model/opening.py\", line 346, in generate_opening_from_filling\n    filling_geometry = ifcopenshell.geom.create_shape(settings, filling_body)\nAttributeError: 'NoneType' object has no attribute 'wrapped_data'\n```\n\nCause, from `generate_opening_from_filling`:\n\n```python\nfilling_type = ifcopenshell.util.element.get_type(filling)\nif filling_type:\n    profile = get_representation(filling_type, \"Model\", \"Profile\", \"ELEVATION_VIEW\")\n    filling_obj = tool.Ifc.get_object(filling_type)      # switched to the TYPE\n...\nfilling_element = tool.Ifc.get_entity(filling_obj)        # = the type\nfilling_body = get_representation(filling_element, context)   # None\nfilling_geometry = ifcopenshell.geom.create_shape(settings, filling_body)\n```\n\nOnce the filling is typed, geometry is looked up on the **type**. If the type has neither a `Model/Profile/ELEVATION_VIEW` nor a `Model/Body/MODEL_VIEW` representation, `None` reaches `create_shape`.\n\nReproduced with a door whose type has exactly **one** occurrence, in a normal 115 mm wall with a valid Body representation — so it is not related to shared types or to hosts without geometry.\n\n**Relation to #8215:** identical traceback signature, different trigger. #8215 was resolved by restricting when the gizmo is shown; the `None` guard inside `generate_opening_from_filling` was not added, and this path is unaffected by that change.\n\n**Workaround, and a second crash on the way there.** Giving the type a `Model/Body/MODEL_VIEW` representation fixes it — but the change has to go through disk. The loader creates the type's Blender object mesh during import (`Create element types`). If the `RepresentationMap` is added in the running session, the type object stays an EMPTY with `obj.data is None` and `finish` then fails earlier:\n\n```\nFile \"bonsai/bim/module/model/door.py\", line 100, in update_door_modifier_representation\n    tool.Model.replace_object_ifc_representation(body, obj, model_representation)\n...\nFile \"bonsai/tool/geometry.py\", line 1147, in record_object_materials\n    props = tool.Geometry.get_mesh_props(obj.data)\nAttributeError: 'NoneType' object has no attribute 'BIMMeshProperties'\n```\n\nThis looks close to PR #8381 (*add door geometry to an object with no mesh data*, #7117), though I have not verified that the PR covers this path.\n\n---\n\n## Finding 2 — styles and material association are dropped on success\n\nWhen `finish` does run, it rebuilds the Body representation and the element loses its appearance data. Measured before and after on the same element:\n\n| | before | after |\n|---|---|---|\n| Body representation | `#46474` | `#47434` (new, old removed) |\n| `IfcStyledItem` per item | `[1, 1, 1]` | `[0, 0, 0]` |\n| Blender material slots | 2 (opaque frame, glass at alpha 0.28) | none |\n\nThe `IfcStyledItem`s were bound to the representation items, so losing them with the items is arithmetically unavoidable. The **material** route, however, is also lost:\n\n| | before | after |\n|---|---|---|\n| `ifcopenshell.util.element.get_material(element)` | `Glas ESG DIN EN 12150` | `None` |\n| `IfcRelAssociatesMaterial` referencing the element | 1 | **0** |\n\nSetup for that second table: item-bound styled items removed first, then `style.assign_material_style` + `material.assign_material`, then the representation switched so Blender shows exactly one slot (the material's style, alpha 0.28). After `finish`, the association relationship is gone from the file — the material entity and its `IfcMaterialDefinitionRepresentation` survive, only the link to the element is removed.\n\nIFC 4.3.2, 8.12.3.28 `IfcStyledItem` describes both routes as valid — via `IfcProductDefinitionShape` with an `Item`, or via `IfcMaterialDefinitionRepresentation` without one. Neither survives the operator, so there is currently no way to keep colour on an element that is edited through the door/window panel.\n\n---\n\n## Note on opening regeneration\n\nRelated but not reported here as a defect: `update_simple_openings` regenerates the `IfcOpeningElement` from the filling, with `opening_size = Vector([x, z])` overridden by `OverallWidth` / `OverallHeight`. An authored opening that is deliberately larger than its filling therefore shrinks on every edit — measured: `-0.070…2.010` became `0.000…2.010`. This is consistent with #4988, which was closed without changing the behaviour, so I assume it is intended.\n\n---\n\n## Preconditions to reproduce\n\n1. A typed `IfcDoor` or `IfcWindow` filling an opening, where the type has **no** `RepresentationMap` → Finding 1\n2. The same filling with a type that **does** carry a Body representation, loaded from disk, with `IfcStyledItem`s on its representation items and/or an associated `IfcMaterial` → Finding 2\n\nI have a minimal 11-product `IFC4X3_ADD2` file that reproduces both and can attach it. I did not verify whether either finding reproduces in a fresh Demo Project — its types carry representations, so Finding 1 would not trigger there without first removing them.\n","author":{"url":"https://github.com/M-H-H-B","@type":"Person","name":"M-H-H-B"},"datePublished":"2026-08-09T20:50:00Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9283"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ce50e4a1-ae86-13d0-c449-eb46f22588a4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB8D2:15C795:83CADF:B1D71F:6B04AB0C
html-safe-noncee475d52a49280d0948e49da322ec3eac2eb49733ac0e39ec7be06403d8c5b6e9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEQyOjE1Qzc5NTo4M0NBREY6QjFENzFGOjZCMDRBQjBDIiwidmlzaXRvcl9pZCI6IjY2Mjg4OTc2MTUwMDg1NDE0NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac612905136df28ee6113e8c0b6bcad495abed1c57eaaeb2581a671c84f2b5ca94
hovercard-subject-tagissue:5104664495
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/9283/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bba49c552eb1dc7adbb82f13576b29902d5a0b59152cd090a77a7ff6231628c0/IfcOpenShell/IfcOpenShell/issues/9283
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bba49c552eb1dc7adbb82f13576b29902d5a0b59152cd090a77a7ff6231628c0/IfcOpenShell/IfcOpenShell/issues/9283
og:image:altEnvironment Bonsai / IfcOpenShell 0.8.5, Blender 5.2.0 LTS, Windows Model schema IFC4X3_ADD2, length unit METRE, contexts Model/Body/MODEL_VIEW + Model/FootPrint/PLAN_VIEW + Plan/Axis/GRAPH_VIEW (n...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameM-H-H-B
hostnamegithub.com
expected-hostnamegithub.com
Nonef1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1
turbo-cache-controlno-preview
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/9283#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9283
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9283
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9283
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9283
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9283
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests937 (937)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
https://github.com/IfcOpenShell/IfcOpenShell
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9283
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9283
finish_editing_door/_window: crash when the filling's type has no representation; styles and material association dropped when it succeedshttps://github.com/IfcOpenShell/IfcOpenShell/issues/9283#top
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
https://github.com/M-H-H-B
M-H-H-Bhttps://github.com/M-H-H-B
on Aug 9, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9283#issue-5104664495
#8215https://github.com/IfcOpenShell/IfcOpenShell/issues/8215
#8215https://github.com/IfcOpenShell/IfcOpenShell/issues/8215
#8381https://github.com/IfcOpenShell/IfcOpenShell/pull/8381
#7117https://github.com/IfcOpenShell/IfcOpenShell/issues/7117
#4988https://github.com/IfcOpenShell/IfcOpenShell/issues/4988
https://github.com/Zolkapoczai
Zolkapoczaihttps://github.com/Zolkapoczai
on Aug 13, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9283#issuecomment-5279857806
petruconduraruhttps://github.com/petruconduraru
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
on Oct 2, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9283#event-32330675596
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9283
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9283
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.