Title: SECTION_LEVEL annotations get deleted on drawing activation · Issue #9293 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: SECTION_LEVEL annotations get deleted on drawing activation · Issue #9293 · IfcOpenShell/IfcOpenShell
X Title: SECTION_LEVEL annotations get deleted on drawing activation · Issue #9293 · IfcOpenShell/IfcOpenShell
Description: Bug Description Bonsai version: 0.8.5 A SECTION_LEVEL annotation is always treated as an auto-managed reference annotation. As a result there is no way to place a free-standing section level to dimension an arbitrary height in a section/...
Open Graph Description: Bug Description Bonsai version: 0.8.5 A SECTION_LEVEL annotation is always treated as an auto-managed reference annotation. As a result there is no way to place a free-standing section level to dim...
X Description: Bug Description Bonsai version: 0.8.5 A SECTION_LEVEL annotation is always treated as an auto-managed reference annotation. As a result there is no way to place a free-standing section level to dim...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9293
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SECTION_LEVEL annotations get deleted on drawing activation","articleBody":"### Bug Description\n\n**Bonsai version:** 0.8.5\n\nA `SECTION_LEVEL` annotation is *always* treated as an auto-managed reference\nannotation. As a result there is no way to place a free-standing section level to\ndimension an *arbitrary* height in a section/elevation (eaves/Traufe, street level,\ntop of parapet, existing-terrain line, …) without inventing an artificial\n`IfcBuildingStorey`.\n\n#### Steps to reproduce\n\n1. Open a section (or elevation) drawing.\n2. Add a `SECTION_LEVEL` annotation and position it at an arbitrary height that is not a\n storey\n3. Click camera symbol on the drawing.\n4. The annotation is gone\n\n#### Relevant code\n\n- `bonsai/tool/drawing.py :: Drawing.is_auto_annotation` — returns `True` for every\n `SECTION_LEVEL`.\n- `bonsai/core/drawing.py :: sync_references` — deletes auto annotations without an\n assigned product; regenerates the rest.\n- `bonsai/tool/drawing.py :: Drawing.regenerate_storey_annotation` /\n `generate_storey_points` — resets geometry + name.\n\nNote that `SvgWriter.draw_section_level_annotation` already supports free datums: the\nlabel falls back to `element.Description` when there is no storey, and the value is taken\nfrom the first vertex's Z. So the rendering side is ready; only the auto-management gets\nin the way.\n\n#### Proposed fix\n\nTreat a **product-less `SECTION_LEVEL` as ordinary user data**, not as an auto reference —\ni.e. make `is_auto_annotation` return `False` for it:\n\n```python\n@classmethod\ndef is_auto_annotation(cls, element):\n if not (element.is_a(\"IfcAnnotation\")\n and element.ObjectType in (\"GRID\", \"SECTION\", \"ELEVATION\", \"SECTION_LEVEL\")):\n return False\n # A product-less SECTION_LEVEL is a free-standing elevation datum, not an\n # auto-managed reference: don't auto-delete/regenerate it, and allow manual deletion.\n if element.ObjectType == \"SECTION_LEVEL\" and cls.get_assigned_product(element) is None:\n return False\n return True\n```\n\nThis single gate flips all call sites consistently. Product-bound section levels and `GRID`/`SECTION`/`ELEVATION` references are unchanged,\nso their orphan auto-cleanup still works. The only intentional trade-off: product-less\n`SECTION_LEVEL`s are no longer auto-cleaned because they are now user-authored data.\n\nHappy to open a PR if this direction is acceptable.","author":{"url":"https://github.com/ch1bo","@type":"Person","name":"ch1bo"},"datePublished":"2026-08-12T23:16:37Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9293"}
| 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:28afc6dd-f1a6-93aa-bf32-c9ba0ef4f6d4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E2AE:15C795:802EB4:ACF4B7:6B04AA2E |
| html-safe-nonce | a58a0a41c7dc61d6abb9392526bbad03ee01d5961c00fbab6466932eb79c9a12 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkFFOjE1Qzc5NTo4MDJFQjQ6QUNGNEI3OjZCMDRBQTJFIiwidmlzaXRvcl9pZCI6IjM1NzY3NjQ2MTQ2MTAwMzcyOTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 10d82d1ccb049a7c3d68596d214746583eaf6bcc26d74e0b8333387f3a5f78d5 |
| hovercard-subject-tag | issue:5136145228 |
| 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/9293/issue_layout |
| twitter:image | https://opengraph.githubassets.com/44568b47d1a65f7a807e8f348b94ff65fd8578bf501713036a22ecc5b0f125d9/IfcOpenShell/IfcOpenShell/issues/9293 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/44568b47d1a65f7a807e8f348b94ff65fd8578bf501713036a22ecc5b0f125d9/IfcOpenShell/IfcOpenShell/issues/9293 |
| og:image:alt | Bug Description Bonsai version: 0.8.5 A SECTION_LEVEL annotation is always treated as an auto-managed reference annotation. As a result there is no way to place a free-standing section level to dim... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ch1bo |
| hostname | github.com |
| expected-hostname | github.com |
| None | 188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b |
| 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 | 557cfbac6cdb532730c95c90f2cefdc0c4128029 |
| 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