Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

Wave 477/509: Kernel rig: 831 tapered glyph extrude graded on a volume range and box (the font's S drafted in by 10 deg) (and 3 more)

jyvikoaf35c52805c6
diff --git a/tests/kernel-cases/booleans/4623-join-crossing-pleated-loft-skins/expected.json b/tests/kernel-cases/booleans/4623-join-crossing-pleated-loft-skins/expected.json
index f44f64de6a..9fa7e4a42d 100644
--- a/tests/kernel-cases/booleans/4623-join-crossing-pleated-loft-skins/expected.json
+++ b/tests/kernel-cases/booleans/4623-join-crossing-pleated-loft-skins/expected.json
@@ -5,7 +5,20 @@
"tangency-labs/solidcraft#4881"
],
"what": "a join of two pleated skins (lofts between 24-pleat star outlines, less the same loft moved in 1.1 mm) that cross along a ring near their bottoms: truck panicked ('tolerance must be no less than 1e-6') or gave no result",
- "source": "invariants",
- "method": "the narrowing cone skin and the flaring lip skin cross at z = -0.3, so their union is one connected solid: one valid closed body, no panic. The reporter's own script (pleated_union.py, 24 pleats)",
- "body_count": 1
+ "source": "analytic",
+ "method": "the narrowing cone skin and the flaring lip skin cross at z = -0.3, so their union is one connected solid: one valid closed body, no panic. The reporter's own script (pleated_union.py, 24 pleats). Every outline has its 48 vertices on the same rays (every 7.5 deg), and a ruled loft takes vertex to vertex, so at each z every loft is the star polygon with radii linear in z on those rays (a convex combination of two points on a ray stays on it), and each inner loft lies inside its outer one at every z (the radii are smaller on every ray). Skin volumes: the section area is quadratic in z (wedge areas r_i r_i+1 sin(7.5 deg) / 2), so Simpson is exact: cone 39321.32 (z -1..88.3), lip 5571.95 (z -1..6). Their overlap, by integrating over z -1..6 and each wedge's angle the radial intersection of the two skins' intervals (1/2 (r1^2 - r0^2) dtheta, converged to 0.3): 449.76. Join: 39321.32 + 5571.95 - 449.76 = 44443.5 (the two skins' plain sum, 44893.3, and either skin alone fall outside the tolerance). Box: the lip's top outline (r 120 on the axes) and the skins' z -1..88.3",
+ "body_count": 1,
+ "volume_mm3": 44443.5,
+ "bbox": {
+ "min": [
+ -120.0,
+ -120.0,
+ -1.0
+ ],
+ "max": [
+ 120.0,
+ 120.0,
+ 88.3
+ ]
+ }
}
diff --git a/tests/kernel-cases/booleans/4879-cut-through-thickened-spline-revolve/expected.json b/tests/kernel-cases/booleans/4879-cut-through-thickened-spline-revolve/expected.json
index 318d76655b..988ca8efdc 100644
--- a/tests/kernel-cases/booleans/4879-cut-through-thickened-spline-revolve/expected.json
+++ b/tests/kernel-cases/booleans/4879-cut-through-thickened-spline-revolve/expected.json
@@ -4,7 +4,12 @@
"tangency-labs/solidcraft#4484"
],
"what": "a symmetric through-all cut of a window across a thickened (2 mm) surface revolve of a control-point spline (100 deg about X): truck ran ~20 s to 'boolean Cut: no result' (or never finished)",
- "source": "invariants",
- "method": "the window (x -2..6, z 6..20, through all y) crosses the shell where it is near the XZ plane and leaves it joined round the rest of its 100 deg, so the result is one valid closed body. The spline shell has no closed-form volume",
- "body_count": 1
+ "source": "analytic",
+ "method": "the window (x -2..6, z 6..20, through all y) crosses the shell where it is near the XZ plane and leaves it joined round the rest of its 100 deg, so the result is one valid closed body. The revolve's normal lies in each meridian plane, so the 2 mm thicken is the revolution, through 100 deg, of the band between the cubic spline (clamped, knots 0 0 0 0 .5 1 1 1 1; r 8..11.63, curvature at most 0.128, so a 2 mm offset never folds) and its offset; the window removes, at each point (x, r) of the band with -2 <= x <= 6, the angles where r cos phi >= 6 (acos(6/r) of them; r cos phi <= 20 everywhere). V = int over the band of r (100 deg - [x in -2..6] acos(6/r)) dA, by quadrature: 852.04 thickened outwards (uncut 1053.63), 660.02 inwards (uncut 807.73). Which side the revolve's normal faces is the kernel's convention, so V is graded in [660.02, 852.04], widened 1e-3: a cut that did nothing on the outer side, or lost half the body, falls outside. Faces: the two offset walls, the two end caps, the plane at 100 deg, the XZ plane's two pieces either side of the window, and the window's planes x = -2, x = 6 and z = 6: 10",
+ "body_count": 1,
+ "volume_mm3": [
+ 659.3,
+ 852.9
+ ],
+ "faces": 10
}
diff --git a/tests/kernel-cases/booleans/831-tapered-extrude-text-glyph/expected.json b/tests/kernel-cases/booleans/831-tapered-extrude-text-glyph/expected.json
index c3a1b6975d..45a72ab8b3 100644
--- a/tests/kernel-cases/booleans/831-tapered-extrude-text-glyph/expected.json
+++ b/tests/kernel-cases/booleans/831-tapered-extrude-text-glyph/expected.json
@@ -3,7 +3,23 @@
"tangency-labs/solidcraft#831"
],
"what": "tapered extrude of a text glyph (Bezier outline): refused with a misleading 'mixing lines and arcs' error",
- "source": "invariants",
- "method": "the letter S, 1 mm tall with -10 deg draft, is one valid closed solid (the glyph is one connected region); no number is derived because the glyph outline is the font's. Its volume is positive and below the plain extrusion's",
- "body_count": 1
+ "source": "analytic",
+ "method": "the letter S, 1 mm tall with -10 deg draft, is one valid closed solid (the glyph is one connected region). Its outline is the embedded font's (Liberation Sans 'S', one contour of 46 points, quadratic segments), scaled by the capital height: 10 / 1409 font units. From the outline (Green on the exact quadratic segments): area A = 32.1459, perimeter P = 55.7935, four convex corners of 91.6, 87.2, 96.1 and 84.5 deg at the stroke ends. A -10 deg taper moves the outline in by d = t tan 10 deg at height t, so A(d) = A - P d + C d^2 with C = 1/2 (smooth turning) + sum tan(corner/2) = 4.0065 (mitred corners), and V = A - P tan10/2 + C tan10^2/3 = 27.268. The moved outline is documented within 10 um of the true offset, so V lies within 0.01 * P = 0.56 of that: [26.71, 27.83] (the untapered 32.15 and an outward taper, 37.1, fall outside). Box: the glyph's own extents at z 0, x 0.6600..9.0277, y -0.1419..10.1490, z 0..1",
+ "body_count": 1,
+ "volume_mm3": [
+ 26.71,
+ 27.83
+ ],
+ "bbox": {
+ "min": [
+ 0.66,
+ -0.1419,
+ 0.0
+ ],
+ "max": [
+ 9.0277,
+ 10.149,
+ 1.0
+ ]
+ }
}
diff --git a/tests/kernel-cases/crashes/2357-join-ring-of-90-cylinder-segments/expected.json b/tests/kernel-cases/crashes/2357-join-ring-of-90-cylinder-segments/expected.json
index 08e80e2829..dc442a517f 100644
--- a/tests/kernel-cases/crashes/2357-join-ring-of-90-cylinder-segments/expected.json
+++ b/tests/kernel-cases/crashes/2357-join-ring-of-90-cylinder-segments/expected.json
@@ -3,8 +3,21 @@
"tangency-labs/solidcraft#2357"
],
"what": "one join of a ring of 90 straight cylinder segments, each overlapping its neighbour at a 4 degree joint: a caught truck panic, then a refusal after 21 minutes",
- "source": "invariants",
- "method": "the segments (diameter 5, 7.6 long, centred on radius 100, every 4 degrees) overlap their neighbours (the 4 degree chord at radius 100 is 6.98 < 7.6), so they join into one closed ring: one body with one shell, valid. The joint overlaps have no simple closed form, so no volume is graded. The rig's timeout bounds the time (the issue expects time to grow about linearly with the segment count)",
+ "source": "analytic",
+ "method": "the segments (diameter 5, 7.6 long, centred on radius 100, every 4 degrees) overlap their neighbours (the 4 degree chord at radius 100 is 6.98 < 7.6), so they join into one closed ring: one body with one shell, valid. Segments two apart (13.95 between centres, each within 4.55 of its centre) never meet, so V = 90 (pi 2.5^2 7.6 - W) with W the overlap of two neighbours: their axes cross 3.492 from each midpoint at 4 degrees, and W = int over the plane z = 0 of 2 min(sqrt(6.25 - dA^2), sqrt(6.25 - dB^2)) where both points lie within the segments' lengths (dA, dB the distances to the axes): 12.0915 (grid 800^2 and 1600^2 agree to 1e-4). V = 90 (149.2257 - 12.0915) = 12342.07 (the plain sum, 13430.3, is outside the tolerance). Box: each segment reaches c.e + 3.8 |a.e| + 2.5 sqrt(1 - (a.e)^2) along e; the furthest are those at 2 degrees off the x axis (x +-102.570) and 4 degrees off the y axis (y +-102.515); z +-2.5",
"body_count": 1,
- "shells": 1
+ "shells": 1,
+ "volume_mm3": 12342.07,
+ "bbox": {
+ "min": [
+ -102.57,
+ -102.515,
+ -2.5
+ ],
+ "max": [
+ 102.57,
+ 102.515,
+ 2.5
+ ]
+ }
}