Title: Bonsai: revision cloud and batting styles are hardcoded; bubble size is fixed · Issue #9962 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: revision cloud and batting styles are hardcoded; bubble size is fixed · Issue #9962 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: revision cloud and batting styles are hardcoded; bubble size is fixed · Issue #9962 · IfcOpenShell/IfcOpenShell
Description: Problem In svgwriter.py, the marker paths that draw revision cloud bubbles and the batting zigzag set their style inline: # draw_revision_cloud_annotation self.svg.path(style="fill: none; stroke:red; stroke-width:0.20", d=revision_patter...
Open Graph Description: Problem In svgwriter.py, the marker paths that draw revision cloud bubbles and the batting zigzag set their style inline: # draw_revision_cloud_annotation self.svg.path(style="fill: none; stroke:re...
X Description: Problem In svgwriter.py, the marker paths that draw revision cloud bubbles and the batting zigzag set their style inline: # draw_revision_cloud_annotation self.svg.path(style="fill: none; stro...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9962
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bonsai: revision cloud and batting styles are hardcoded; bubble size is fixed","articleBody":"**Problem**\n\nIn `svgwriter.py`, the marker paths that draw revision cloud bubbles and the batting zigzag set their style inline:\n\n```python\n# draw_revision_cloud_annotation\nself.svg.path(style=\"fill: none; stroke:red; stroke-width:0.20\", d=revision_pattern)\n# draw_batting_annotation\nself.svg.path(style=\"fill: none; stroke:black; stroke-width:0.18\", d=path_data)\n```\n\nThis has two effects:\n- A drawing stylesheet can't change their colour or line weight. Other annotation types are styled through `PredefinedType-*` classes in `default.css`.\n- Classes from `EPset_Annotation.Classes` don't reach them. Those classes go on the referencing `\u003cpolyline>`, but SVG marker contents inherit style from where the `\u003cmarker>` sits in the document, not from the element that uses it.\n\nRevision cloud bubbles are also a fixed 15 mm on paper (`segment_width = 15.0`), with no way to make them bigger or smaller.\n\n**Proposed change**\n\n1. Give the marker `\u003cpath>` the annotation's classes, from `get_attribute_classes()`, and move the current styles into `default.css` as `.PredefinedType-REVISIONCLOUD` and `.PredefinedType-BATTING` rules. The polyline keeps its inline `stroke: none`, so the extra classes don't make it visible.\n2. Add `BBIM_RevisionCloud.BubbleSize` (`IfcReal`, paper millimetres, default 15) to `Psets_BBIM_Annotation.ifc`. The bubble pattern and marker box scale by `BubbleSize / 15`, and line weight stays with CSS. Paper units keep markup the same size at any drawing scale. Spacing along each edge is computed in Python, so CSS alone can't change the size.\n3. Seed a `REVISION-CLOUD` type (`BubbleSize` 15) and a `BATTING` type (`Thickness` 0.09 m) in the three Demo Libraries. The project templates link to these files, so new projects start with both types.\n\n**Compatibility**\n\nExisting projects use their own copy of `drawings/assets/default.css`, which won't have the two new rules. Their clouds and battings would fall back to the generic `.IfcAnnotation` rule (black, 0.3) until those two lines are added.\n\n**Related**\n\n#9710 (per-element classes) complements this change. With both merged, per-element classes such as `thick` or `dashed` would also restyle cloud bubbles and batting.\n\nI have a working implementation and will open a PR against `v0.9.0`.\n\n*Issue text drafted with the assistance of an AI coding tool.*\n","author":{"url":"https://github.com/theoryshaw","@type":"Person","name":"theoryshaw"},"datePublished":"2026-10-15T19:52:21Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9962"}
| 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:7ad64973-992f-958d-0402-038b1b6908f8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A320:2815D1:90CEFF:C5A68C:6B0480A3 |
| html-safe-nonce | 520d8bac34081ce399275210168c385dcddea164943998d75874b933b0fb0ed6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzIwOjI4MTVEMTo5MENFRkY6QzVBNjhDOjZCMDQ4MEEzIiwidmlzaXRvcl9pZCI6IjU5Mjk5ODI4NDgyNjUzODgxOTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5bd94757eee01aa31716fb22da3a6509bdcbfcf968bc8a6ba7bdcf9e7afaa57c |
| hovercard-subject-tag | issue:5872921214 |
| 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/9962/issue_layout |
| twitter:image | https://opengraph.githubassets.com/adda25c67caf06d19e25002787137c3d00715e887ac48841289e75d61b809354/IfcOpenShell/IfcOpenShell/issues/9962 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/adda25c67caf06d19e25002787137c3d00715e887ac48841289e75d61b809354/IfcOpenShell/IfcOpenShell/issues/9962 |
| og:image:alt | Problem In svgwriter.py, the marker paths that draw revision cloud bubbles and the batting zigzag set their style inline: # draw_revision_cloud_annotation self.svg.path(style="fill: none; stroke:re... |
| 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 | 0366ddfb372682a32e92a5d86155cb08fa83e5bbe79953a968789f2f7e24c511 |
| 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 | ed3f2e01f6b7672780c586c8af0e72726374d7b6 |
| 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