Title: Bonsai: assigning a profile type with a mapped (shared) representation errors ("Failed to set value") and empties sibling instances · Issue #8656 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: assigning a profile type with a mapped (shared) representation errors ("Failed to set value") and empties sibling instances · Issue #8656 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: assigning a profile type with a mapped (shared) representation errors ("Failed to set value") and empties sibling instances · Issue #8656 · IfcOpenShell/IfcOpenShell
Description: Bug Description For profile-based types whose occurrences share geometry via a type RepresentationMap + IfcMappedItem (typical of Revit exports, e.g. curtain-wall mullions where every occurrence of a type shares one mapped representation...
Open Graph Description: Bug Description For profile-based types whose occurrences share geometry via a type RepresentationMap + IfcMappedItem (typical of Revit exports, e.g. curtain-wall mullions where every occurrence of...
X Description: Bug Description For profile-based types whose occurrences share geometry via a type RepresentationMap + IfcMappedItem (typical of Revit exports, e.g. curtain-wall mullions where every occurrence of...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/8656
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bonsai: assigning a profile type with a mapped (shared) representation errors (\"Failed to set value\") and empties sibling instances","articleBody":"### Bug Description\n\nFor profile-based types whose occurrences share geometry via a type `RepresentationMap` + `IfcMappedItem` (typical of Revit exports, e.g. curtain-wall mullions where every occurrence of a type shares one mapped representation), **assigning such a type to an occurrence errors with a generic \"Failed to set value\", and a sibling/other type's object turns into an empty.**\n\n### Mechanism\n\n`ifcopenshell.api.type.assign_type` for a `PROFILE`-usage type triggers `bonsai.core.type.assign_type` → `model.regenerate_profile(obj)` → `DumbProfileJoiner.recreate_profile`. That rebuilds a *per-instance* extrusion and removes the occurrence's current (mapped) Body representation via `bonsai.core.geometry.remove_representation`.\n\nFor a **mapped** representation, `remove_representation` resolves the shared rep and loops `get_elements_of_type(...)` → `switch_from_representation(obj, representation)` — i.e. it switches **every sibling instance of the type away** from the shared mesh, leaving them as empties. The underlying exception is swallowed by the property-set callback (the type eyedropper / `relating_type` update) and surfaces to the user as Blender's generic **\"Failed to set value\"**.\n\n### Steps to reproduce\n\n1. Load an IFC whose profile-based types use mapped representations (e.g. a Revit curtain wall — all instances of a mullion type share one `RepresentationMap`).\n2. Select an occurrence and assign it a (different) such type via the Type panel / relating-type eyedropper.\n3. Observe: **\"Failed to set value\"**, and another type's object becomes an empty (loses its mesh).\n\n### Expected\n\nAssigning a type whose geometry is mapped/shared should keep the occurrence typed (mapped to the new type's geometry) without removing the shared representation or affecting sibling instances. Converting a typed occurrence to per-instance geometry should be an explicit, opt-in action — not an implicit side effect of `assign_type`.\n\n### Suggested fix\n\n`recreate_profile` (and, more generally, the per-instance profile regeneration path) should **skip mapped bodies** — a typed occurrence stays typed — instead of removing the shared mapped representation and cascading to its siblings.\n\n### Environment\n\n- Blender 4.5.7 LTS, Bonsai 0.8.6-alpha, Windows 10.\n","author":{"url":"https://github.com/theoryshaw","@type":"Person","name":"theoryshaw"},"datePublished":"2026-07-16T17:24:40Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/8656"}
| 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:9608d1a5-cb87-ed59-5dcf-1b53490e675d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 81E2:AA473:380FC2:4D90FB:6B046D11 |
| html-safe-nonce | e61a75ab92cce1a0d664312b79a65fe766188c735fde07f2492c92886ffe048d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUUyOkFBNDczOjM4MEZDMjo0RDkwRkI6NkIwNDZEMTEiLCJ2aXNpdG9yX2lkIjoiMzQ3NTEzNDU2ODcxNjMzMjMwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3140c61c56d9062ed39006a90c80cc178fe625c0238b7dcaae9d5de1bb468fbd |
| hovercard-subject-tag | issue:4904445107 |
| 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/8656/issue_layout |
| twitter:image | https://opengraph.githubassets.com/23addedc67605d1d323f7a8a65ebc21037e091a40402050a4fdf3f3efdad9bc8/IfcOpenShell/IfcOpenShell/issues/8656 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/23addedc67605d1d323f7a8a65ebc21037e091a40402050a4fdf3f3efdad9bc8/IfcOpenShell/IfcOpenShell/issues/8656 |
| og:image:alt | Bug Description For profile-based types whose occurrences share geometry via a type RepresentationMap + IfcMappedItem (typical of Revit exports, e.g. curtain-wall mullions where every occurrence of... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | theoryshaw |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f |
| 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 | cfb5f24c6e01d85f70804652a5107e5cac03a161 |
| 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