Title: [geom] Void on open IfcTriangulatedFaceSet (Closed=.F., e.g. TIN terrain): OpenCASCADE adds faces of the opening body, CGAL returns empty geometry · Issue #10076 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: [geom] Void on open IfcTriangulatedFaceSet (Closed=.F., e.g. TIN terrain): OpenCASCADE adds faces of the opening body, CGAL returns empty geometry · Issue #10076 · IfcOpenShell/IfcOpenShell
X Title: [geom] Void on open IfcTriangulatedFaceSet (Closed=.F., e.g. TIN terrain): OpenCASCADE adds faces of the opening body, CGAL returns empty geometry · Issue #10076 · IfcOpenShell/IfcOpenShell
Description: Versions: ifcopenshell 0.9.0.post1 (pip and Bonsai), schema IFC4X3_ADD2. Situation: An IfcGeographicElement (TERRAIN) represented as an open IfcTriangulatedFaceSet (Closed = .F., a typical TIN surface) is voided by an IfcEarthworksCut (b...
Open Graph Description: Versions: ifcopenshell 0.9.0.post1 (pip and Bonsai), schema IFC4X3_ADD2. Situation: An IfcGeographicElement (TERRAIN) represented as an open IfcTriangulatedFaceSet (Closed = .F., a typical TIN surf...
X Description: Versions: ifcopenshell 0.9.0.post1 (pip and Bonsai), schema IFC4X3_ADD2. Situation: An IfcGeographicElement (TERRAIN) represented as an open IfcTriangulatedFaceSet (Closed = .F., a typical TIN surf...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/10076
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[geom] Void on open IfcTriangulatedFaceSet (Closed=.F., e.g. TIN terrain): OpenCASCADE adds faces of the opening body, CGAL returns empty geometry","articleBody":"**Versions:** ifcopenshell 0.9.0.post1 (pip and Bonsai), schema IFC4X3_ADD2.\n\n**Situation:** An `IfcGeographicElement` (TERRAIN) represented as an open `IfcTriangulatedFaceSet` (`Closed = .F.`, a typical TIN surface) is voided by an `IfcEarthworksCut` (body = `IfcExtrudedAreaSolid`) via `IfcRelVoidsElement`.\n\n**Observed:**\n- `opencascade`: the footprint of the cut is removed from the surface, but faces of the opening body are added to the terrain result. Which faces depends on the winding of the TIN. With normals +Z, the walls and the bottom below the surface are added. With reversed winding, the walls and the top above the surface are added. In Bonsai, this shows up as a \"lid\" of terrain over pavements that the cut was meant to expose.\n- `cgal`: empty geometry (log `UNS006 Subtraction of openings not supported for non-closed geometry`).\n- `boolean-attempt-2d` / `reorient-shells` / `make-volume` don't change the result. The OCC log shows `GEO191 Non-manifold first operand` / `GEO133`.\n\n**Expected:** either the surface with a 2 × 2 m hole (96 m², all z = 0), or the surface left unchanged with a warning. Faces of the opening body should never become part of the voided element.\n\n**Minimal repro (no input file needed):**\n\n```python\nimport numpy as np, ifcopenshell, ifcopenshell.geom as geom\nf = ifcopenshell.file(schema=\"IFC4X3_ADD2\")\nctx = f.createIfcGeometricRepresentationContext(None, \"Model\", 3, 1e-6, f.createIfcAxis2Placement3D(f.createIfcCartesianPoint((0., 0., 0.))))\nbody = f.createIfcGeometricRepresentationSubContext(\"Body\", \"Model\", None, None, None, None, ctx, None, \"MODEL_VIEW\", None)\npl = lambda: f.createIfcLocalPlacement(None, f.createIfcAxis2Placement3D(f.createIfcCartesianPoint((0., 0., 0.))))\npts = f.createIfcCartesianPointList3D([(0., 0., 0.), (10., 0., 0.), (10., 10., 0.), (0., 10., 0.)])\ntin = f.createIfcTriangulatedFaceSet(pts, None, False, [(1, 2, 3), (1, 3, 4)], None) # swap to [(1,3,2),(1,4,3)] for the \"lid\" case\nterrain = f.createIfcGeographicElement(ifcopenshell.guid.new(), None, \"Terrain\", None, None, pl(),\n f.createIfcProductDefinitionShape(None, None, [f.createIfcShapeRepresentation(body, \"Body\", \"Tessellation\", [tin])]), None, \"TERRAIN\")\nprof = f.createIfcRectangleProfileDef(\"AREA\", None, f.createIfcAxis2Placement2D(f.createIfcCartesianPoint((5., 5.)), None), 2., 2.)\next = f.createIfcExtrudedAreaSolid(prof, f.createIfcAxis2Placement3D(f.createIfcCartesianPoint((0., 0., -0.5))), f.createIfcDirection((0., 0., 1.)), 1.)\ncut = f.createIfcEarthworksCut(ifcopenshell.guid.new(), None, \"Cut\", None, None, pl(),\n f.createIfcProductDefinitionShape(None, None, [f.createIfcShapeRepresentation(body, \"Body\", \"SweptSolid\", [ext])]), None, \"EXCAVATION\")\nf.createIfcRelVoidsElement(ifcopenshell.guid.new(), None, None, None, terrain, cut)\ns = geom.settings(); s.set(\"use-world-coords\", True)\nfor lib in (\"opencascade\", \"cgal\"):\n g = geom.create_shape(s, terrain, geometry_library=lib).geometry\n v = np.array(g.verts).reshape(-1, 3); t = np.array(g.faces).reshape(-1, 3)\n area = sum(np.linalg.norm(np.cross(v[b] - v[a], v[c] - v[a])) / 2 for a, b, c in t)\n print(lib, len(t), round(area, 2), sorted(set(np.round(v[:, 2], 3))))\n```\n\n**Output:**\n\n| winding | opencascade | cgal |\n|---|---|---|\n| normals +Z `[(1,2,3),(1,3,4)]` | 18 triangles, 104.00 m², z ∈ {−0.5, 0.0} (cut walls + bottom added) | 0 triangles |\n| reversed `[(1,3,2),(1,4,3)]` | 18 triangles, 104.00 m², z ∈ {0.0, 0.5} (cut walls + top added) | 0 triangles |\n\nA closed terrain body (`Closed = .T.` or an extrusion) is voided correctly by both kernels in this setup.\n\n**Spec context:** IFC 4.3.2.0 `IfcRelVoidsElement` / `IfcFeatureElementSubtraction` describe a Boolean difference of \"geometric bodies\" and say nothing about open surfaces. On `ifc4.3-main`, the *Earthworks Cuttings* concept template now has a NOTE that \"no CSG operation is expected to be performed on import\" for surface terrains (commit efcac273). So leaving the surface untouched, with a warning, would be acceptable too. Adding the opening's faces is not.\n\n**Related:** #5630 (void without effect on terrain, closed geometry), #8725, PR #9716.","author":{"url":"https://github.com/M-H-H-B","@type":"Person","name":"M-H-H-B"},"datePublished":"2026-10-27T18:58:52Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/10076"}
| 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:6745d7a0-7858-2433-436a-7cf9a2256da1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBB8:221EB5:565979:77037F:6B04A188 |
| html-safe-nonce | b21ff17515ba095a647ecd7865289b5490a07ee4ecb5e39decc820263f291d0e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkI4OjIyMUVCNTo1NjU5Nzk6NzcwMzdGOjZCMDRBMTg4IiwidmlzaXRvcl9pZCI6IjEyNTkyMTQ1MDcwNzQyNzcyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 348f040e522d5f6e4e02f6731998d1ce283e3ab32afb4ad84e4926b2bf71ffd6 |
| hovercard-subject-tag | issue:6065779553 |
| 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/10076/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1e4de7e6fa18ff251ab225c1088f02d78b066083d2e27e00704fd0027cea3ed4/IfcOpenShell/IfcOpenShell/issues/10076 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1e4de7e6fa18ff251ab225c1088f02d78b066083d2e27e00704fd0027cea3ed4/IfcOpenShell/IfcOpenShell/issues/10076 |
| og:image:alt | Versions: ifcopenshell 0.9.0.post1 (pip and Bonsai), schema IFC4X3_ADD2. Situation: An IfcGeographicElement (TERRAIN) represented as an open IfcTriangulatedFaceSet (Closed = .F., a typical TIN surf... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | M-H-H-B |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d |
| 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 | 3fd14143b75b2af7b76bbd23b069867d091adfcc |
| 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