René's URL Explorer Experiment


Title: NetSideArea / GrossSideArea use wrong face on Y-oriented walls · Issue #9237 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: NetSideArea / GrossSideArea use wrong face on Y-oriented walls · Issue #9237 · IfcOpenShell/IfcOpenShell

X Title: NetSideArea / GrossSideArea use wrong face on Y-oriented walls · Issue #9237 · IfcOpenShell/IfcOpenShell

Description: Bug Description This testmodel is full of discoveries :) Testmodel.ifc.txt Summary For walls whose length runs along local Y (thickness along X), Bonsai QTO reports NetSideArea ≈ the end face area instead of the elevational side area. So...

Open Graph Description: Bug Description This testmodel is full of discoveries :) Testmodel.ifc.txt Summary For walls whose length runs along local Y (thickness along X), Bonsai QTO reports NetSideArea ≈ the end face area ...

X Description: Bug Description This testmodel is full of discoveries :) Testmodel.ifc.txt Summary For walls whose length runs along local Y (thickness along X), Bonsai QTO reports NetSideArea ≈ the end face area ...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NetSideArea / GrossSideArea use wrong face on Y-oriented walls","articleBody":"### Bug Description\n\nThis testmodel is full of discoveries :) [Testmodel.ifc.txt](https://github.com/user-attachments/files/30661338/Testmodel.ifc.txt)\n\n## Summary\n\nFor walls whose length runs along **local Y** (thickness along X), Bonsai QTO reports `NetSideArea` ≈ the **end face** area instead of the **elevational side** area. Solibri reports the correct elevation area.\n\nHardcoded `main_axis=\"x\"` in `get_net_side_area` / `get_gross_side_area` causes this.\n\n## Environment\n\n- Bonsai (Blender 5.1 / 5.2 bonsaiPR) — `bonsai.bim.module.qto.calculator`\n- Rule set: `IFC4QtoBaseQuantitiesBlender`\n- Test file: Revit IFC4 export with tessellated wall bodies\n\n## Symptom\n\nExample wall: `GlobalId = \"28smR2HdnDTwB_9bNuGXiG\"`  \n(`IfcWall`, `Basic Wall:22_OW_HSB_260mm`)\n\n| Source | NetSideArea | GrossSideArea |\n|---|---|---|\n| **Solibri** | **4.24 m²** | **9.60 m²** |\n| **Bonsai** | **1.149 m²** | **1.149 m²** |\n\nSame wrong ~1.15 m² Net/Gross on these GlobalIds (same wall type, storeys A-04 / A-05 / A-06):\n\n- `3tvLG0IW588fGiE82pfHkJ`\n- `0MtPlpjv53oewZlKiNYCan`\n- `28smR2HdnDTwB_9bNuGXiG`\n- `11hDQrh5r9oA3IFk8xT7uM`\n- `1LyztsM459p9F0r7DHXwsr`\n- `2k0liE_bbEQvLYpgd0NHwv`\n\n## Geometry evidence (IfcOpenShell)\n\nWall bbox / side areas for `28smR2HdnDTwB_9bNuGXiG`:\n\n```text\nbbox:  x=0.260  y=3.595  z=2.670   ← length along Y, thickness along X\nL×H:   max(x*z, y*z) = 9.5987      ← matches Solibri Gross 9.60\nsideX: get_side_area(axis=\"X\") = 4.2437  ← matches Solibri Net 4.24\nsideY: get_side_area(axis=\"Y\") = 1.1492  ← matches Bonsai 1.149\n```\n\nSo Bonsai is measuring the **short end** (view along Y), not the **long elevation** (view along X).\n\nWalls that run along X are unaffected (long faces have Y normals — the hardcoded axis happens to be correct).\n\nIn the test model: **12 / 156** walls are longer in Y; all of them show this mismatch.\n\n## Root cause\n\n```python\n# bonsai.bim.module.qto.calculator\n\ndef get_net_side_area(obj):\n    return get_lateral_area(obj, exclude_end_areas=True, main_axis=\"x\") / 2\n\ndef get_gross_side_area(obj):\n    if not has_openings(obj):\n        return get_net_side_area(obj)\n    return get_lateral_area(obj, exclude_end_areas=True, subtract_openings=False, main_axis=\"x\") / 2\n```\n\n`main_axis=\"x\"` is hardcoded. Inside `get_lateral_area`:\n\n```python\nmain_axis_guess = get_object_main_axis(obj)\nif main_axis_guess == \"x\" or main_axis == \"x\":  # always True when caller passes \"x\"\n    main_axis_v = x_axis\n    side_axis = y_axis\n    ...\n```\n\nWith `exclude_end_areas=True`, faces whose normal aligns with `main_axis_v` are treated as ends and **dropped**.\n\n| Wall orientation | Long-face normals | Effect of forcing `main_axis=\"x\"` |\n|---|---|---|\n| Length along **X** (thickness Y) | ±Y | Long faces kept → correct |\n| Length along **Y** (thickness X) | ±X | Long faces dropped as “ends” → only short ends remain → ~1.15 m² |\n\n`get_object_main_axis()` would return `\"y\"` for these walls (longest bbox edge), but the hardcoded `\"x\"` overrides it.\n\n## Related issue (same walls)\n\n`GrossSideArea == NetSideArea` here for a second reason already reported separately:\n\n- Body is `Tessellation` with openings baked into the mesh\n- `HasOpenings` is empty → `get_gross_side_area` early-returns `get_net_side_area`\n- Solibri Gross = L×H (9.60); Bonsai never reaches a true gross path\n\nEven after fixing Gross≠Net for tessellated walls, **Net would still be wrong** on Y-oriented walls until the axis bug is fixed.\n\n## Expected behaviour\n\nPer IFC4 `Qto_WallBaseQuantities`:\n\n- **NetSideArea** — elevation area of the wall middle plane, excluding openings  \n  → here ≈ **4.24 m²** (`max` side area / elevational face)\n- **GrossSideArea** — same plane, including openings  \n  → here ≈ **9.60 m²** (Length × Height)\n\n## Proposed fix\n\n1. **Stop hardcoding** `main_axis=\"x\"` in `get_net_side_area` / `get_gross_side_area`.\n2. Pass the detected main axis, e.g. `main_axis=get_object_main_axis(obj)`, **or** leave `main_axis=\"\"` and rely on the guess only.\n3. Add a regression test:\n   - wall longer in X → SideArea ≈ Y-facing elevation\n   - wall longer in Y → SideArea ≈ X-facing elevation  \n   Fixture GlobalIds above; assert Net ≈ 4.24, not ≈ 1.15.\n4. Optional simpler alternative for SideArea: `get_max_side_area(geometry) / 2` equivalent (largest elevational face), which matches Solibri Net on these walls.\n\nAlso revisit the `main_axis_guess == \"y\"` branch in `get_lateral_area` (it currently maps `side_axis = z_axis`), once callers stop forcing `\"x\"`.\n\n## Repro\n\n1. Open a model with a wall longer along Y than X (e.g. the GlobalIds above).\n2. Run **Perform Quantity Take-off** (`IFC4QtoBaseQuantitiesBlender`).\n3. Read `Qto_WallBaseQuantities.NetSideArea`.\n4. Compare to Solibri NetSideArea or to `ifcopenshell.util.shape.get_side_area(geom, axis=\"X\")` when `get_y(geom) > get_x(geom)`.\n\n## Impact\n\nAny non-X-aligned wall gets a systematically wrong (usually much too small) SideArea. Quantity takeoff, formwork estimates, and cost links that use `NetSideArea` / `GrossSideArea` are wrong for those elements.\n\n@BIMvoice \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-03T12:37:37Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9237"}

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:2a58797f-56bc-eb31-9f69-ce38d673ab73
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD754:300351:424AC2:5C37A9:6B047BFF
html-safe-noncea4a70a2f7d5f8c3f3ab100d00d249a863aed8840fc9b8aa1a0e35f38c2696f9a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzU0OjMwMDM1MTo0MjRBQzI6NUMzN0E5OjZCMDQ3QkZGIiwidmlzaXRvcl9pZCI6IjgxMTYzNDQzNDI2NjAyODMzOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb23f999065d791868b661ed344115b8e196c0d278d95a0475e6456599f48c38e
hovercard-subject-tagissue:5049856533
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/9237/issue_layout
twitter:imagehttps://opengraph.githubassets.com/734f0dcc7bbf7ce0fb6719afab71220bd89376305adb3ccbbd47c29f42912d40/IfcOpenShell/IfcOpenShell/issues/9237
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/734f0dcc7bbf7ce0fb6719afab71220bd89376305adb3ccbbd47c29f42912d40/IfcOpenShell/IfcOpenShell/issues/9237
og:image:altBug Description This testmodel is full of discoveries :) Testmodel.ifc.txt Summary For walls whose length runs along local Y (thickness along X), Bonsai QTO reports NetSideArea ≈ the end face area ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePahlawanJoey
hostnamegithub.com
expected-hostnamegithub.com
None0366ddfb372682a32e92a5d86155cb08fa83e5bbe79953a968789f2f7e24c511
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
releaseed3f2e01f6b7672780c586c8af0e72726374d7b6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/9237#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9237
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%2F9237
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/9237
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9237
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9237
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/9237
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9237
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
#9236https://github.com/IfcOpenShell/IfcOpenShell/pull/9236
NetSideArea / GrossSideArea use wrong face on Y-oriented wallshttps://github.com/IfcOpenShell/IfcOpenShell/issues/9237#top
#9236https://github.com/IfcOpenShell/IfcOpenShell/pull/9236
PR ProposedA PR has been proposed for this bug/feature.https://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
https://github.com/PahlawanJoey
PahlawanJoeyhttps://github.com/PahlawanJoey
on Aug 3, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9237#issue-5049856533
Testmodel.ifc.txthttps://github.com/user-attachments/files/30661338/Testmodel.ifc.txt
@BIMvoicehttps://github.com/BIMvoice
PahlawanJoeyhttps://github.com/PahlawanJoey
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
on Aug 3, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9237#event-28887549682
petruconduraruhttps://github.com/petruconduraru
on Aug 4, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9237#event-28929019078
Bonsai: fix wall side area axis for Y wallshttps://github.com/BIMvoice/IfcOpenShell/commit/25f938c8f22cd37febde8231e0a46a8580b2f1b4
25f938chttps://github.com/BIMvoice/IfcOpenShell/commit/25f938c8f22cd37febde8231e0a46a8580b2f1b4
petruconduraruhttps://github.com/petruconduraru
PR ProposedA PR has been proposed for this bug/feature.https://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
on Aug 4, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9237#event-28929034811
petruconduraruhttps://github.com/petruconduraru
on Sep 30, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9237#event-32177082998
Bonsai: drop baked opening recovery, keep axis fixhttps://github.com/BIMvoice/IfcOpenShell/commit/d05edbda1ef0de63855cb21fa807cceb5c1448a8
d05edbdhttps://github.com/BIMvoice/IfcOpenShell/commit/d05edbda1ef0de63855cb21fa807cceb5c1448a8
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9237
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9237
PR ProposedA PR has been proposed for this bug/feature.https://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
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.