From 3feb9ba2c986ae2905bd504d3c45b0c2d8576fe5 Mon Sep 17 00:00:00 2001 From: Brennen Herbruck Date: Wed, 21 Oct 2026 07:31:04 -0400 Subject: [PATCH] kernel-cases: tessellation cases from mesh-hole reports grade watertightness 784, 1753 and the two 1666 lofts came from holes in exported meshes, so each now also requires a mesh with no open or over-shared edge. On today's kernel 784 and both lofts are watertight; 1753's bowl, its rim cut by a cylinder, still has 3 open mesh edges. Co-Authored-By: Claude Opus 5.5 --- .../expected.json | 16 +++++++----- .../1666-loft-twisted-square/expected.json | 18 +++++++------ .../expected.json | 19 +++++++------- .../expected.json | 25 ++++++++++--------- 4 files changed, 44 insertions(+), 34 deletions(-) diff --git a/tests/kernel-cases/tessellation/1666-loft-18-gon-ruled-sides/expected.json b/tests/kernel-cases/tessellation/1666-loft-18-gon-ruled-sides/expected.json index 103a3a2f2..b49cbba18 100644 --- a/tests/kernel-cases/tessellation/1666-loft-18-gon-ruled-sides/expected.json +++ b/tests/kernel-cases/tessellation/1666-loft-18-gon-ruled-sides/expected.json @@ -1,8 +1,12 @@ { - "sources": ["tangency-labs/solidcraft#1666", "tangency-labs/solidcraft#1670"], - "what": "a loft between two 18-vertex polylines whose side faces are twisted ruled (bilinear) patches: each used to be exported as two flat triangles with crossing diagonals", - "source": "analytic", - "method": "A ruled loft joining vertex i of the bottom polygon (z=0) to vertex i of the top polygon (z=90.5) has, at height t*90.5, the polygon with vertices (1-t)p_i + t q_i. Its shoelace area is quadratic in t, so Simpson's rule is exact: V = h/6 (A0 + 4 A(1/2) + A1) with h=90.5, A0=247.28368 (shoelace of the bottom polygon), A1=156 (the top polygon is the 52 x 3 rectangle), A(1/2)=area of the polygon of midpoints. That gives 17993.405 (a 2000-slice numerical integral of the same area agrees to 1e-8).", - "body_count": 1, - "volume_mm3": 17993.405 + "sources": [ + "tangency-labs/solidcraft#1666", + "tangency-labs/solidcraft#1670" + ], + "what": "a loft between two 18-vertex polylines whose side faces are twisted ruled (bilinear) patches: each used to be exported as two flat triangles with crossing diagonals", + "source": "analytic", + "method": "A ruled loft joining vertex i of the bottom polygon (z=0) to vertex i of the top polygon (z=90.5) has, at height t*90.5, the polygon with vertices (1-t)p_i + t q_i. Its shoelace area is quadratic in t, so Simpson's rule is exact: V = h/6 (A0 + 4 A(1/2) + A1) with h=90.5, A0=247.28368 (shoelace of the bottom polygon), A1=156 (the top polygon is the 52 x 3 rectangle), A(1/2)=area of the polygon of midpoints. That gives 17993.405 (a 2000-slice numerical integral of the same area agrees to 1e-8). Watertight: each body's mesh has no open or over-shared edge (the reports were holes in the exported mesh).", + "body_count": 1, + "volume_mm3": 17993.405, + "watertight": true } diff --git a/tests/kernel-cases/tessellation/1666-loft-twisted-square/expected.json b/tests/kernel-cases/tessellation/1666-loft-twisted-square/expected.json index 86748d55c..6d85c7d77 100644 --- a/tests/kernel-cases/tessellation/1666-loft-twisted-square/expected.json +++ b/tests/kernel-cases/tessellation/1666-loft-twisted-square/expected.json @@ -1,9 +1,13 @@ { - "sources": ["tangency-labs/solidcraft#1666", "tangency-labs/solidcraft#1670"], - "what": "a loft from a 20x20 square to the same square turned 45 degrees, 30 mm higher: its four side faces are strongly twisted ruled patches, the case a two-triangle mesh gets visibly wrong", - "source": "analytic", - "method": "At height 30t the section is the polygon of (1-t)p_i + t q_i (p_i the square's corners at angles 45+90k deg, q_i those at 90+90k deg, both radius 10 sqrt 2). Its shoelace area is quadratic in t, so Simpson is exact: A0=A1=400, A(1/2)= 2 r^2 (1 - ... ) computed from the midpoint polygon (a square of circumradius r cos(22.5 deg): area 2 r^2 cos^2(22.5 deg) = 400 cos^2(22.5 deg)=341.42). V = 30/6 (400 + 4*341.4214 + 400) = 5*(2165.6854)=10828.427. Faces: 4 sides and 2 caps.", - "body_count": 1, - "volume_mm3": 10828.427, - "faces": 6 + "sources": [ + "tangency-labs/solidcraft#1666", + "tangency-labs/solidcraft#1670" + ], + "what": "a loft from a 20x20 square to the same square turned 45 degrees, 30 mm higher: its four side faces are strongly twisted ruled patches, the case a two-triangle mesh gets visibly wrong", + "source": "analytic", + "method": "At height 30t the section is the polygon of (1-t)p_i + t q_i (p_i the square's corners at angles 45+90k deg, q_i those at 90+90k deg, both radius 10 sqrt 2). Its shoelace area is quadratic in t, so Simpson is exact: A0=A1=400, A(1/2)= 2 r^2 (1 - ... ) computed from the midpoint polygon (a square of circumradius r cos(22.5 deg): area 2 r^2 cos^2(22.5 deg) = 400 cos^2(22.5 deg)=341.42). V = 30/6 (400 + 4*341.4214 + 400) = 5*(2165.6854)=10828.427. Faces: 4 sides and 2 caps. Watertight: each body's mesh has no open or over-shared edge (the reports were holes in the exported mesh).", + "body_count": 1, + "volume_mm3": 10828.427, + "faces": 6, + "watertight": true } diff --git a/tests/kernel-cases/tessellation/1753-bowl-rim-cut-by-cylinder/expected.json b/tests/kernel-cases/tessellation/1753-bowl-rim-cut-by-cylinder/expected.json index a4f3f5c2f..5a272eb65 100644 --- a/tests/kernel-cases/tessellation/1753-bowl-rim-cut-by-cylinder/expected.json +++ b/tests/kernel-cases/tessellation/1753-bowl-rim-cut-by-cylinder/expected.json @@ -1,10 +1,11 @@ { - "sources": [ - "tangency-labs/solidcraft#1753" - ], - "what": "a revolved bowl whose rim is cut by a large cylinder (R320, axis across the bowl): the cut edge is an intersection curve between the cylinder and the cone walls, whose two faces used to put different vertices on it, so the STL/3MF export had a 0.001 mm crack", - "source": "analytic", - "method": "Section (r,z): (0,0),(40,0),(70,40),(64,40),(34,6),(0,6), revolved 360 deg about Z: Pappus/shoelace V = (pi/3)|sum (x_i y_{i+1}-x_{i+1} y_i)(x_i+x_{i+1})| = 125085.653 uncut. The cutter is the cylinder r=320 with axis along X, lowest line at z=36 (centre z=356): it removes everything above z_c(y) = 356 - sqrt(320^2 - y^2), which cuts the rim (z=40) only for |y| small (z_c(70)=43.75 > 40). The column of material at (x,y), r=sqrt(x^2+y^2), runs from z_low(r) (0 for r<=40, (r-40)*4/3 beyond) to min(z_up(r), z_c(y)) with z_up = 6 for r<=34, 6+(r-34)*34/30 for r<=64, 40 beyond. Integrating in polar coordinates (2800x2880 midpoint cells, converged to 1e-7) gives V = 121495.05. The export mesh being closed (every edge used by two triangles) is not graded by the rig.", - "body_count": 1, - "volume_mm3": 121495.05 -} \ No newline at end of file + "sources": [ + "tangency-labs/solidcraft#1753" + ], + "what": "a revolved bowl whose rim is cut by a large cylinder (R320, axis across the bowl): the cut edge is an intersection curve between the cylinder and the cone walls, whose two faces used to put different vertices on it, so the STL/3MF export had a 0.001 mm crack", + "source": "analytic", + "method": "Section (r,z): (0,0),(40,0),(70,40),(64,40),(34,6),(0,6), revolved 360 deg about Z: Pappus/shoelace V = (pi/3)|sum (x_i y_{i+1}-x_{i+1} y_i)(x_i+x_{i+1})| = 125085.653 uncut. The cutter is the cylinder r=320 with axis along X, lowest line at z=36 (centre z=356): it removes everything above z_c(y) = 356 - sqrt(320^2 - y^2), which cuts the rim (z=40) only for |y| small (z_c(70)=43.75 > 40). The column of material at (x,y), r=sqrt(x^2+y^2), runs from z_low(r) (0 for r<=40, (r-40)*4/3 beyond) to min(z_up(r), z_c(y)) with z_up = 6 for r<=34, 6+(r-34)*34/30 for r<=64, 40 beyond. Integrating in polar coordinates (2800x2880 midpoint cells, converged to 1e-7) gives V = 121495.05. The export mesh being closed (every edge used by two triangles) is not graded by the rig. Watertight: each body's mesh has no open or over-shared edge (the reports were holes in the exported mesh).", + "body_count": 1, + "volume_mm3": 121495.05, + "watertight": true +} diff --git a/tests/kernel-cases/tessellation/784-stl-open-edges-filleted-and-drilled/expected.json b/tests/kernel-cases/tessellation/784-stl-open-edges-filleted-and-drilled/expected.json index 00a847dc3..568c0be4b 100644 --- a/tests/kernel-cases/tessellation/784-stl-open-edges-filleted-and-drilled/expected.json +++ b/tests/kernel-cases/tessellation/784-stl-open-edges-filleted-and-drilled/expected.json @@ -1,13 +1,14 @@ { - "sources": [ - "tangency-labs/solidcraft#784", - "tangency-labs/solidcraft#811" - ], - "what": "two bodies whose STL export used to have open edges where faces were meshed apart: a 40x30x20 box with all twelve edges rounded 2 mm, and a cylinder R15 x 20 with a coaxial 6 mm bore", - "source": "analytic", - "method": "Rounded box: Steiner formula for the box 36x26x16 grown by a ball of r=2 (equal rounds on all twelve edges meet in spherical corners): V = xyz + 2r(xy+yz+zx) + pi r^2 (x+y+z) + 4/3 pi r^3 = 23701.687, A = 2(xy+yz+zx) + 2 pi r (x+y+z) + 4 pi r^2 = 4886.442; 26 faces (6 planes, 12 cylinders, 8 sphere corners). Drilled cylinder: V = pi (15^2-3^2) 20 = 13571.680, A = 2 pi (15^2-3^2) + 2 pi 15 20 + 2 pi 3 20 = 1152 pi = 3619.115; 4 faces. Totals over both bodies. A watertight STL (every edge shared by two triangles) is not graded by the rig.", - "body_count": 2, - "volume_mm3": 37273.367, - "area_mm2": 8505.557, - "faces": 30 -} \ No newline at end of file + "sources": [ + "tangency-labs/solidcraft#784", + "tangency-labs/solidcraft#811" + ], + "what": "two bodies whose STL export used to have open edges where faces were meshed apart: a 40x30x20 box with all twelve edges rounded 2 mm, and a cylinder R15 x 20 with a coaxial 6 mm bore", + "source": "analytic", + "method": "Rounded box: Steiner formula for the box 36x26x16 grown by a ball of r=2 (equal rounds on all twelve edges meet in spherical corners): V = xyz + 2r(xy+yz+zx) + pi r^2 (x+y+z) + 4/3 pi r^3 = 23701.687, A = 2(xy+yz+zx) + 2 pi r (x+y+z) + 4 pi r^2 = 4886.442; 26 faces (6 planes, 12 cylinders, 8 sphere corners). Drilled cylinder: V = pi (15^2-3^2) 20 = 13571.680, A = 2 pi (15^2-3^2) + 2 pi 15 20 + 2 pi 3 20 = 1152 pi = 3619.115; 4 faces. Totals over both bodies. A watertight STL (every edge shared by two triangles) is not graded by the rig. Watertight: each body's mesh has no open or over-shared edge (the reports were holes in the exported mesh).", + "body_count": 2, + "volume_mm3": 37273.367, + "area_mm2": 8505.557, + "faces": 30, + "watertight": true +}