Title: Bug: GrossSideArea == NetSideArea in Bonsai QTO (openings not accounted for) · Issue #9235 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bug: GrossSideArea == NetSideArea in Bonsai QTO (openings not accounted for) · Issue #9235 · IfcOpenShell/IfcOpenShell
X Title: Bug: GrossSideArea == NetSideArea in Bonsai QTO (openings not accounted for) · Issue #9235 · IfcOpenShell/IfcOpenShell
Description: Bug Description Testmodel: Testmodel.ifc.txt Symptom After Perform Quantity Takeoff in Bonsai: Source GrossSideArea NetSideArea Bonsai 9.80815 m² 9.80815 m² Solibri 20.08 m² 9.81 m² Bonsai Net ≈ Solibri Net. Bonsai Gross is wrong (equal ...
Open Graph Description: Bug Description Testmodel: Testmodel.ifc.txt Symptom After Perform Quantity Takeoff in Bonsai: Source GrossSideArea NetSideArea Bonsai 9.80815 m² 9.80815 m² Solibri 20.08 m² 9.81 m² Bonsai Net ≈ So...
X Description: Bug Description Testmodel: Testmodel.ifc.txt Symptom After Perform Quantity Takeoff in Bonsai: Source GrossSideArea NetSideArea Bonsai 9.80815 m² 9.80815 m² Solibri 20.08 m² 9.81 m² Bonsai Net ≈ So...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9235
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: GrossSideArea == NetSideArea in Bonsai QTO (openings not accounted for)","articleBody":"### Bug Description\n\nTestmodel: \n\n[Testmodel.ifc.txt](https://github.com/user-attachments/files/30659490/Testmodel.ifc.txt)\n\n## Symptom\n\nAfter *Perform Quantity Takeoff* in Bonsai:\n\n| Source | GrossSideArea | NetSideArea |\n|---|---|---|\n| Bonsai | 9.80815 m² | 9.80815 m² |\n| Solibri | 20.08 m² | 9.81 m² |\n\nBonsai Net ≈ Solibri Net. Bonsai Gross is wrong (equal to Net).\nApplies to (almost) all walls in this model, not just this one.\n\n---\n\n## Repro\n\n1. Open `tests/Testmodel.ifc` in Blender + Bonsai.\n2. Select wall `0P6UZIU3HDXOpp9cgjZsYR`\n (`Basic Wall:22_OW_HSB_260mm`, storey B-05).\n3. *Perform Quantity Takeoff* (rule `IFC4QtoBaseQuantitiesBlender`).\n4. Read `Qto_WallBaseQuantities.GrossSideArea` / `NetSideArea`.\n\nStandalone evidence (no Blender required):\n\n```text\nBody: Tessellation (IfcPolygonalFaceSet)\nHasOpenings: [] ← no IfcRelVoidsElement\nbbox L×H = 7.21 × 2.785 = 20.07985 ← Solibri Gross\nutil.shape.get_side_area = 9.808147 ← Solibri/Bonsai Net\ndisable-opening-subtractions True/False: identical (no opening relationships)\n```\n\nModel-wide (`tests/Testmodel.ifc`):\n\n| Measurement | Value |\n|---|---|\n| IfcWall | 120 |\n| walls with `HasOpenings` | **4** |\n| walls without opening relationship | **116** |\n| IfcOpeningElement total | 96 (24 on walls, 72 on slabs) |\n| walls where bbox L×H − mesh side > 0.05 m² | **84** |\n\nConclusion: openings are mostly **baked into the tessellation**,\nnot present as `IfcOpeningElement` on the wall.\n\n---\n\n## Root cause\n\nBonsai v0.8.x, `bonsai.bim.module.qto.calculator`:\n\n```python\ndef get_gross_side_area(obj):\n if not has_openings(obj): # ← only IfcRelVoidsElement\n return get_net_side_area(obj) # ← Gross becomes Net\n return get_lateral_area(..., subtract_openings=False, ...) / 2\n\ndef has_openings(obj):\n return [o for o in ifcopenshell.util.element.get_openings(element)]\n```\n\nRule mapping (`ifc5d/IFC4QtoBaseQuantitiesBlender.json`):\n\n```text\nGrossSideArea → get_gross_side_area\nNetSideArea → get_net_side_area\n```\n\n`get_net_side_area` = lateral mesh area / 2 → correct Net (≈ Solibri).\n\n`get_gross_side_area` short-circuits when there are no opening *relationships* →\nGross = Net, even when the mesh still has holes.\n\nThe same gate exists on `get_gross_volume` / `get_gross_surface_area`:\nthe gross path uses `disable-opening-subtractions`, but that only helps\nwhen there are opening relationships to skip. With pure tessellation,\ngross mesh == net mesh.\n\nIFC4 definition (for reference):\n\n- **GrossSideArea** — elevation view of the wall middle plane, **including** openings\n (≈ Length × Height of the full wall).\n- **NetSideArea** — the same plane, **excluding** openings.\n\nSolibri follows that definition (Gross = L×H). Bonsai only follows it when\n`HasOpenings` is populated.\n\n---\n\n## What this is not\n\n- Not a UI bug / rounding issue.\n- Not a wrong QTO rule mapping in the installed Blender JSON\n (it correctly maps to `get_*_side_area`; the skill-doc example mapping to\n `get_gross_surface_area` is outdated/incorrect vs the real JSON).\n- Not a Solibri error on this wall: L×H = 20.07985 matches Solibri 20.08.\n\n---\n\n## Solution directions\n\n### A — Fix in Bonsai `get_gross_side_area` (recommended for the QTO symptom)\n\nWhen `not has_openings(obj)`: Gross ≠ blindly Net, but bbox elevation:\n\n```python\n# already in calculator.py:\n# get_side_area(o) := max(get_x(o)*get_z(o), get_y(o)*get_z(o))\nreturn get_side_area(obj)\n```\n\nThen for this wall: Gross ≈ 20.08, Net ≈ 9.81 → Solibri parity.\nWithout openings (full rectangular wall) Gross ≈ Net remains.\n\n**Ceiling:** bbox L×H overestimates for L-shaped / non-rectangular\nplan outlines. Upgrade: outer-contour projection instead of bbox, or\nparametric Length×Height from type/occurrence.\n\nSame consideration for GrossVolume if volume must also be correct without\nopening relationships — separate, harder fix (reconstructing a mesh without\nholes is not possible from pure tessellation alone).\n\n### Attachments\n\n_No response_\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/PahlawanJoey","@type":"Person","name":"PahlawanJoey"},"datePublished":"2026-08-03T11:41:36Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9235"}
| 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:df8eea20-0d17-11a3-58e8-c9b21789d807 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DC40:99B56:72AE9B:A12F2C:6B047C47 |
| html-safe-nonce | 94e38819fd1f819af654aedd5ae6e961d56005eff882f161db64e738256c21c3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzQwOjk5QjU2OjcyQUU5QjpBMTJGMkM6NkIwNDdDNDciLCJ2aXNpdG9yX2lkIjoiNTczOTU0OTEzOTQzNjYwMDM5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7bfdab97eb27a27106ec94514aa1a516861ec4cf4c930334910a59401c9c6303 |
| hovercard-subject-tag | issue:5049377927 |
| 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/9235/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9ef64a4d7f711364fb4c75166d797a44df4c766b9d835cead814eb0a4b414e49/IfcOpenShell/IfcOpenShell/issues/9235 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9ef64a4d7f711364fb4c75166d797a44df4c766b9d835cead814eb0a4b414e49/IfcOpenShell/IfcOpenShell/issues/9235 |
| og:image:alt | Bug Description Testmodel: Testmodel.ifc.txt Symptom After Perform Quantity Takeoff in Bonsai: Source GrossSideArea NetSideArea Bonsai 9.80815 m² 9.80815 m² Solibri 20.08 m² 9.81 m² Bonsai Net ≈ So... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PahlawanJoey |
| 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