SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 354/509: Kernel rig: pattern on path cases, bosses along a line, bodies turning with an arc's tangent, and instances past the path's end refused (and 3 more)
jyvikoc4e727871d30
diff --git a/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/expected.json b/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/expected.jsonnew file mode 100644index 0000000000..64a022f8fc--- /dev/null+++ b/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/expected.json@@ -0,0 +1,20 @@+{+ "sources": [],+ "what": "a body patterned 3 times along a half circle r20 with orientation path: each copy turns with the tangent",+ "source": "analytic",+ "method": "instances at 0, 90 and 180 deg along the arc, each turned with the tangent: the 4x2x2 key (long side radial) stays radial, at (0,20) 2 wide in X and 4 long in Y (y 18..22). Unturned it would be 4 wide in X (x -2..2, y 19..21). Three keys: V = 3*16, bbox x -22..22, y -1..22, z 0..2",+ "body_count": 3,+ "volume_mm3": 48.0,+ "bbox": {+ "min": [+ -22,+ -1,+ 0+ ],+ "max": [+ 22,+ 22,+ 2+ ]+ }+}diff --git a/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/recipe.json b/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/recipe.jsonnew file mode 100644index 0000000000..dc1c6cd744--- /dev/null+++ b/tests/kernel-cases/booleans/cov-pattern-path-bodies-turn-along-an-arc/recipe.json@@ -0,0 +1,61 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 4,+ "width": 2,+ "height": 2,+ "center": [+ 20,+ 0,+ 1+ ],+ "body_name": "Key"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": "XY",+ "name": "Path"+ }+ },+ {+ "command": "sketch.arc.center_point",+ "params": {+ "center": [+ 0,+ 0+ ],+ "start": [+ 20,+ 0+ ],+ "sweep": 180,+ "id": "arc"+ }+ },+ {+ "command": "sketch.finish",+ "params": {+ "sketch": "Path"+ }+ },+ {+ "command": "solid.pattern.path",+ "params": {+ "bodies": [+ "Key"+ ],+ "path_sketch": "Path",+ "path": [+ "arc"+ ],+ "count": 3,+ "distance": 62.83185307179586,+ "orientation": "path"+ }+ }+ ]+}diff --git a/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/expected.json b/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/expected.jsonnew file mode 100644index 0000000000..acc43ee8ba--- /dev/null+++ b/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/expected.json@@ -0,0 +1,21 @@+{+ "sources": [],+ "what": "a boss joined to a plate, patterned 5 times 20 mm apart along a sketch line",+ "source": "analytic",+ "method": "plate 100x20x5 = 10000 plus 5 bosses r3 h5 at x = 10, 30 ... 90: 5 pi 9 5; faces: plate 6 + 2 a boss (side, top) = 16",+ "body_count": 1,+ "faces": 16,+ "volume_mm3": 10706.858347057703,+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 100,+ 20,+ 10+ ]+ }+}diff --git a/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/recipe.json b/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/recipe.jsonnew file mode 100644index 0000000000..8d71d29b55--- /dev/null+++ b/tests/kernel-cases/booleans/cov-pattern-path-bosses-along-a-line/recipe.json@@ -0,0 +1,73 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 100,+ "width": 20,+ "height": 5,+ "body_name": "Plate"+ }+ },+ {+ "command": "solid.cylinder",+ "params": {+ "base": [+ 10,+ 10,+ 5+ ],+ "radius": 3,+ "height": 5,+ "operation": "join",+ "name": "Boss"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": "XY",+ "name": "Path"+ }+ },+ {+ "command": "sketch.line",+ "params": {+ "points": [+ [+ 10,+ 10+ ],+ [+ 90,+ 10+ ]+ ],+ "ids": [+ "p1"+ ],+ "infer": false+ }+ },+ {+ "command": "sketch.finish",+ "params": {+ "sketch": "Path"+ }+ },+ {+ "command": "solid.pattern.path",+ "params": {+ "features": [+ "Boss"+ ],+ "path_sketch": "Path",+ "path": [+ "p1"+ ],+ "count": 5,+ "spacing": 20+ }+ }+ ]+}diff --git a/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/expected.json b/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/expected.jsonnew file mode 100644index 0000000000..4114b4bcd9--- /dev/null+++ b/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/expected.json@@ -0,0 +1,8 @@+{+ "sources": [],+ "what": "6 instances 20 mm apart need 100 mm of an 80 mm path: refused",+ "source": "analytic",+ "method": "(6 - 1) * 20 = 100 > 80: the last instances would leave the path; a clean refusal naming its length",+ "outcome": "refused",+ "refusal": "run past the end of the path (80.000 mm long)"+}diff --git a/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/recipe.json b/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/recipe.jsonnew file mode 100644index 0000000000..a3c0621a0c--- /dev/null+++ b/tests/kernel-cases/booleans/cov-pattern-path-past-the-end-refused/recipe.json@@ -0,0 +1,73 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 100,+ "width": 20,+ "height": 5,+ "body_name": "Plate"+ }+ },+ {+ "command": "solid.cylinder",+ "params": {+ "base": [+ 10,+ 10,+ 5+ ],+ "radius": 3,+ "height": 5,+ "operation": "join",+ "name": "Boss"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": "XY",+ "name": "Path"+ }+ },+ {+ "command": "sketch.line",+ "params": {+ "points": [+ [+ 10,+ 10+ ],+ [+ 90,+ 10+ ]+ ],+ "ids": [+ "p1"+ ],+ "infer": false+ }+ },+ {+ "command": "sketch.finish",+ "params": {+ "sketch": "Path"+ }+ },+ {+ "command": "solid.pattern.path",+ "params": {+ "features": [+ "Boss"+ ],+ "path_sketch": "Path",+ "path": [+ "p1"+ ],+ "count": 6,+ "spacing": 20+ }+ }+ ]+}diff --git a/tests/kernel-cases/shell/KNOWN_FAILING b/tests/kernel-cases/shell/KNOWN_FAILINGindex 07f36eb3c3..2cf6335439 100644--- a/tests/kernel-cases/shell/KNOWN_FAILING+++ b/tests/kernel-cases/shell/KNOWN_FAILING@@ -1,4 +1,5 @@# The shell cases that fail today, one a line: `<case> <why it fails today>`. Sorted. The kernel# rig gate (.github/workflows/kernel-rig.yml) fails on a case that fails and is not listed here,# and on a listed case that passes: a fix removes its line in the same pull request.-# Baseline: not seeded yet; seeded from a develop run after the SMLib pin bump.+# Baseline: 45f69c0e5 with SMLib 60b1c6a, aarch64 Linux.+cov-replace-face-step-onto-the-higher-face not supported yet: SMLib's offset of faces refuses (Unsupported) a move that closes a neighbouring face (the step wall) to nothingdiff --git a/tests/kernel-cases/shell/cov-replace-face-step-onto-the-higher-face/expected.json b/tests/kernel-cases/shell/cov-replace-face-step-onto-the-higher-face/expected.jsonnew file mode 100644index 0000000000..74ab5be41b--- /dev/null+++ b/tests/kernel-cases/shell/cov-replace-face-step-onto-the-higher-face/expected.json@@ -0,0 +1,22 @@+{+ "sources": [],+ "what": "the lower top of a stepped block replaced by the plane of the higher top: the step wall closes up and the tops become one face",+ "source": "analytic",+ "method": "stepped block (x 0..20 to z=20, x 20..40 to z=10); the lower top goes to z=20: a 40x30x20 block, V = 24000, A = 2(1200+800+600), the coplanar tops one face: 6 faces",+ "body_count": 1,+ "faces": 6,+ "volume_mm3": 24000.0,+ "area_mm2": 5200.0,+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 40,+ 30,+ 20+ ]+ }+}diff --git a/tests/kernel-cases/shell/cov-replace-face-step-onto-the-higher-face/recipe.json b/tests/kernel-cases/shell/cov-replace-face-step-onto-the-higher-face/recipe.jsonnew file mode 100644index 0000000000..8883816149--- /dev/null+++ b/tests/kernel-cases/shell/cov-replace-face-step-onto-the-higher-face/recipe.json@@ -0,0 +1,39 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 30,+ "height": 10,+ "body_name": "Block"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 30,+ "height": 20,+ "operation": "join"+ }+ },+ {+ "command": "solid.replace_face",+ "params": {+ "faces": [+ [+ 30,+ 15,+ 10+ ]+ ],+ "target_face": [+ 10,+ 15,+ 20+ ]+ }+ }+ ]+}diff --git a/tests/kernel-cases/shell/cov-replace-face-top-onto-a-plane/expected.json b/tests/kernel-cases/shell/cov-replace-face-top-onto-a-plane/expected.jsonnew file mode 100644index 0000000000..c66f515d9d--- /dev/null+++ b/tests/kernel-cases/shell/cov-replace-face-top-onto-a-plane/expected.json@@ -0,0 +1,22 @@+{+ "sources": [],+ "what": "a block's top face replaced by the plane z=15",+ "source": "analytic",+ "method": "the top moves from z=10 to 15: a 40x30x15 block, V = 18000, A = 2(1200 + 600 + 450)",+ "body_count": 1,+ "faces": 6,+ "volume_mm3": 18000.0,+ "area_mm2": 4500.0,+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 40,+ 30,+ 15+ ]+ }+}diff --git a/tests/kernel-cases/shell/cov-replace-face-top-onto-a-plane/recipe.json b/tests/kernel-cases/shell/cov-replace-face-top-onto-a-plane/recipe.jsonnew file mode 100644index 0000000000..f36e4201ea--- /dev/null+++ b/tests/kernel-cases/shell/cov-replace-face-top-onto-a-plane/recipe.json@@ -0,0 +1,37 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 30,+ "height": 10,+ "body_name": "Block"+ }+ },+ {+ "command": "solid.replace_face",+ "params": {+ "faces": [+ [+ 20,+ 15,+ 10+ ]+ ],+ "target": {+ "origin": [+ 0,+ 0,+ 15+ ],+ "normal": [+ 0,+ 0,+ 1+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/solids/cov-bounding-solid-of-a-sphere/expected.json b/tests/kernel-cases/solids/cov-bounding-solid-of-a-sphere/expected.jsonnew file mode 100644index 0000000000..a326179ed7--- /dev/null+++ b/tests/kernel-cases/solids/cov-bounding-solid-of-a-sphere/expected.json@@ -0,0 +1,21 @@+{+ "sources": [],+ "what": "the bounding box of a sphere r10 at (5,5,5): a curved body's exact extremes, not its mesh's",+ "source": "analytic",+ "method": "the sphere spans 5 +- 10 on each axis: the box (-5,-5,-5)-(15,15,15) = 20^3 = 8000; with the sphere kept: V = 8000 + 4/3 pi 1000; faces 6 + 1",+ "body_count": 2,+ "faces": 7,+ "volume_mm3": 12188.79020478639,+ "bbox": {+ "min": [+ -5,+ -5,+ -5+ ],+ "max": [+ 15,+ 15,+ 15+ ]+ }+}diff --git a/tests/kernel-cases/solids/cov-bounding-solid-of-a-sphere/recipe.json b/tests/kernel-cases/solids/cov-bounding-solid-of-a-sphere/recipe.jsonnew file mode 100644index 0000000000..686f78767b--- /dev/null+++ b/tests/kernel-cases/solids/cov-bounding-solid-of-a-sphere/recipe.json@@ -0,0 +1,25 @@+{+ "commands": [+ {+ "command": "solid.sphere",+ "params": {+ "radius": 10,+ "center": [+ 5,+ 5,+ 5+ ],+ "body_name": "Ball"+ }+ },+ {+ "command": "solid.bounding_solid",+ "params": {+ "bodies": [+ "Ball"+ ],+ "body_name": "Bound"+ }+ }+ ]+}diff --git a/tests/kernel-cases/solids/cov-bounding-solid-two-boxes-with-margin/expected.json b/tests/kernel-cases/solids/cov-bounding-solid-two-boxes-with-margin/expected.jsonnew file mode 100644index 0000000000..c2cdffc6d0--- /dev/null+++ b/tests/kernel-cases/solids/cov-bounding-solid-two-boxes-with-margin/expected.json@@ -0,0 +1,20 @@+{+ "sources": [],+ "what": "the bounding box of two boxes (0..10 cube, 20..25 x 0..5 x 0..5) with a 2 mm margin",+ "source": "analytic",+ "method": "the boxes span (0,0,0)-(25,10,10); with 2 mm: (-2,-2,-2)-(27,12,12) = 29x14x14 = 5684; with both boxes kept: V = 1000 + 125 + 5684",+ "body_count": 3,+ "volume_mm3": 6809,+ "bbox": {+ "min": [+ -2,+ -2,+ -2+ ],+ "max": [+ 27,+ 12,+ 12+ ]+ }+}diff --git a/tests/kernel-cases/solids/cov-bounding-solid-two-boxes-with-margin/recipe.json b/tests/kernel-cases/solids/cov-bounding-solid-two-boxes-with-margin/recipe.jsonnew file mode 100644index 0000000000..54f3a63d89--- /dev/null+++ b/tests/kernel-cases/solids/cov-bounding-solid-two-boxes-with-margin/recipe.json@@ -0,0 +1,34 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 10,+ "width": 10,+ "height": 10,+ "body_name": "A"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 5,+ "width": 5,+ "height": 5,+ "corner": [+ 20,+ 0,+ 0+ ],+ "body_name": "B"+ }+ },+ {+ "command": "solid.bounding_solid",+ "params": {+ "margin": 2,+ "body_name": "Bound"+ }+ }+ ]+}diff --git a/tests/kernel-cases/solids/cov-scale-sphere-to-ellipsoid/expected.json b/tests/kernel-cases/solids/cov-scale-sphere-to-ellipsoid/expected.jsonnew file mode 100644index 0000000000..8556422ea1--- /dev/null+++ b/tests/kernel-cases/solids/cov-scale-sphere-to-ellipsoid/expected.json@@ -0,0 +1,26 @@+{+ "sources": [],+ "what": "a sphere r10 scaled non-uniformly (1, 2, 0.5) into an ellipsoid",+ "source": "analytic",+ "method": "ellipsoid of semi-axes 10, 20, 5: V = 4/3 pi abc = 4/3 pi 1000 (the factors multiply to 1: the sphere's volume); bbox +-10, +-20, +-5; one closed face",+ "body_count": 1,+ "faces": 1,+ "volume_mm3": 4188.790204786391,+ "center_of_mass": [+ 0,+ 0,+ 0+ ],+ "bbox": {+ "min": [+ -10,+ -20,+ -5+ ],+ "max": [+ 10,+ 20,+ 5+ ]+ }+}diff --git a/tests/kernel-cases/solids/cov-scale-sphere-to-ellipsoid/recipe.json b/tests/kernel-cases/solids/cov-scale-sphere-to-ellipsoid/recipe.jsonnew file mode 100644index 0000000000..13456cd457--- /dev/null+++ b/tests/kernel-cases/solids/cov-scale-sphere-to-ellipsoid/recipe.json@@ -0,0 +1,24 @@+{+ "commands": [+ {+ "command": "solid.sphere",+ "params": {+ "radius": 10,+ "body_name": "Ball"+ }+ },+ {+ "command": "solid.scale",+ "params": {+ "bodies": [+ "Ball"+ ],+ "factors": [+ 1,+ 2,+ 0.5+ ]+ }+ }+ ]+}diff --git a/tests/kernel-cases/solids/cov-scale-uniform-about-a-corner/expected.json b/tests/kernel-cases/solids/cov-scale-uniform-about-a-corner/expected.jsonnew file mode 100644index 0000000000..7fb35055af--- /dev/null+++ b/tests/kernel-cases/solids/cov-scale-uniform-about-a-corner/expected.json@@ -0,0 +1,27 @@+{+ "sources": [],+ "what": "a 10 mm cube scaled 2x about its far corner (10,10,10)",+ "source": "analytic",+ "method": "p -> o + 2(p - o) with o = (10,10,10): the corner 0 goes to -10, 10 stays: a 20 mm cube from -10 to 10; V = 8000, A = 6*400",+ "body_count": 1,+ "faces": 6,+ "volume_mm3": 8000.0,+ "area_mm2": 2400.0,+ "center_of_mass": [+ 0,+ 0,+ 0+ ],+ "bbox": {+ "min": [+ -10,+ -10,+ -10+ ],+ "max": [+ 10,+ 10,+ 10+ ]+ }+}diff --git a/tests/kernel-cases/solids/cov-scale-uniform-about-a-corner/recipe.json b/tests/kernel-cases/solids/cov-scale-uniform-about-a-corner/recipe.jsonnew file mode 100644index 0000000000..818c835fcd--- /dev/null+++ b/tests/kernel-cases/solids/cov-scale-uniform-about-a-corner/recipe.json@@ -0,0 +1,27 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 10,+ "width": 10,+ "height": 10,+ "body_name": "Block"+ }+ },+ {+ "command": "solid.scale",+ "params": {+ "bodies": [+ "Block"+ ],+ "factor": 2,+ "origin": [+ 10,+ 10,+ 10+ ]+ }+ }+ ]+}diff --git a/tests/kernel-cases/solids/cov-scale-zero-factor-refused/expected.json b/tests/kernel-cases/solids/cov-scale-zero-factor-refused/expected.jsonnew file mode 100644index 0000000000..a4677525a4--- /dev/null+++ b/tests/kernel-cases/solids/cov-scale-zero-factor-refused/expected.json@@ -0,0 +1,8 @@+{+ "sources": [],+ "what": "a scale factor of 0 flattens the body to a sheet: refused",+ "source": "analytic",+ "method": "a zero factor maps the cube onto a plane: no solid, a clean refusal",+ "outcome": "refused",+ "refusal": "scale factors must be positive"+}diff --git a/tests/kernel-cases/solids/cov-scale-zero-factor-refused/recipe.json b/tests/kernel-cases/solids/cov-scale-zero-factor-refused/recipe.jsonnew file mode 100644index 0000000000..3e5f6dc64f--- /dev/null+++ b/tests/kernel-cases/solids/cov-scale-zero-factor-refused/recipe.json@@ -0,0 +1,26 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 10,+ "width": 10,+ "height": 10,+ "body_name": "Block"+ }+ },+ {+ "command": "solid.scale",+ "params": {+ "bodies": [+ "Block"+ ],+ "factors": [+ 1,+ 0,+ 1+ ]+ }+ }+ ]+}