René's URL Explorer Experiment


Title: [Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis values · Issue #8625 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: [Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis values · Issue #8625 · IfcOpenShell/IfcOpenShell

X Title: [Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis values · Issue #8625 · IfcOpenShell/IfcOpenShell

Description: Bug Description [Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis values Summary Bonsai displays an incorrect Total Cost when one IfcCostItem has multiple IfcCostValue records and those cost val...

Open Graph Description: Bug Description [Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis values Summary Bonsai displays an incorrect Total Cost when one IfcCostItem has multiple...

X Description: Bug Description [Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis values Summary Bonsai displays an incorrect Total Cost when one IfcCostItem has multiple...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis values","articleBody":"### Bug Description\n\n# [Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis values\n\n## Summary\n\nBonsai displays an incorrect **Total Cost** when one `IfcCostItem` has multiple `IfcCostValue` records and those cost values use different `UnitBasis` values.\n\nThis should be treated as a **high-priority 5D correctness bug** because the UI presents a plausible but wrong monetary total, and the wrong result remains after closing and reopening the cost schedule.\n\n## Environment\n\n- Bonsai: `0.8.6-alpha260628`\n- IfcOpenShell: `0.8.6-alpha260628`\n- IFC schema: `IFC4X3_ADD2`\n- Blender: `5.1.2`\n\n## Minimal reproduction\n\nCreate:\n\n- one `IfcCostSchedule`\n- one `IfcCostItem`\n- one `IfcQuantityArea` of `10 m²`\n- cost value A:\n  - `AppliedValue = 5`\n  - `UnitBasis = 2 m²`\n- cost value B:\n  - `AppliedValue = 3`\n  - `UnitBasis = 1 m²`\n  - `Category = Labor`\n\nRelevant IFC lines from the minimal file:\n\n```ifc\n#70=IFCCOSTSCHEDULE('2wMdS_eYv8tuyUSBFKxMhv',$,'5D Sandbox',$,$,$,.BUDGET.,$,$,'2026-07-16T11:29:56.010383');\n#71=IFCCOSTITEM('2L$doydbv518v51M84kxXv',$,'Test Item',$,$,'1',$,(#77,#81),(#76));\n#76=IFCQUANTITYAREA('Test Area',$,$,10.,$);\n#77=IFCCOSTVALUE($,$,IFCMONETARYMEASURE(5.),#78,$,$,$,$,$,$);\n#78=IFCMEASUREWITHUNIT(IFCAREAMEASURE(2.),#3);\n#81=IFCCOSTVALUE('Labour - name',$,IFCMONETARYMEASURE(3.),#84,$,$,'Labor',$,$,$);\n#84=IFCMEASUREWITHUNIT(IFCAREAMEASURE(1.),#3);\n```\n\n## Expected result\n\nEach cost value should be calculated using its own `UnitBasis`:\n\n```text\n(10 / 2 × 5) + (10 / 1 × 3)\n= 25 + 30\n= 55\n```\n\n## Actual result\n\nBonsai displays:\n\n```text\nQuantity:   10.00 m²\nValue:       8.00\nTotal Cost: 80.00\n```\n\nClosing and reopening the cost schedule still shows `80.00`, so this is not a stale UI cache.\n\nIndependent calculation through `ifcopenshell.util.cost.calculate_applied_value` gives the correct result of `55.00`.\n\n## Likely cause\n\nIn `src/bonsai/bonsai/bim/module/cost/data.py`, `_load_cost_values()`:\n\n1. sums all `AppliedValue` values into one `TotalAppliedValue`;\n2. overwrites `UnitBasisValueComponent` while iterating;\n3. applies only the last encountered unit basis to the combined applied value.\n\nConceptually, the current result becomes:\n\n```text\n(5 + 3) × 10 / 1 = 80\n```\n\nwhereas each `IfcCostValue` needs to be extended separately by the cost quantity and its own `UnitBasis`, then summed.\n\n## Suggested correction\n\nCalculate the extended cost per `IfcCostValue`:\n\n```text\nsum(\n    quantity / unit_basis_value * applied_value\n    for each cost value\n)\n```\n\nwith the existing no-unit-basis behaviour preserved per value.\n\n## Attachments\n\n- Minimal IFC regression fixture: `5D_Sandbox_01(4).ifc`\n- Screenshot showing Bonsai total of `80.00`\n\n\n### Attachments\n\n\u003cimg width=\"1362\" height=\"940\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/95c89500-4e83-43e9-8c81-713cd051fb14\" />\n\n[5D_Sandbox_Mixed_UnitBasis.ifc.txt](https://github.com/user-attachments/files/30080368/5D_Sandbox_Mixed_UnitBasis.ifc.txt)\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/john-rogers","@type":"Person","name":"john-rogers"},"datePublished":"2026-07-16T08:21:26Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/8625"}

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:cf0ea2a5-ca46-1604-a8b3-a71dbcab95b3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA938:22E53E:6DE5A2:937543:6B04AA5A
html-safe-nonce7fbf84631ceb76a8587379adf4e53d5dd600b4a72cb86322c55823a0d35a6c17
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTM4OjIyRTUzRTo2REU1QTI6OTM3NTQzOjZCMDRBQTVBIiwidmlzaXRvcl9pZCI6IjE2MTQ0NTk3OTU4MzcwNjk5MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac49d70b32cf2b266f9b865c88840567e923efe412ae73292917c8948600a9e27d
hovercard-subject-tagissue:4900122009
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/8625/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fd9e984a3315cb6cf9aa67314fd17c86df73c4e1cdd4ed7f5bee8c6680497936/IfcOpenShell/IfcOpenShell/issues/8625
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fd9e984a3315cb6cf9aa67314fd17c86df73c4e1cdd4ed7f5bee8c6680497936/IfcOpenShell/IfcOpenShell/issues/8625
og:image:altBug Description [Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis values Summary Bonsai displays an incorrect Total Cost when one IfcCostItem has multiple...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejohn-rogers
hostnamegithub.com
expected-hostnamegithub.com
None188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b
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
release557cfbac6cdb532730c95c90f2cefdc0c4128029
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/8625#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F8625
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%2F8625
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/8625
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/8625
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/8625
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/8625
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/8625
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
#8629https://github.com/IfcOpenShell/IfcOpenShell/pull/8629
[Bonsai][5D] Incorrect Total Cost when multiple IfcCostValue entries use different UnitBasis valueshttps://github.com/IfcOpenShell/IfcOpenShell/issues/8625#top
#8629https://github.com/IfcOpenShell/IfcOpenShell/pull/8629
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
https://github.com/john-rogers
john-rogershttps://github.com/john-rogers
on Jul 16, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/8625#issue-4900122009
https://private-user-images.githubusercontent.com/2834859/622556419-95c89500-4e83-43e9-8c81-713cd051fb14.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTU0NjgxNjYsIm5iZiI6MTc5NTQ2Nzg2NiwicGF0aCI6Ii8yODM0ODU5LzYyMjU1NjQxOS05NWM4OTUwMC00ZTgzLTQzZTktOGM4MS03MTNjZDA1MWZiMTQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTEyMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMjNUMjEwNDI2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGVhNTA2ZWRmN2JkYmI5ZTk1ZDZhNjg5NmJjNGQ1M2RlY2NiZjJjYzgyNWJjNWZhZTk5ZjM0YjY4OGM2NjRlNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.oysswtFisF7Y7Fpk39-i0Lx5nVSSayPaZyH4tq8pLFk
5D_Sandbox_Mixed_UnitBasis.ifc.txthttps://github.com/user-attachments/files/30080368/5D_Sandbox_Mixed_UnitBasis.ifc.txt
john-rogershttps://github.com/john-rogers
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
on Jul 16, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/8625#event-28058537206
petruconduraruhttps://github.com/petruconduraru
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
on Jul 16, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/8625#event-28061010457
https://github.com/petruconduraru
petruconduraruhttps://github.com/petruconduraru
on Jul 16, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/8625#issuecomment-4990199114
#8629https://github.com/IfcOpenShell/IfcOpenShell/pull/8629
petruconduraruhttps://github.com/petruconduraru
on Jul 23, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/8625#event-28362987727
bonsai: extend each cost value by its own unit basis before summing (I…https://github.com/BIMvoice/IfcOpenShell/commit/d142d9230b8fbf62df38306f847abe1d52a45da9
I…https://github.com/IfcOpenShell/IfcOpenShell/issues/8625
d142d92https://github.com/BIMvoice/IfcOpenShell/commit/d142d9230b8fbf62df38306f847abe1d52a45da9
https://github.com/steverugi
steverugihttps://github.com/steverugi
on Jul 28, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/8625#issuecomment-5102841288
@john-rogershttps://github.com/john-rogers
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/8625
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/8625
PR Proposedhttps://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.