SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 365/509: Kernel rig: a blend between coplanar sheets is flat, a step blend meets both sheets at the order asked, and unchained edges are refused
jyviko295ec703fbcc
diff --git a/tests/kernel-cases/surfaces/cov-blend-between-coplanar-sheets-is-flat/expected.json b/tests/kernel-cases/surfaces/cov-blend-between-coplanar-sheets-is-flat/expected.jsonnew file mode 100644index 0000000000..3555d3b30d--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-between-coplanar-sheets-is-flat/expected.json@@ -0,0 +1,40 @@+{+ "sources": [],+ "what": "a G1 blend across the 10 mm gap between two coplanar sheets, stitched to both: flat, filling the gap exactly",+ "source": "analytic",+ "method": "both ends' tangent planes are z = 0 and the edges face each other along x: every cross-section's Hermite lies in z = 0 from x = 10 to x = 20, so the blend is the 10 x 20 strip; stitched: one body, area 200 + 200 + 200 = 600, 6 free edges round the 30 x 20 outline (the blend's own sides counted, [6, 8]); seams at x = 10 and 20 at least G1",+ "valid": false,+ "body_count": 1,+ "area_mm2": 600.0,+ "boundary_edges": [+ 6,+ 8+ ],+ "bbox": {+ "min": [+ 0,+ 0,+ 0+ ],+ "max": [+ 30,+ 20,+ 0+ ]+ },+ "continuity": {+ "order": "g1",+ "edges": [+ [+ 10,+ 10,+ 0+ ],+ [+ 20,+ 10,+ 0+ ]+ ]+ }+}diff --git a/tests/kernel-cases/surfaces/cov-blend-between-coplanar-sheets-is-flat/recipe.json b/tests/kernel-cases/surfaces/cov-blend-between-coplanar-sheets-is-flat/recipe.jsonnew file mode 100644index 0000000000..ddef4b4248--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-between-coplanar-sheets-is-flat/recipe.json@@ -0,0 +1,125 @@+{+ "commands": [+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 0+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "A sketch"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 0,+ 0+ ],+ "p1": [+ 10,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "A sketch",+ "body_name": "A"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 0+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "B sketch"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 20,+ 0+ ],+ "p1": [+ 30,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "B sketch",+ "body_name": "B"+ }+ },+ {+ "command": "surface.blend",+ "params": {+ "from": {+ "body": "A",+ "edges": [+ [+ 10,+ 10,+ 0+ ]+ ]+ },+ "to": {+ "body": "B",+ "edges": [+ [+ 20,+ 10,+ 0+ ]+ ]+ },+ "stitch": true,+ "body_name": "Bridge"+ }+ }+ ]+}diff --git a/tests/kernel-cases/surfaces/cov-blend-from-edges-that-do-not-chain-refused/expected.json b/tests/kernel-cases/surfaces/cov-blend-from-edges-that-do-not-chain-refused/expected.jsonnew file mode 100644index 0000000000..e1a4902e1f--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-from-edges-that-do-not-chain-refused/expected.json@@ -0,0 +1,8 @@+{+ "sources": [],+ "what": "a blend from two opposite sides of a sheet: they share no vertex, so they are no chain; refused",+ "source": "invariants",+ "method": "an end of a blend is one chain of edges, each running on from the last",+ "outcome": "refused",+ "refusal": "the picked edges do not run on from one another"+}diff --git a/tests/kernel-cases/surfaces/cov-blend-from-edges-that-do-not-chain-refused/recipe.json b/tests/kernel-cases/surfaces/cov-blend-from-edges-that-do-not-chain-refused/recipe.jsonnew file mode 100644index 0000000000..3c2d6023e7--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-from-edges-that-do-not-chain-refused/recipe.json@@ -0,0 +1,128 @@+{+ "commands": [+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 0+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "A sketch"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 0,+ 0+ ],+ "p1": [+ 10,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "A sketch",+ "body_name": "A"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 0+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "B sketch"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 20,+ 0+ ],+ "p1": [+ 30,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "B sketch",+ "body_name": "B"+ }+ },+ {+ "command": "surface.blend",+ "params": {+ "from": {+ "body": "A",+ "edges": [+ [+ 0,+ 10,+ 0+ ],+ [+ 10,+ 10,+ 0+ ]+ ]+ },+ "to": {+ "body": "B",+ "edges": [+ [+ 20,+ 10,+ 0+ ]+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g1/expected.json b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g1/expected.jsonnew file mode 100644index 0000000000..00c1719d75--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g1/expected.json@@ -0,0 +1,24 @@+{+ "sources": [],+ "what": "a G1 blend bridging a 10 mm step between two parallel sheets (z = 0 and z = 10), stitched to both: it meets each at G1",+ "source": "invariants",+ "method": "sheets x 0..10 at z = 0 and x 20..30 at z = 10, 20 wide; the blend leaves each edge in its sheet's tangent plane (and curvature, rate) as asked. Graded: the order at both seams as Continuity Analysis measures it, one body of 3 faces (each a different surface, so none merge)",+ "valid": false,+ "body_count": 1,+ "faces": 3,+ "continuity": {+ "order": "g1",+ "edges": [+ [+ 10,+ 10,+ 0+ ],+ [+ 20,+ 10,+ 10+ ]+ ]+ }+}diff --git a/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g1/recipe.json b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g1/recipe.jsonnew file mode 100644index 0000000000..7d7495ebb8--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g1/recipe.json@@ -0,0 +1,129 @@+{+ "commands": [+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 0+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "A sketch"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 0,+ 0+ ],+ "p1": [+ 10,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "A sketch",+ "body_name": "A"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 10+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "Bs"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 20,+ 0+ ],+ "p1": [+ 30,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "Bs",+ "body_name": "B"+ }+ },+ {+ "command": "surface.blend",+ "params": {+ "from": {+ "body": "A",+ "edges": [+ [+ 10,+ 10,+ 0+ ]+ ]+ },+ "to": {+ "body": "B",+ "edges": [+ [+ 20,+ 10,+ 10+ ]+ ]+ },+ "continuity": [+ "g1",+ "g1"+ ],+ "stitch": true,+ "body_name": "Bridge"+ }+ }+ ]+}diff --git a/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g2/expected.json b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g2/expected.jsonnew file mode 100644index 0000000000..ca0733547f--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g2/expected.json@@ -0,0 +1,24 @@+{+ "sources": [],+ "what": "a G2 blend bridging a 10 mm step between two parallel sheets (z = 0 and z = 10), stitched to both: it meets each at G2",+ "source": "invariants",+ "method": "sheets x 0..10 at z = 0 and x 20..30 at z = 10, 20 wide; the blend leaves each edge in its sheet's tangent plane (and curvature, rate) as asked. Graded: the order at both seams as Continuity Analysis measures it, one body of 3 faces (each a different surface, so none merge)",+ "valid": false,+ "body_count": 1,+ "faces": 3,+ "continuity": {+ "order": "g2",+ "edges": [+ [+ 10,+ 10,+ 0+ ],+ [+ 20,+ 10,+ 10+ ]+ ]+ }+}diff --git a/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g2/recipe.json b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g2/recipe.jsonnew file mode 100644index 0000000000..0b1e82e2cc--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g2/recipe.json@@ -0,0 +1,129 @@+{+ "commands": [+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 0+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "A sketch"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 0,+ 0+ ],+ "p1": [+ 10,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "A sketch",+ "body_name": "A"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 10+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "Bs"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 20,+ 0+ ],+ "p1": [+ 30,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "Bs",+ "body_name": "B"+ }+ },+ {+ "command": "surface.blend",+ "params": {+ "from": {+ "body": "A",+ "edges": [+ [+ 10,+ 10,+ 0+ ]+ ]+ },+ "to": {+ "body": "B",+ "edges": [+ [+ 20,+ 10,+ 10+ ]+ ]+ },+ "continuity": [+ "g2",+ "g2"+ ],+ "stitch": true,+ "body_name": "Bridge"+ }+ }+ ]+}diff --git a/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g3/expected.json b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g3/expected.jsonnew file mode 100644index 0000000000..b701a91cac--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g3/expected.json@@ -0,0 +1,24 @@+{+ "sources": [],+ "what": "a G3 blend bridging a 10 mm step between two parallel sheets (z = 0 and z = 10), stitched to both: it meets each at G3",+ "source": "invariants",+ "method": "sheets x 0..10 at z = 0 and x 20..30 at z = 10, 20 wide; the blend leaves each edge in its sheet's tangent plane (and curvature, rate) as asked. Graded: the order at both seams as Continuity Analysis measures it, one body of 3 faces (each a different surface, so none merge)",+ "valid": false,+ "body_count": 1,+ "faces": 3,+ "continuity": {+ "order": "g3",+ "edges": [+ [+ 10,+ 10,+ 0+ ],+ [+ 20,+ 10,+ 10+ ]+ ]+ }+}diff --git a/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g3/recipe.json b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g3/recipe.jsonnew file mode 100644index 0000000000..167e2b25da--- /dev/null+++ b/tests/kernel-cases/surfaces/cov-blend-step-between-offset-sheets-g3/recipe.json@@ -0,0 +1,129 @@+{+ "commands": [+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 0+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "A sketch"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 0,+ 0+ ],+ "p1": [+ 10,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "A sketch",+ "body_name": "A"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": {+ "origin": [+ 0,+ 0,+ 10+ ],+ "x_dir": [+ 1,+ 0,+ 0+ ],+ "y_dir": [+ 0,+ 1,+ 0+ ]+ },+ "name": "Bs"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 20,+ 0+ ],+ "p1": [+ 30,+ 20+ ]+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "surface.patch",+ "params": {+ "sketch": "Bs",+ "body_name": "B"+ }+ },+ {+ "command": "surface.blend",+ "params": {+ "from": {+ "body": "A",+ "edges": [+ [+ 10,+ 10,+ 0+ ]+ ]+ },+ "to": {+ "body": "B",+ "edges": [+ [+ 20,+ 10,+ 10+ ]+ ]+ },+ "continuity": [+ "g3",+ "g3"+ ],+ "stitch": true,+ "body_name": "Bridge"+ }+ }+ ]+}