René's URL Explorer Experiment


Title: Drawing: OffsetFromReferenceLine is applied to the wrong axis for AXIS1 layer sets · Issue #9001 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: Drawing: OffsetFromReferenceLine is applied to the wrong axis for AXIS1 layer sets · Issue #9001 · IfcOpenShell/IfcOpenShell

X Title: Drawing: OffsetFromReferenceLine is applied to the wrong axis for AXIS1 layer sets · Issue #9001 · IfcOpenShell/IfcOpenShell

Description: Bug Description Summary In generate_material_layers, the per-layer bisect applies IfcMaterialLayerSetUsage.OffsetFromReferenceLine to the Z component when LayerSetDirection == "AXIS1", while walking the layers along X. The offset therefo...

Open Graph Description: Bug Description Summary In generate_material_layers, the per-layer bisect applies IfcMaterialLayerSetUsage.OffsetFromReferenceLine to the Z component when LayerSetDirection == "AXIS1", while walkin...

X Description: Bug Description Summary In generate_material_layers, the per-layer bisect applies IfcMaterialLayerSetUsage.OffsetFromReferenceLine to the Z component when LayerSetDirection == "AXIS1", wh...

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

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":"Drawing: OffsetFromReferenceLine is applied to the wrong axis for AXIS1 layer sets","articleBody":"### Bug Description\n\n### Summary\n\nIn `generate_material_layers`, the per-layer bisect applies\n`IfcMaterialLayerSetUsage.OffsetFromReferenceLine` to the **Z** component when\n`LayerSetDirection == \"AXIS1\"`, while walking the layers along **X**. The offset\ntherefore never reaches the axis it is meant to shift, and every layer boundary\non an AXIS1 element is drawn as though the offset were `0.0`.\n\n`AXIS2` and `AXIS3` are consistent; only `AXIS1` mismatches.\n\n### Location\n\n`src/bonsai/bonsai/bim/module/drawing/operator.py` (in the installed 5.2 addon,\n`bonsai/bim/module/drawing/operator.py:815-826`):\n\n```python\nelif usage.LayerSetDirection == \"AXIS2\":\n    co = Vector((0.0, offset, 0.0))          # offset on Y\n    no = tool.Drawing.get_extrusion_vector(element).normalized()\n    no = no.cross(Vector([1.0, 0.0, 0.0]))   # walk along +/-Y   -> consistent\nelif usage.LayerSetDirection == \"AXIS3\":\n    co = Vector((0.0, 0.0, offset))          # offset on Z\n    no = tool.Drawing.get_extrusion_vector(element).normalized()\n    no = Vector([0.0, 0.0, 1.0])             # walk along  Z     -> consistent\nelif usage.LayerSetDirection == \"AXIS1\":\n    co = Vector((0.0, 0.0, offset))          # offset on Z  \u003c-- should be X\n    no = tool.Drawing.get_extrusion_vector(element).normalized()\n    no = Vector([1.0, 0.0, 0.0])             # walk along  X\n```\n\n`offset` and `sense_factor` are read correctly a few lines above\n(`operator.py:777-778`), so the value reaching this branch is right; only its\nplacement is wrong.\n\n### Suggested fix\n\n```python\nelif usage.LayerSetDirection == \"AXIS1\":\n    co = Vector((offset, 0.0, 0.0))\n    no = tool.Drawing.get_extrusion_vector(element).normalized()\n    no = Vector([1.0, 0.0, 0.0])\n```\n\nThe `no = get_extrusion_vector(...)` line immediately before the literal\nreassignment is dead in both the AXIS1 and AXIS3 branches — possibly worth\nremoving at the same time, though it is harmless.\n\n### Reproduction\n\nThe attached file has four layered walls in a mitered ring, all with an\nidentical `108 / 43 / 190 mm` buildup (brick / ventilated cavity / mineral\nwool), all carrying a correct `OffsetFromReferenceLine`:\n\n| wall | LayerSetDirection | DirectionSense | OffsetFromReferenceLine |\n| --- | --- | --- | --- |\n| facade_south | AXIS2 | POSITIVE | −0.1705 |\n| facade_north | AXIS2 | NEGATIVE | +0.1705 |\n| facade_west  | AXIS1 | POSITIVE | −0.1705 |\n| facade_east  | AXIS1 | NEGATIVE | +0.1705 |\n\nEach wall's `ObjectPlacement` is an identity rotation at the body's AABB\ncentre, so `±0.1705` (half the 341 mm total) puts the datum exactly on the\nfirst layer's outer face. Walking the chain reproduces the emitted solid faces\nexactly, to 0 — the file is self-consistent.\n\n1. Open the file in Bonsai.\n2. Create a plan drawing for the single storey and activate it.\n3. Compare the two AXIS2 walls with the two AXIS1 walls.\n\n**Expected:** on all four walls the layer boundaries coincide with the material\nboundaries — brick 108 mm, then a 43 mm gap, then wool 190 mm.\n\n**Actual:** the AXIS2 pair is correct. On the AXIS1 pair the boundaries are\ndisplaced by the offset, landing inside the insulation. On this geometry the\ncut planes fall at local `x = 0`, `−0.108` and `−0.151` instead of `+0.1705`,\n`+0.0625` and `+0.0195`, producing a spurious band whose width is the middle\nlayer's thickness (43 mm here — change the cavity to 30 mm and the band becomes\n30 mm).\n\n### Notes\n\n* AXIS1 on a wall is unusual but legal. It arises when a wall's local X does not\n  run along the wall — here the exporter emits identity-rotation placements, so\n  a north–south wall stacks its layers along world/local X. IFC's own intent for\n  `IfcWallStandardCase` is local X along the wall (hence AXIS2), which is\n  probably why this path is under-exercised.\n* Several other Bonsai paths gate explicitly on `AXIS2` for walls\n  (`tool/wall.py:173`, `bim/module/model/wall.py:1441,1461,1694`), so AXIS1\n  walls may be a partially-supported shape more broadly. Flagging in case the\n  maintainers would rather reject AXIS1 walls loudly than half-support them.\n* Version tested: Bonsai bundled with Blender 5.2 (as shipped in the\n  `ifc-floorplan-renderer` image). **Verified still present on upstream\n  `v0.8.0`**, same file, same lines 815-826 — fetched and diffed 2026-07-26,\n  byte-identical to the bundled copy.\n\n---\n\n## Prior-art search (2026-07-26) — nothing found, safe to file\n\nSearched `IfcOpenShell/IfcOpenShell`, issues and PRs, all states:\n\n| query | matches on this defect |\n| --- | --- |\n| `AXIS1` | none — hits are wall join/butt tools and a rebar example |\n| `OffsetFromReferenceLine` | none — hits are slab thickness/custom-offset UI |\n| `LayerSetDirection` | none — hits are type thumbnails, wall merge, horizontal layers |\n| `generate_material_layers` | no results |\n| symptom phrasings (layer hatch misaligned / wrong in plan / offset in drawing) | no results |\n\nOpen PRs mentioning `drawing` (20 reviewed): all sheets, cameras, underlays,\nfonts, linework, crash guards. **None touches the per-layer bisect.**\n\nClosest neighbours, both different bugs — worth a \"possibly related\" line if\nthe maintainers want one:\n\n* **#7794** (closed) *Layer orientation in a wall changes if occurrence\n  overridden* — layer orientation, but the model side, not the drawing bisect.\n* **#5326** (open) *Choose wall reference line (exterior, interior, center) for\n  polyline tool* — about authoring the reference line, i.e. the same attribute\n  this bug mis-reads, but a feature request.\n* **#7098** (open) *AXIS 3 layers not updating in the .blend/.ifc sync* — AXIS3,\n  sync path, not the drawing.\n\n### Attachments\n\n[bonsai-axis1-repro.ifc.txt](https://github.com/user-attachments/files/30390429/bonsai-axis1-repro.ifc.txt)\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/arbirk","@type":"Person","name":"arbirk"},"datePublished":"2026-07-26T16:31:15Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9001"}

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:7a555358-4830-68b1-c7bc-da67d79b7793
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9548:16ED35:51752A:6C7BC7:6B04C01E
html-safe-nonce94edc0a889d055fff695deaefdfb9d91eda9e89a4e593ecf11f0b788af2b4159
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTQ4OjE2RUQzNTo1MTc1MkE6NkM3QkM3OjZCMDRDMDFFIiwidmlzaXRvcl9pZCI6IjI1MjQyNjA1ODM1NTAwMDkzNzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccf50c4e628aa8828ebdc9f7d92d238c899cc512acb4e4741fc149f65f3cb2666
hovercard-subject-tagissue:4981486914
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/9001/issue_layout
twitter:imagehttps://opengraph.githubassets.com/51bed423a9004ae951584805d36a3ecf807345b62eb6a605dbe0ae603cf40f69/IfcOpenShell/IfcOpenShell/issues/9001
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/51bed423a9004ae951584805d36a3ecf807345b62eb6a605dbe0ae603cf40f69/IfcOpenShell/IfcOpenShell/issues/9001
og:image:altBug Description Summary In generate_material_layers, the per-layer bisect applies IfcMaterialLayerSetUsage.OffsetFromReferenceLine to the Z component when LayerSetDirection == "AXIS1", while walkin...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamearbirk
hostnamegithub.com
expected-hostnamegithub.com
None85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4
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
release0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/9001#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9001
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%2F9001
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/9001
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9001
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9001
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 requests938 (938)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/9001
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9001
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
#9035https://github.com/IfcOpenShell/IfcOpenShell/pull/9035
Drawing: OffsetFromReferenceLine is applied to the wrong axis for AXIS1 layer setshttps://github.com/IfcOpenShell/IfcOpenShell/issues/9001#top
#9035https://github.com/IfcOpenShell/IfcOpenShell/pull/9035
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
https://github.com/arbirk
arbirkhttps://github.com/arbirk
on Jul 26, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9001#issue-4981486914
Layer orientation in a wall changes if occurrence overridden #7794https://github.com/IfcOpenShell/IfcOpenShell/issues/7794
Choose wall reference line (exterior, interior, center) for polyline tool #5326https://github.com/IfcOpenShell/IfcOpenShell/issues/5326
AXIS 3 layers not updating in the .blend/.ifc sync. #7098https://github.com/IfcOpenShell/IfcOpenShell/issues/7098
bonsai-axis1-repro.ifc.txthttps://github.com/user-attachments/files/30390429/bonsai-axis1-repro.ifc.txt
arbirkhttps://github.com/arbirk
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
on Jul 26, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9001#event-28502668465
petruconduraruhttps://github.com/petruconduraru
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
on Jul 30, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9001#event-28697224935
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9001
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9001
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.