SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 377/509: Kernel rig: parameter cases, an expression in a sketch dimension and a cyclic one refused (and 1 more)
jyviko35a31aa3cb59
diff --git a/tests/kernel-cases/README.md b/tests/kernel-cases/README.mdindex 901cf34cb1..f993d12fcc 100644--- a/tests/kernel-cases/README.md+++ b/tests/kernel-cases/README.md@@ -44,6 +44,7 @@ One directory per area, one per case: `tests/kernel-cases/<area>/<id>/`.| `construction` (construction planes, axes and points: `construct.*`) | tool coverage rig || `inspect` (the inspect commands that return numbers) | tool coverage rig || `history` (the timeline's suppress, reorder, delete, roll back, edit and folders; configuration rows, columns and rules; parameters that drive geometry) | tool coverage rig |+| `assemblies` (joints and couplings, motion studies, contact, components and occurrences, interference and clearance between placed parts: placements and answers worked out by hand) | rig coverage |Each area also has its gate files: `KNOWN_FAILING` and `PATHS` (see [the gate](#the-kernel-rig-gate)).diff --git a/tests/kernel-cases/assemblies/KNOWN_FAILING b/tests/kernel-cases/assemblies/KNOWN_FAILINGnew file mode 100644index 0000000000..b9e904251e--- /dev/null+++ b/tests/kernel-cases/assemblies/KNOWN_FAILING@@ -0,0 +1,4 @@+# The assemblies cases that fail today, one a line: `<case> <why it fails today>`. Sorted. A gate+# 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: rig-cases-assemblies 45f69c0e5 with SMLib 60b1c6a, aarch64 Linux. None fail today.diff --git a/tests/kernel-cases/assemblies/PATHS b/tests/kernel-cases/assemblies/PATHSnew file mode 100644index 0000000000..c4d4c73b59--- /dev/null+++ b/tests/kernel-cases/assemblies/PATHS@@ -0,0 +1,28 @@+# Source files whose change must rerun the assemblies cases (one git pathspec glob a line).+# Joints, couplings, cams, reach and the solver.+crates/doc/src/joints*.rs+crates/doc/src/assembly.rs+crates/engine/src/cmd/joints.rs+crates/engine/src/cmd/joints_inspect.rs+# Motion studies, plots, traces, interference, sweeps, contact and exploded views.+crates/doc/src/motion.rs+crates/engine/src/cmd/motion.rs+crates/engine/src/cmd/motion_analysis.rs+crates/engine/src/cmd/motion_sweep.rs+crates/engine/src/cmd/motion_trace.rs+crates/engine/src/cmd/contact_sweep.rs+# Components and occurrences (their placement in the world is crates/doc/src/eval.rs: shared core).+crates/engine/src/cmd/component.rs+crates/engine/src/cmd/component_clone.rs+crates/engine/src/cmd/component_clone_assembly.rs+crates/engine/src/cmd/component_drag.rs+crates/engine/src/cmd/component_extract.rs+crates/engine/src/cmd/component_link.rs+crates/engine/src/cmd/component_properties.rs+crates/engine/src/cmd/component_reparent.rs+crates/engine/src/cmd/component_transfer.rs+# Interference and clearance between placed bodies.+crates/engine/src/cmd/clearance.rs+crates/engine/src/cmd/interference.rs+# The cases themselves.+tests/kernel-cases/assemblies/**diff --git a/tests/kernel-cases/history/cov-parameters-cyclic-expression-refused/expected.json b/tests/kernel-cases/history/cov-parameters-cyclic-expression-refused/expected.jsonnew file mode 100644index 0000000000..9fff847ea7--- /dev/null+++ b/tests/kernel-cases/history/cov-parameters-cyclic-expression-refused/expected.json@@ -0,0 +1,8 @@+{+ "sources": [],+ "what": "parameters.change that makes two parameters depend on each other",+ "source": "invariants",+ "method": "A = B - 5 with B = A + 5 has no value: refused",+ "outcome": "refused",+ "refusal": "circular reference"+}diff --git a/tests/kernel-cases/history/cov-parameters-cyclic-expression-refused/recipe.json b/tests/kernel-cases/history/cov-parameters-cyclic-expression-refused/recipe.jsonnew file mode 100644index 0000000000..8a833e4a2f--- /dev/null+++ b/tests/kernel-cases/history/cov-parameters-cyclic-expression-refused/recipe.json@@ -0,0 +1,35 @@+{+ "commands": [+ {+ "command": "parameters.add",+ "params": {+ "name": "A",+ "expression": "10 mm",+ "unit": "mm"+ }+ },+ {+ "command": "parameters.add",+ "params": {+ "name": "B",+ "expression": "A + 5 mm",+ "unit": "mm"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": "B",+ "width": 10,+ "height": 10+ }+ },+ {+ "command": "parameters.change",+ "params": {+ "name": "A",+ "expression": "B - 5 mm"+ }+ }+ ]+}diff --git a/tests/kernel-cases/history/cov-parameters-expression-drives-a-dimension/expected.json b/tests/kernel-cases/history/cov-parameters-expression-drives-a-dimension/expected.jsonnew file mode 100644index 0000000000..762264604f--- /dev/null+++ b/tests/kernel-cases/history/cov-parameters-expression-drives-a-dimension/expected.json@@ -0,0 +1,10 @@+{+ "sources": [],+ "what": "sketch dimensions 2 W and W / 2: changing W rebuilds the plate",+ "method": "W = 30: a 60x15 rectangle extruded 10: V = 9000, A = 2 (900 + 600 + 150) = 3300; 6 faces",+ "body_count": 1,+ "volume_mm3": 9000.0,+ "area_mm2": 3300.0,+ "faces": 6,+ "source": "analytic"+}diff --git a/tests/kernel-cases/history/cov-parameters-expression-drives-a-dimension/recipe.json b/tests/kernel-cases/history/cov-parameters-expression-drives-a-dimension/recipe.jsonnew file mode 100644index 0000000000..7a6d7d5dcd--- /dev/null+++ b/tests/kernel-cases/history/cov-parameters-expression-drives-a-dimension/recipe.json@@ -0,0 +1,72 @@+{+ "commands": [+ {+ "command": "parameters.add",+ "params": {+ "name": "W",+ "expression": "20 mm",+ "unit": "mm"+ }+ },+ {+ "command": "sketch.create",+ "params": {+ "plane": "XY",+ "name": "S"+ }+ },+ {+ "command": "sketch.rectangle.two_point",+ "params": {+ "p0": [+ 0,+ 0+ ],+ "p1": [+ 40,+ 10+ ]+ }+ },+ {+ "command": "sketch.dimension",+ "params": {+ "entities": [+ "l1"+ ],+ "type": "length",+ "value": "2 * W"+ }+ },+ {+ "command": "sketch.dimension",+ "params": {+ "entities": [+ "l4"+ ],+ "type": "length",+ "value": "W / 2"+ }+ },+ {+ "command": "sketch.finish",+ "params": {}+ },+ {+ "command": "solid.extrude",+ "params": {+ "sketch": "S",+ "distance": 10,+ "operation": "new",+ "body_name": "Plate"+ }+ },+ {+ "command": "parameters.change",+ "params": {+ "name": "W",+ "expression": "30 mm"+ }+ }+ ]+}