Title: create_shape misreads an IfcAdvancedBrep box with a cylindrical through-hole: volume +12.9 % (web-ifc and OCCT read the same file exactly) · Issue #9570 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: create_shape misreads an IfcAdvancedBrep box with a cylindrical through-hole: volume +12.9 % (web-ifc and OCCT read the same file exactly) · Issue #9570 · IfcOpenShell/IfcOpenShell
X Title: create_shape misreads an IfcAdvancedBrep box with a cylindrical through-hole: volume +12.9 % (web-ifc and OCCT read the same file exactly) · Issue #9570 · IfcOpenShell/IfcOpenShell
Description: Versions: ifcopenshell 0.8.5 and 0.9.0a260921 (Linux x86_64, Python 3.11). Both give bit-identical results. Summary A 7-face IfcAdvancedBrep is a 1.0 × 0.8 × 0.6 box minus an r = 0.15 cylindrical through-hole. The hole face is an IfcAdva...
Open Graph Description: Versions: ifcopenshell 0.8.5 and 0.9.0a260921 (Linux x86_64, Python 3.11). Both give bit-identical results. Summary A 7-face IfcAdvancedBrep is a 1.0 × 0.8 × 0.6 box minus an r = 0.15 cylindrical t...
X Description: Versions: ifcopenshell 0.8.5 and 0.9.0a260921 (Linux x86_64, Python 3.11). Both give bit-identical results. Summary A 7-face IfcAdvancedBrep is a 1.0 × 0.8 × 0.6 box minus an r = 0.15 cylindrical t...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9570
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"create_shape misreads an IfcAdvancedBrep box with a cylindrical through-hole: volume +12.9 % (web-ifc and OCCT read the same file exactly)","articleBody":"**Versions:** ifcopenshell 0.8.5 and 0.9.0a260921 (Linux x86_64, Python 3.11). Both give bit-identical results.\n\n### Summary\nA 7-face `IfcAdvancedBrep` is a 1.0 × 0.8 × 0.6 box minus an r = 0.15 cylindrical through-hole. The hole face is an `IfcAdvancedFace` on an `IfcCylindricalSurface` with `SameSense=.F.`. Meshed with `ifcopenshell.geom.create_shape`, it gives a volume **12.9 % too large**. The same file read by web-ifc 0.0.77 converges to the analytic volume. A 1:1 STEP translation of the same B-rep read by OCCT (`STEPControl_Reader` + `BRepGProp`) agrees to ≤ 3.4e-15. So the file geometry appears correct.\n\nThe error does not change with tessellation deflection. It also does not change when `SameSense` is flipped, either on the hole face or on a planar face. I have not identified the cause.\n\n### Measured\n`use-world-coords`, divergence-theorem volume of the returned triangulation. Analytic volume is 0.4375885 m³ (1.0·0.8·0.6 − π·0.15²·0.6).\n\n| file / reader | volume | rel. error |\n|---|---|---|\n| as written — ifcopenshell 0.8.5 and 0.9.0a260921 | 0.4940761 | +1.29e-1 |\n| hole face `SameSense` flipped `.F.→.T.` — ifcopenshell (both) | 0.4940761 | identical |\n| planar face #176 `SameSense` flipped `.F.→.T.` — ifcopenshell (both) | 0.4940761 | identical |\n| as written — web-ifc 0.0.77, CIRCLE_SEGMENTS 16 / 64 / 256 | 0.438818 / 0.437659 / 0.437593 | → 1.6e-5 |\n\nIn a wider internal study (not re-run for this report), similar misreads appeared on fillet, torus and bore faces, ranging from −5 % to +27 % and also independent of deflection.\n\n### Repro\n```python\nimport sys, math, ifcopenshell, ifcopenshell.geom as geom\nf = ifcopenshell.open(sys.argv[1])\nel = [e for e in f.by_type(\"IfcProduct\") if e.Representation][0]\ns = geom.settings(); s.set(\"use-world-coords\", True)\nsh = geom.create_shape(s, el); v = sh.geometry.verts; F = sh.geometry.faces\nP = [v[3*i:3*i+3] for i in range(len(v)//3)]; t = 0.0\nfor i in range(0, len(F), 3):\n a, b, c = P[F[i]], P[F[i+1]], P[F[i+2]]\n t += a[0]*(b[1]*c[2]-b[2]*c[1]) - a[1]*(b[0]*c[2]-b[2]*c[0]) + a[2]*(b[0]*c[1]-b[1]*c[0])\nana = 1.0*0.8*0.6 - math.pi*0.15**2*0.6\nprint(t/6, ana, (t/6 - ana)/ana) # -> 0.4940760898952689 0.43758849917653775 0.129088...\n```\n\n\u003cdetails>\u003csummary>csg_cut.ifc (220 lines)\u003c/summary>\n\n```\nISO-10303-21;\nHEADER;\nFILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');\nFILE_NAME('','2026-09-21T23:50:41',(''),(''),'IfcOpenShell 0.8.0','IfcOpenShell 0.8.0','');\nFILE_SCHEMA(('IFC4'));\nENDSEC;\nDATA;\n#1=IFCPROJECT('3r915ncgHEaxvrwYqOGOGF',$,'p6a3h',$,$,$,$,(#10),#5);\n#2=IFCSIUNIT(*,.LENGTHUNIT.,.MILLI.,.METRE.);\n#3=IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.);\n#4=IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.);\n#5=IFCUNITASSIGNMENT((#4,#2,#3));\n#6=IFCCARTESIANPOINT((0.,0.,0.));\n#7=IFCDIRECTION((0.,0.,1.));\n#8=IFCDIRECTION((1.,0.,0.));\n#9=IFCAXIS2PLACEMENT3D(#6,#7,#8);\n#10=IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.0000000000000001E-05,#9,$);\n#11=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body','Model',*,*,*,*,#10,$,.MODEL_VIEW.,$);\n#12=IFCSITE('2l3I6pBpv4K8ieU5qYDdDV',$,'s',$,$,$,$,$,$,$,$,$,$,$);\n#13=IFCRELAGGREGATES('1vkbOMDlTAnRJYU$G5ur_l',$,$,$,#1,(#12));\n#14=IFCCARTESIANPOINT((-500.,400.,0.));\n#15=IFCVERTEXPOINT(#14);\n#16=IFCCARTESIANPOINT((-500.,400.,600.));\n#17=IFCVERTEXPOINT(#16);\n#18=IFCCARTESIANPOINT((-500.,400.,0.));\n#19=IFCDIRECTION((0.,0.,1.));\n#20=IFCVECTOR(#19,1.);\n#21=IFCLINE(#18,#20);\n#22=IFCEDGECURVE(#15,#17,#21,.T.);\n#23=IFCORIENTEDEDGE(*,*,#22,.T.);\n#24=IFCCARTESIANPOINT((500.,400.,600.));\n#25=IFCVERTEXPOINT(#24);\n#26=IFCCARTESIANPOINT((-500.,400.,600.));\n#27=IFCDIRECTION((1.,0.,0.));\n#28=IFCVECTOR(#27,1.);\n#29=IFCLINE(#26,#28);\n#30=IFCEDGECURVE(#17,#25,#29,.T.);\n#31=IFCORIENTEDEDGE(*,*,#30,.T.);\n#32=IFCCARTESIANPOINT((500.,400.,0.));\n#33=IFCVERTEXPOINT(#32);\n#34=IFCCARTESIANPOINT((500.,400.,0.));\n#35=IFCDIRECTION((0.,0.,1.));\n#36=IFCVECTOR(#35,1.);\n#37=IFCLINE(#34,#36);\n#38=IFCEDGECURVE(#33,#25,#37,.T.);\n#39=IFCORIENTEDEDGE(*,*,#38,.F.);\n#40=IFCCARTESIANPOINT((-500.,400.,0.));\n#41=IFCDIRECTION((1.,0.,0.));\n#42=IFCVECTOR(#41,1.);\n#43=IFCLINE(#40,#42);\n#44=IFCEDGECURVE(#15,#33,#43,.T.);\n#45=IFCORIENTEDEDGE(*,*,#44,.F.);\n#46=IFCEDGELOOP((#23,#31,#39,#45));\n#48=IFCCARTESIANPOINT((-500.,400.,0.));\n#49=IFCDIRECTION((0.,1.,0.));\n#50=IFCDIRECTION((1.,0.,0.));\n#51=IFCAXIS2PLACEMENT3D(#48,#49,#50);\n#52=IFCPLANE(#51);\n#53=IFCFACEOUTERBOUND(#46,.T.);\n#54=IFCADVANCEDFACE((#53),#52,.T.);\n#55=IFCCARTESIANPOINT((-500.,-400.,0.));\n#56=IFCVERTEXPOINT(#55);\n#57=IFCCARTESIANPOINT((-500.,-400.,600.));\n#58=IFCVERTEXPOINT(#57);\n#59=IFCCARTESIANPOINT((-500.,-400.,0.));\n#60=IFCDIRECTION((0.,0.,1.));\n#61=IFCVECTOR(#60,1.);\n#62=IFCLINE(#59,#61);\n#63=IFCEDGECURVE(#56,#58,#62,.T.);\n#64=IFCORIENTEDEDGE(*,*,#63,.T.);\n#65=IFCCARTESIANPOINT((-500.,-400.,600.));\n#66=IFCDIRECTION((0.,1.,0.));\n#67=IFCVECTOR(#66,1.);\n#68=IFCLINE(#65,#67);\n#69=IFCEDGECURVE(#58,#17,#68,.T.);\n#70=IFCORIENTEDEDGE(*,*,#69,.T.);\n#71=IFCORIENTEDEDGE(*,*,#22,.F.);\n#72=IFCCARTESIANPOINT((-500.,-400.,0.));\n#73=IFCDIRECTION((0.,1.,0.));\n#74=IFCVECTOR(#73,1.);\n#75=IFCLINE(#72,#74);\n#76=IFCEDGECURVE(#56,#15,#75,.T.);\n#77=IFCORIENTEDEDGE(*,*,#76,.F.);\n#78=IFCEDGELOOP((#64,#70,#71,#77));\n#80=IFCCARTESIANPOINT((-500.,-400.,0.));\n#81=IFCDIRECTION((-1.,0.,0.));\n#82=IFCDIRECTION((0.,1.,0.));\n#83=IFCAXIS2PLACEMENT3D(#80,#81,#82);\n#84=IFCPLANE(#83);\n#85=IFCFACEOUTERBOUND(#78,.T.);\n#86=IFCADVANCEDFACE((#85),#84,.T.);\n#87=IFCORIENTEDEDGE(*,*,#38,.T.);\n#88=IFCCARTESIANPOINT((500.,-400.,600.));\n#89=IFCVERTEXPOINT(#88);\n#90=IFCCARTESIANPOINT((500.,400.,600.));\n#91=IFCDIRECTION((0.,-1.,0.));\n#92=IFCVECTOR(#91,1.);\n#93=IFCLINE(#90,#92);\n#94=IFCEDGECURVE(#25,#89,#93,.T.);\n#95=IFCORIENTEDEDGE(*,*,#94,.T.);\n#96=IFCCARTESIANPOINT((500.,-400.,0.));\n#97=IFCVERTEXPOINT(#96);\n#98=IFCCARTESIANPOINT((500.,-400.,0.));\n#99=IFCDIRECTION((0.,0.,1.));\n#100=IFCVECTOR(#99,1.);\n#101=IFCLINE(#98,#100);\n#102=IFCEDGECURVE(#97,#89,#101,.T.);\n#103=IFCORIENTEDEDGE(*,*,#102,.F.);\n#104=IFCCARTESIANPOINT((500.,400.,0.));\n#105=IFCDIRECTION((0.,-1.,0.));\n#106=IFCVECTOR(#105,1.);\n#107=IFCLINE(#104,#106);\n#108=IFCEDGECURVE(#33,#97,#107,.T.);\n#109=IFCORIENTEDEDGE(*,*,#108,.F.);\n#110=IFCEDGELOOP((#87,#95,#103,#109));\n#112=IFCCARTESIANPOINT((500.,400.,0.));\n#113=IFCDIRECTION((1.,0.,-0.));\n#114=IFCDIRECTION((0.,-1.,0.));\n#115=IFCAXIS2PLACEMENT3D(#112,#113,#114);\n#116=IFCPLANE(#115);\n#117=IFCFACEOUTERBOUND(#110,.T.);\n#118=IFCADVANCEDFACE((#117),#116,.T.);\n#119=IFCORIENTEDEDGE(*,*,#44,.T.);\n#120=IFCORIENTEDEDGE(*,*,#108,.T.);\n#121=IFCCARTESIANPOINT((500.,-400.,0.));\n#122=IFCDIRECTION((-1.,0.,0.));\n#123=IFCVECTOR(#122,1.);\n#124=IFCLINE(#121,#123);\n#125=IFCEDGECURVE(#97,#56,#124,.T.);\n#126=IFCORIENTEDEDGE(*,*,#125,.T.);\n#127=IFCORIENTEDEDGE(*,*,#76,.T.);\n#128=IFCEDGELOOP((#119,#120,#126,#127));\n#130=IFCCARTESIANPOINT((150.,-3.6739403974420002E-14,0.));\n#131=IFCVERTEXPOINT(#130);\n#132=IFCCARTESIANPOINT((0.,0.,0.));\n#133=IFCDIRECTION((0.,0.,1.));\n#134=IFCDIRECTION((1.,0.,-0.));\n#135=IFCAXIS2PLACEMENT3D(#132,#133,#134);\n#136=IFCCIRCLE(#135,150.);\n#137=IFCEDGECURVE(#131,#131,#136,.T.);\n#138=IFCORIENTEDEDGE(*,*,#137,.T.);\n#139=IFCEDGELOOP((#138));\n#140=IFCFACEBOUND(#139,.T.);\n#141=IFCCARTESIANPOINT((0.,0.,0.));\n#142=IFCDIRECTION((-0.,-0.,-1.));\n#143=IFCDIRECTION((-1.,0.,0.));\n#144=IFCAXIS2PLACEMENT3D(#141,#142,#143);\n#145=IFCPLANE(#144);\n#146=IFCFACEOUTERBOUND(#128,.T.);\n#147=IFCADVANCEDFACE((#146,#140),#145,.T.);\n#148=IFCORIENTEDEDGE(*,*,#30,.T.);\n#149=IFCORIENTEDEDGE(*,*,#94,.T.);\n#150=IFCCARTESIANPOINT((500.,-400.,600.));\n#151=IFCDIRECTION((-1.,0.,0.));\n#152=IFCVECTOR(#151,1.);\n#153=IFCLINE(#150,#152);\n#154=IFCEDGECURVE(#89,#58,#153,.T.);\n#155=IFCORIENTEDEDGE(*,*,#154,.T.);\n#156=IFCORIENTEDEDGE(*,*,#69,.T.);\n#157=IFCEDGELOOP((#148,#149,#155,#156));\n#159=IFCCARTESIANPOINT((150.,-3.6739403974420002E-14,600.));\n#160=IFCVERTEXPOINT(#159);\n#161=IFCCARTESIANPOINT((0.,0.,600.));\n#162=IFCDIRECTION((0.,0.,1.));\n#163=IFCDIRECTION((1.,0.,-0.));\n#164=IFCAXIS2PLACEMENT3D(#161,#162,#163);\n#165=IFCCIRCLE(#164,150.);\n#166=IFCEDGECURVE(#160,#160,#165,.T.);\n#167=IFCORIENTEDEDGE(*,*,#166,.T.);\n#168=IFCEDGELOOP((#167));\n#169=IFCFACEBOUND(#168,.F.);\n#170=IFCCARTESIANPOINT((0.,0.,600.));\n#171=IFCDIRECTION((-0.,-0.,-1.));\n#172=IFCDIRECTION((-1.,0.,0.));\n#173=IFCAXIS2PLACEMENT3D(#170,#171,#172);\n#174=IFCPLANE(#173);\n#175=IFCFACEOUTERBOUND(#157,.F.);\n#176=IFCADVANCEDFACE((#175,#169),#174,.F.);\n#177=IFCORIENTEDEDGE(*,*,#102,.T.);\n#178=IFCORIENTEDEDGE(*,*,#154,.T.);\n#179=IFCORIENTEDEDGE(*,*,#63,.F.);\n#180=IFCORIENTEDEDGE(*,*,#125,.F.);\n#181=IFCEDGELOOP((#177,#178,#179,#180));\n#183=IFCCARTESIANPOINT((500.,-400.,0.));\n#184=IFCDIRECTION((0.,-1.,0.));\n#185=IFCDIRECTION((-1.,0.,0.));\n#186=IFCAXIS2PLACEMENT3D(#183,#184,#185);\n#187=IFCPLANE(#186);\n#188=IFCFACEOUTERBOUND(#181,.T.);\n#189=IFCADVANCEDFACE((#188),#187,.T.);\n#190=IFCORIENTEDEDGE(*,*,#166,.F.);\n#191=IFCCARTESIANPOINT((150.,-3.6739403974420002E-14,-100.));\n#192=IFCDIRECTION((0.,0.,1.));\n#193=IFCVECTOR(#192,1.);\n#194=IFCLINE(#191,#193);\n#195=IFCEDGECURVE(#131,#160,#194,.T.);\n#196=IFCORIENTEDEDGE(*,*,#195,.F.);\n#197=IFCORIENTEDEDGE(*,*,#137,.T.);\n#198=IFCORIENTEDEDGE(*,*,#195,.T.);\n#199=IFCEDGELOOP((#190,#196,#197,#198));\n#201=IFCCARTESIANPOINT((0.,0.,-100.));\n#202=IFCDIRECTION((0.,0.,1.));\n#203=IFCDIRECTION((1.,0.,-0.));\n#204=IFCAXIS2PLACEMENT3D(#201,#202,#203);\n#205=IFCCYLINDRICALSURFACE(#204,150.);\n#206=IFCFACEOUTERBOUND(#199,.F.);\n#207=IFCADVANCEDFACE((#206),#205,.F.);\n#208=IFCCLOSEDSHELL((#54,#86,#118,#147,#176,#189,#207));\n#209=IFCADVANCEDBREP(#208);\n#210=IFCBUILDINGELEMENTPROXY('2GXJPXXJ11qxamSWCNhfAf',$,'csg_cut',$,$,#221,#223,$,$);\n#216=IFCRELCONTAINEDINSPATIALSTRUCTURE('2QeVufbfj6pALycLI9X883',$,$,$,(#210),#12);\n#217=IFCCARTESIANPOINT((0.,0.,0.));\n#218=IFCDIRECTION((0.,0.,1.));\n#219=IFCDIRECTION((1.,0.,0.));\n#220=IFCAXIS2PLACEMENT3D(#217,#218,#219);\n#221=IFCLOCALPLACEMENT($,#220);\n#222=IFCSHAPEREPRESENTATION(#11,'Body','AdvancedBrep',(#209));\n#223=IFCPRODUCTDEFINITIONSHAPE($,$,(#222));\nENDSEC;\nEND-ISO-10303-21;\n```\n\u003c/details>\n","author":{"url":"https://github.com/aricoleman","@type":"Person","name":"aricoleman"},"datePublished":"2026-09-23T01:12:47Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9570"}
| 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:edfd34ef-6685-9d6a-df19-ff9a023e9ce9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D534:15EB96:78AAFB:A5350B:6B0479D2 |
| html-safe-nonce | 55e614415bb1dd2e2a28a40f6e153ef1f23a04b1deb2e2fe1ea32d3a94888602 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTM0OjE1RUI5Njo3OEFBRkI6QTUzNTBCOjZCMDQ3OUQyIiwidmlzaXRvcl9pZCI6IjQwODQ2NzAyMTAzMTA0NTU4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 236edf5f825b7c9e87d4d0649901534d77e98b7e1cdea22d215d031427855ae2 |
| hovercard-subject-tag | issue:5547326318 |
| 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/9570/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4c8976df3157e02c5be4286a48ea72c481e534e0c7d5695545a3e6bcbf03ab38/IfcOpenShell/IfcOpenShell/issues/9570 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4c8976df3157e02c5be4286a48ea72c481e534e0c7d5695545a3e6bcbf03ab38/IfcOpenShell/IfcOpenShell/issues/9570 |
| og:image:alt | Versions: ifcopenshell 0.8.5 and 0.9.0a260921 (Linux x86_64, Python 3.11). Both give bit-identical results. Summary A 7-face IfcAdvancedBrep is a 1.0 × 0.8 × 0.6 box minus an r = 0.15 cylindrical t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aricoleman |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| 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 | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| 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