SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 381/509: Kernel rig: motion studies play, plot and trace to known values; a crank-slider's slider follows r cos t + sqrt(l^2 - r^2 sin^2 t)
jyviko27a0383e1c7d
diff --git a/tests/kernel-cases/assemblies/cov-motion-crank-slider-drive-at-90/expected.json b/tests/kernel-cases/assemblies/cov-motion-crank-slider-drive-at-90/expected.jsonnew file mode 100644index 0000000000..36fd366c78--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-crank-slider-drive-at-90/expected.json@@ -0,0 +1,40 @@+{+ "sources": [],+ "what": "a crank-slider driven to 90 degrees",+ "source": "analytic",+ "method": "a crank-slider: crank r 10 about z through the origin, rod l 30 from the crank pin (10,0) to the slider's pin (40,0), slider on +x; the slider sits at x = r cos \u03b8 + \u221a(l\u00b2 - r\u00b2 sin\u00b2 \u03b8); at 90: x = \u221a(900 - 100) = 28.28427; the rod's middle is halfway between (0,10) and (x,0), at z 3",+ "body_count": 4,+ "volume_mm3": 2720,+ "results": [+ {+ "step": 17,+ "json": {+ "conflicts": []+ }+ },+ {+ "step": 19,+ "json": {+ "total": {+ "center_of_mass": [+ 28.284271,+ 0.0,+ 5.0+ ]+ }+ }+ },+ {+ "step": 20,+ "json": {+ "total": {+ "center_of_mass": [+ 14.142136,+ 5.0,+ 3.0+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-crank-slider-drive-at-90/recipe.json b/tests/kernel-cases/assemblies/cov-motion-crank-slider-drive-at-90/recipe.jsonnew file mode 100644index 0000000000..d6b495a615--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-crank-slider-drive-at-90/recipe.json@@ -0,0 +1,299 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 60,+ "width": 20,+ "height": 2,+ "corner": [+ -10,+ -10,+ -12+ ],+ "operation": "new",+ "body_name": "BedBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 14,+ "width": 4,+ "height": 2,+ "corner": [+ -2,+ -2,+ 0+ ],+ "operation": "new",+ "body_name": "CrankBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 34,+ "width": 2,+ "height": 2,+ "corner": [+ 8,+ -1,+ 2+ ],+ "operation": "new",+ "body_name": "RodBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 6,+ "width": 6,+ "height": 2,+ "corner": [+ 37,+ -3,+ 4+ ],+ "operation": "new",+ "body_name": "SliderBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Bed",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BedBox"+ ],+ "component": "Bed"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Crank",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "CrankBox"+ ],+ "component": "Crank"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Rod",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "RodBox"+ ],+ "component": "Rod"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Slider",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "SliderBox"+ ],+ "component": "Slider"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Bed:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Crank pin",+ "flip": true,+ "a": {+ "occurrence": "Bed",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Crank",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Big end",+ "flip": true,+ "a": {+ "occurrence": "Crank",+ "point": [+ 10,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Rod",+ "point": [+ 10,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "slider",+ "name": "Guide",+ "flip": true,+ "a": {+ "occurrence": "Bed",+ "point": [+ 40,+ 0,+ 5+ ],+ "z": [+ 1,+ 0,+ 0+ ]+ },+ "b": {+ "occurrence": "Slider",+ "point": [+ 40,+ 0,+ 5+ ],+ "z": [+ 1,+ 0,+ 0+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Small end",+ "flip": true,+ "a": {+ "occurrence": "Rod",+ "point": [+ 40,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Slider",+ "point": [+ 40,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.drive",+ "params": {+ "joint": "Crank pin",+ "value": 90,+ "quiet": true+ }+ },+ {+ "command": "occurrence.properties",+ "params": {+ "occurrence": "Slider:1"+ }+ },+ {+ "command": "occurrence.properties",+ "params": {+ "occurrence": "Rod:1"+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-crank-slider-follows-the-formula/expected.json b/tests/kernel-cases/assemblies/cov-motion-crank-slider-follows-the-formula/expected.jsonnew file mode 100644index 0000000000..96232156b8--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-crank-slider-follows-the-formula/expected.json@@ -0,0 +1,111 @@+{+ "sources": [],+ "what": "motion.plot of a crank-slider's slider over a full turn of the crank, every 30 degrees",+ "source": "analytic",+ "method": "a crank-slider: crank r 10 about z through the origin, rod l 30 from the crank pin (10,0) to the slider's pin (40,0), slider on +x; the slider sits at x = r cos \u03b8 + \u221a(l\u00b2 - r\u00b2 sin\u00b2 \u03b8); the guide's value is x - 40",+ "body_count": 4,+ "volume_mm3": 2720,+ "results": [+ {+ "step": 17,+ "json": {+ "conflicts": []+ }+ },+ {+ "step": 19,+ "json": {+ "samples": 13,+ "stopped_at": null,+ "joints": [+ {+ "value": [+ 0.0,+ -1.759347,+ -6.277187,+ -11.715729,+ -16.277187,+ -19.079855,+ -20.0,+ -19.079855,+ -16.277187,+ -11.715729,+ -6.277187,+ -1.759347,+ 0.0+ ]+ }+ ],+ "point": {+ "position": [+ [+ 40.0,+ 0.0,+ 5.0+ ],+ [+ 38.240653,+ 0.0,+ 5.0+ ],+ [+ 33.722813,+ 0.0,+ 5.0+ ],+ [+ 28.284271,+ 0.0,+ 5.0+ ],+ [+ 23.722813,+ 0.0,+ 5.0+ ],+ [+ 20.920145,+ 0.0,+ 5.0+ ],+ [+ 20.0,+ 0.0,+ 5.0+ ],+ [+ 20.920145,+ 0.0,+ 5.0+ ],+ [+ 23.722813,+ 0.0,+ 5.0+ ],+ [+ 28.284271,+ 0.0,+ 5.0+ ],+ [+ 33.722813,+ 0.0,+ 5.0+ ],+ [+ 38.240653,+ 0.0,+ 5.0+ ],+ [+ 40.0,+ 0.0,+ 5.0+ ]+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-crank-slider-follows-the-formula/recipe.json b/tests/kernel-cases/assemblies/cov-motion-crank-slider-follows-the-formula/recipe.jsonnew file mode 100644index 0000000000..559ca54f64--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-crank-slider-follows-the-formula/recipe.json@@ -0,0 +1,316 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 60,+ "width": 20,+ "height": 2,+ "corner": [+ -10,+ -10,+ -12+ ],+ "operation": "new",+ "body_name": "BedBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 14,+ "width": 4,+ "height": 2,+ "corner": [+ -2,+ -2,+ 0+ ],+ "operation": "new",+ "body_name": "CrankBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 34,+ "width": 2,+ "height": 2,+ "corner": [+ 8,+ -1,+ 2+ ],+ "operation": "new",+ "body_name": "RodBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 6,+ "width": 6,+ "height": 2,+ "corner": [+ 37,+ -3,+ 4+ ],+ "operation": "new",+ "body_name": "SliderBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Bed",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BedBox"+ ],+ "component": "Bed"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Crank",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "CrankBox"+ ],+ "component": "Crank"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Rod",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "RodBox"+ ],+ "component": "Rod"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Slider",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "SliderBox"+ ],+ "component": "Slider"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Bed:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Crank pin",+ "flip": true,+ "a": {+ "occurrence": "Bed",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Crank",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Big end",+ "flip": true,+ "a": {+ "occurrence": "Crank",+ "point": [+ 10,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Rod",+ "point": [+ 10,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "slider",+ "name": "Guide",+ "flip": true,+ "a": {+ "occurrence": "Bed",+ "point": [+ 40,+ 0,+ 5+ ],+ "z": [+ 1,+ 0,+ 0+ ]+ },+ "b": {+ "occurrence": "Slider",+ "point": [+ 40,+ 0,+ 5+ ],+ "z": [+ 1,+ 0,+ 0+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Small end",+ "flip": true,+ "a": {+ "occurrence": "Rod",+ "point": [+ 40,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Slider",+ "point": [+ 40,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.study",+ "params": {+ "name": "Turn",+ "steps": 12,+ "keys": [+ {+ "joint": "Crank pin",+ "points": [+ [+ 0,+ 0+ ],+ [+ 12,+ 360+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.plot",+ "params": {+ "study": "Turn",+ "joints": [+ "Guide"+ ],+ "occurrence": "Slider",+ "point": [+ 40,+ 0,+ 5+ ]+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-crank-slider-play-at-60/expected.json b/tests/kernel-cases/assemblies/cov-motion-crank-slider-play-at-60/expected.jsonnew file mode 100644index 0000000000..cc69e76a75--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-crank-slider-play-at-60/expected.json@@ -0,0 +1,34 @@+{+ "sources": [],+ "what": "a crank-slider study played where the crank is at 60 degrees",+ "source": "analytic",+ "method": "a crank-slider: crank r 10 about z through the origin, rod l 30 from the crank pin (10,0) to the slider's pin (40,0), slider on +x; the slider sits at x = r cos \u03b8 + \u221a(l\u00b2 - r\u00b2 sin\u00b2 \u03b8); at 60: x = 5 + \u221a(900 - 75) = 33.72281; the slider block's centre (x, 0, 5), the guide's value x - 40",+ "body_count": 4,+ "volume_mm3": 2720,+ "results": [+ {+ "step": 17,+ "json": {+ "conflicts": []+ }+ },+ {+ "step": 20,+ "json": {+ "total": {+ "center_of_mass": [+ 33.722813,+ 0.0,+ 5.0+ ]+ }+ }+ },+ {+ "step": 21,+ "json": {+ "conflicts": []+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-crank-slider-play-at-60/recipe.json b/tests/kernel-cases/assemblies/cov-motion-crank-slider-play-at-60/recipe.jsonnew file mode 100644index 0000000000..972d2b1e4c--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-crank-slider-play-at-60/recipe.json@@ -0,0 +1,319 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 60,+ "width": 20,+ "height": 2,+ "corner": [+ -10,+ -10,+ -12+ ],+ "operation": "new",+ "body_name": "BedBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 14,+ "width": 4,+ "height": 2,+ "corner": [+ -2,+ -2,+ 0+ ],+ "operation": "new",+ "body_name": "CrankBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 34,+ "width": 2,+ "height": 2,+ "corner": [+ 8,+ -1,+ 2+ ],+ "operation": "new",+ "body_name": "RodBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 6,+ "width": 6,+ "height": 2,+ "corner": [+ 37,+ -3,+ 4+ ],+ "operation": "new",+ "body_name": "SliderBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Bed",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BedBox"+ ],+ "component": "Bed"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Crank",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "CrankBox"+ ],+ "component": "Crank"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Rod",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "RodBox"+ ],+ "component": "Rod"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Slider",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "SliderBox"+ ],+ "component": "Slider"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Bed:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Crank pin",+ "flip": true,+ "a": {+ "occurrence": "Bed",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Crank",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Big end",+ "flip": true,+ "a": {+ "occurrence": "Crank",+ "point": [+ 10,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Rod",+ "point": [+ 10,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "slider",+ "name": "Guide",+ "flip": true,+ "a": {+ "occurrence": "Bed",+ "point": [+ 40,+ 0,+ 5+ ],+ "z": [+ 1,+ 0,+ 0+ ]+ },+ "b": {+ "occurrence": "Slider",+ "point": [+ 40,+ 0,+ 5+ ],+ "z": [+ 1,+ 0,+ 0+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Small end",+ "flip": true,+ "a": {+ "occurrence": "Rod",+ "point": [+ 40,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Slider",+ "point": [+ 40,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.study",+ "params": {+ "name": "Turn",+ "steps": 6,+ "keys": [+ {+ "joint": "Crank pin",+ "points": [+ [+ 0,+ 0+ ],+ [+ 6,+ 360+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.play",+ "params": {+ "study": "Turn",+ "step": 1,+ "quiet": true+ }+ },+ {+ "command": "occurrence.properties",+ "params": {+ "occurrence": "Slider:1"+ }+ },+ {+ "command": "joint.list",+ "params": {}+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-interference-arm-into-the-block/expected.json b/tests/kernel-cases/assemblies/cov-motion-interference-arm-into-the-block/expected.jsonnew file mode 100644index 0000000000..00cfedb7e4--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-interference-arm-into-the-block/expected.json@@ -0,0 +1,43 @@+{+ "sources": [],+ "what": "motion.interference of the arm turning 0 to 90 in 9 steps into a grounded block",+ "source": "analytic",+ "method": "Base: box 20x20x10 from (-10,-10,-10), grounded; Arm: box 40x10x10 from (0,-5,0), centre (20,0,5); Stop: box 50x10x10 from (-10,30,0), grounded; the arm's corner (40,5) turned \u03b8 reaches y = 40 sin \u03b8 + 5 cos \u03b8, which is 30 at \u03b8 = asin(30/\u221a1625) - atan(5/40) = 40.9676; samples every 10 degrees: clear at 40, overlapping from step 5 (50) to 9 (90); at 90 the arm (x -5..5, y 0..40) and block (x -10..40, y 30..40) share 10x10x10 = 1000 mm3",+ "body_count": 3,+ "volume_mm3": 13000.0,+ "results": [+ {+ "step": 14,+ "json": {+ "clear": false,+ "samples": 10,+ "collisions": [+ {+ "first_step": 5.0,+ "last_step": 9.0,+ "steps": [+ [+ 5.0,+ 9.0+ ]+ ],+ "deepest_step": 9.0,+ "volume_mm3": 1000.0+ }+ ]+ }+ },+ {+ "step": 15,+ "json": {+ "total": {+ "center_of_mass": [+ 20.0,+ 0.0,+ 5.0+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-interference-arm-into-the-block/recipe.json b/tests/kernel-cases/assemblies/cov-motion-interference-arm-into-the-block/recipe.jsonnew file mode 100644index 0000000000..cb5b6bbd86--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-interference-arm-into-the-block/recipe.json@@ -0,0 +1,189 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 20,+ "height": 10,+ "corner": [+ -10,+ -10,+ -10+ ],+ "operation": "new",+ "body_name": "BaseBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 10,+ "height": 10,+ "corner": [+ 0,+ -5,+ 0+ ],+ "operation": "new",+ "body_name": "ArmBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Base",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BaseBox"+ ],+ "component": "Base"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Arm",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "ArmBox"+ ],+ "component": "Arm"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Base:1",+ "grounded": true+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 50,+ "width": 10,+ "height": 10,+ "corner": [+ -10,+ 30,+ 0+ ],+ "operation": "new",+ "body_name": "StopBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Stop",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "StopBox"+ ],+ "component": "Stop"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Stop:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Hinge",+ "flip": true,+ "a": {+ "occurrence": "Base",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Arm",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.study",+ "params": {+ "name": "Open",+ "steps": 9,+ "keys": [+ {+ "joint": "Hinge",+ "points": [+ [+ 0,+ 0+ ],+ [+ 9,+ 90+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.interference",+ "params": {+ "study": "Open",+ "occurrences": [+ "Arm"+ ],+ "against": [+ "Stop"+ ]+ }+ },+ {+ "command": "occurrence.properties",+ "params": {+ "occurrence": "Arm:1"+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-interference-clear/expected.json b/tests/kernel-cases/assemblies/cov-motion-interference-clear/expected.jsonnew file mode 100644index 0000000000..a6358e43b9--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-interference-clear/expected.json@@ -0,0 +1,17 @@+{+ "sources": [],+ "what": "motion.interference of the arm turning 0 to 30, short of the block",+ "source": "analytic",+ "method": "Base: box 20x20x10 from (-10,-10,-10), grounded; Arm: box 40x10x10 from (0,-5,0), centre (20,0,5); Stop: box 50x10x10 from (-10,30,0), grounded; the arm's corner (40,5) turned \u03b8 reaches y = 40 sin \u03b8 + 5 cos \u03b8, which is 30 at \u03b8 = asin(30/\u221a1625) - atan(5/40) = 40.9676; 30 < 40.97: no collisions",+ "body_count": 3,+ "volume_mm3": 13000.0,+ "results": [+ {+ "step": 14,+ "json": {+ "clear": true,+ "collisions": []+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-interference-clear/recipe.json b/tests/kernel-cases/assemblies/cov-motion-interference-clear/recipe.jsonnew file mode 100644index 0000000000..ca19b2c777--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-interference-clear/recipe.json@@ -0,0 +1,183 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 20,+ "height": 10,+ "corner": [+ -10,+ -10,+ -10+ ],+ "operation": "new",+ "body_name": "BaseBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 10,+ "height": 10,+ "corner": [+ 0,+ -5,+ 0+ ],+ "operation": "new",+ "body_name": "ArmBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Base",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BaseBox"+ ],+ "component": "Base"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Arm",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "ArmBox"+ ],+ "component": "Arm"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Base:1",+ "grounded": true+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 50,+ "width": 10,+ "height": 10,+ "corner": [+ -10,+ 30,+ 0+ ],+ "operation": "new",+ "body_name": "StopBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Stop",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "StopBox"+ ],+ "component": "Stop"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Stop:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Hinge",+ "flip": true,+ "a": {+ "occurrence": "Base",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Arm",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.study",+ "params": {+ "name": "Open",+ "steps": 3,+ "keys": [+ {+ "joint": "Hinge",+ "points": [+ [+ 0,+ 0+ ],+ [+ 3,+ 30+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.interference",+ "params": {+ "study": "Open",+ "occurrences": [+ "Arm"+ ],+ "against": [+ "Stop"+ ]+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-play-fractional-step/expected.json b/tests/kernel-cases/assemblies/cov-motion-play-fractional-step/expected.jsonnew file mode 100644index 0000000000..c5eef57659--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-play-fractional-step/expected.json@@ -0,0 +1,22 @@+{+ "sources": [],+ "what": "the same study played at step 2.5",+ "source": "analytic",+ "method": "Base: box 20x20x10 from (-10,-10,-10), grounded; Arm: box 40x10x10 from (0,-5,0), centre (20,0,5); step 2.5 of 10 is 22.5 degrees: Arm centre (20 cos22.5, 20 sin22.5, 5)",+ "body_count": 2,+ "volume_mm3": 8000.0,+ "results": [+ {+ "step": 11,+ "json": {+ "total": {+ "center_of_mass": [+ 18.477591,+ 7.653669,+ 5.0+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-play-fractional-step/recipe.json b/tests/kernel-cases/assemblies/cov-motion-play-fractional-step/recipe.jsonnew file mode 100644index 0000000000..e68dae133e--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-play-fractional-step/recipe.json@@ -0,0 +1,146 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 20,+ "height": 10,+ "corner": [+ -10,+ -10,+ -10+ ],+ "operation": "new",+ "body_name": "BaseBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 10,+ "height": 10,+ "corner": [+ 0,+ -5,+ 0+ ],+ "operation": "new",+ "body_name": "ArmBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Base",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BaseBox"+ ],+ "component": "Base"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Arm",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "ArmBox"+ ],+ "component": "Arm"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Base:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Hinge",+ "flip": true,+ "a": {+ "occurrence": "Base",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Arm",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.study",+ "params": {+ "name": "Open",+ "steps": 10,+ "keys": [+ {+ "joint": "Hinge",+ "points": [+ [+ 0,+ 0+ ],+ [+ 10,+ 90+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.play",+ "params": {+ "study": "Open",+ "step": 2.5,+ "quiet": true+ }+ },+ {+ "command": "occurrence.properties",+ "params": {+ "occurrence": "Arm:1"+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-play-half-way/expected.json b/tests/kernel-cases/assemblies/cov-motion-play-half-way/expected.jsonnew file mode 100644index 0000000000..4c82bce749--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-play-half-way/expected.json@@ -0,0 +1,28 @@+{+ "sources": [],+ "what": "a study turning the hinge 0 to 90 over 10 steps, played at step 5",+ "source": "analytic",+ "method": "Base: box 20x20x10 from (-10,-10,-10), grounded; Arm: box 40x10x10 from (0,-5,0), centre (20,0,5); linear between keys: step 5 is 45 degrees: Arm centre (20 cos45, 20 sin45, 5)",+ "body_count": 2,+ "volume_mm3": 8000.0,+ "results": [+ {+ "step": 10,+ "json": {+ "moved": true+ }+ },+ {+ "step": 11,+ "json": {+ "total": {+ "center_of_mass": [+ 14.142136,+ 14.142136,+ 5.0+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-play-half-way/recipe.json b/tests/kernel-cases/assemblies/cov-motion-play-half-way/recipe.jsonnew file mode 100644index 0000000000..d2a2c66b3b--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-play-half-way/recipe.json@@ -0,0 +1,146 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 20,+ "height": 10,+ "corner": [+ -10,+ -10,+ -10+ ],+ "operation": "new",+ "body_name": "BaseBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 10,+ "height": 10,+ "corner": [+ 0,+ -5,+ 0+ ],+ "operation": "new",+ "body_name": "ArmBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Base",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BaseBox"+ ],+ "component": "Base"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Arm",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "ArmBox"+ ],+ "component": "Arm"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Base:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Hinge",+ "flip": true,+ "a": {+ "occurrence": "Base",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Arm",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.study",+ "params": {+ "name": "Open",+ "steps": 10,+ "keys": [+ {+ "joint": "Hinge",+ "points": [+ [+ 0,+ 0+ ],+ [+ 10,+ 90+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.play",+ "params": {+ "study": "Open",+ "step": 5,+ "quiet": true+ }+ },+ {+ "command": "occurrence.properties",+ "params": {+ "occurrence": "Arm:1"+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-plot-linear-ramp/expected.json b/tests/kernel-cases/assemblies/cov-motion-plot-linear-ramp/expected.jsonnew file mode 100644index 0000000000..1e7b316ae7--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-plot-linear-ramp/expected.json@@ -0,0 +1,71 @@+{+ "sources": [],+ "what": "motion.plot of a hinge keyed 0 to 90 over 10 steps, played in 1 s",+ "source": "analytic",+ "method": "Base: box 20x20x10 from (-10,-10,-10), grounded; Arm: box 40x10x10 from (0,-5,0), centre (20,0,5); 11 samples, 9 degrees apart; with duration 1 s the rate is 90 deg/s throughout and the acceleration 0",+ "body_count": 2,+ "volume_mm3": 8000.0,+ "results": [+ {+ "step": 10,+ "json": {+ "samples": 11,+ "joints": [+ {+ "value": [+ 0.0,+ 9.0,+ 18.0,+ 27.0,+ 36.0,+ 45.0,+ 54.0,+ 63.0,+ 72.0,+ 81.0,+ 90.0+ ],+ "velocity": [+ 90.0,+ 90.0,+ 90.0,+ 90.0,+ 90.0,+ 90.0,+ 90.0,+ 90.0,+ 90.0,+ 90.0,+ 90.0+ ],+ "acceleration": [+ 0.0,+ 0.0,+ 0.0,+ 0.0,+ 0.0,+ 0.0,+ 0.0,+ 0.0,+ 0.0,+ 0.0,+ 0.0+ ]+ }+ ]+ }+ },+ {+ "step": 11,+ "json": {+ "total": {+ "center_of_mass": [+ 20.0,+ 0.0,+ 5.0+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-plot-linear-ramp/recipe.json b/tests/kernel-cases/assemblies/cov-motion-plot-linear-ramp/recipe.jsonnew file mode 100644index 0000000000..da992cbc8c--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-plot-linear-ramp/recipe.json@@ -0,0 +1,148 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 20,+ "height": 10,+ "corner": [+ -10,+ -10,+ -10+ ],+ "operation": "new",+ "body_name": "BaseBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 10,+ "height": 10,+ "corner": [+ 0,+ -5,+ 0+ ],+ "operation": "new",+ "body_name": "ArmBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Base",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BaseBox"+ ],+ "component": "Base"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Arm",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "ArmBox"+ ],+ "component": "Arm"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Base:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Hinge",+ "flip": true,+ "a": {+ "occurrence": "Base",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Arm",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.study",+ "params": {+ "name": "Open",+ "steps": 10,+ "keys": [+ {+ "joint": "Hinge",+ "points": [+ [+ 0,+ 0+ ],+ [+ 10,+ 90+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.plot",+ "params": {+ "study": "Open",+ "joints": [+ "Hinge"+ ],+ "duration": 1+ }+ },+ {+ "command": "occurrence.properties",+ "params": {+ "occurrence": "Arm:1"+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-plot-point-on-the-arm/expected.json b/tests/kernel-cases/assemblies/cov-motion-plot-point-on-the-arm/expected.jsonnew file mode 100644index 0000000000..afc5a90b63--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-plot-point-on-the-arm/expected.json@@ -0,0 +1,34 @@+{+ "sources": [],+ "what": "motion.plot following the arm's tip (40,0,5) over the study, 3 samples",+ "source": "analytic",+ "method": "Base: box 20x20x10 from (-10,-10,-10), grounded; Arm: box 40x10x10 from (0,-5,0), centre (20,0,5); the tip turns at radius 40: at 0, 45 and 90 degrees it is at (40,0,5), (40 cos45, 40 sin45, 5), (0,40,5)",+ "body_count": 2,+ "volume_mm3": 8000.0,+ "results": [+ {+ "step": 10,+ "json": {+ "point": {+ "position": [+ [+ 40.0,+ 0.0,+ 5.0+ ],+ [+ 28.284271,+ 28.284271,+ 5.0+ ],+ [+ 0.0,+ 40.0,+ 5.0+ ]+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-plot-point-on-the-arm/recipe.json b/tests/kernel-cases/assemblies/cov-motion-plot-point-on-the-arm/recipe.jsonnew file mode 100644index 0000000000..edb3f9ffd0--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-plot-point-on-the-arm/recipe.json@@ -0,0 +1,148 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 20,+ "height": 10,+ "corner": [+ -10,+ -10,+ -10+ ],+ "operation": "new",+ "body_name": "BaseBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 10,+ "height": 10,+ "corner": [+ 0,+ -5,+ 0+ ],+ "operation": "new",+ "body_name": "ArmBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Base",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BaseBox"+ ],+ "component": "Base"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Arm",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "ArmBox"+ ],+ "component": "Arm"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Base:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Hinge",+ "flip": true,+ "a": {+ "occurrence": "Base",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Arm",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.study",+ "params": {+ "name": "Open",+ "steps": 10,+ "keys": [+ {+ "joint": "Hinge",+ "points": [+ [+ 0,+ 0+ ],+ [+ 10,+ 90+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.plot",+ "params": {+ "study": "Open",+ "joints": [+ "Hinge"+ ],+ "occurrence": "Arm",+ "point": [+ 40,+ 0,+ 5+ ],+ "samples": 3+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-study-edit-replaces-the-keys/expected.json b/tests/kernel-cases/assemblies/cov-motion-study-edit-replaces-the-keys/expected.jsonnew file mode 100644index 0000000000..d45dfa0511--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-study-edit-replaces-the-keys/expected.json@@ -0,0 +1,22 @@+{+ "sources": [],+ "what": "motion.study editing a study's keys to turn the hinge 0 to -90",+ "source": "analytic",+ "method": "Base: box 20x20x10 from (-10,-10,-10), grounded; Arm: box 40x10x10 from (0,-5,0), centre (20,0,5); keys given replace all keys: step 5 of 10 is now -45 degrees: Arm centre (20 cos45, -20 sin45, 5)",+ "body_count": 2,+ "volume_mm3": 8000.0,+ "results": [+ {+ "step": 12,+ "json": {+ "total": {+ "center_of_mass": [+ 14.142136,+ -14.142136,+ 5.0+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-study-edit-replaces-the-keys/recipe.json b/tests/kernel-cases/assemblies/cov-motion-study-edit-replaces-the-keys/recipe.jsonnew file mode 100644index 0000000000..3638f0a60e--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-study-edit-replaces-the-keys/recipe.json@@ -0,0 +1,167 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 20,+ "height": 10,+ "corner": [+ -10,+ -10,+ -10+ ],+ "operation": "new",+ "body_name": "BaseBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 10,+ "height": 10,+ "corner": [+ 0,+ -5,+ 0+ ],+ "operation": "new",+ "body_name": "ArmBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Base",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BaseBox"+ ],+ "component": "Base"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Arm",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "ArmBox"+ ],+ "component": "Arm"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Base:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Hinge",+ "flip": true,+ "a": {+ "occurrence": "Base",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Arm",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.study",+ "params": {+ "name": "Open",+ "steps": 10,+ "keys": [+ {+ "joint": "Hinge",+ "points": [+ [+ 0,+ 0+ ],+ [+ 10,+ 90+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.study",+ "params": {+ "study": "Open",+ "keys": [+ {+ "joint": "Hinge",+ "points": [+ [+ 0,+ 0+ ],+ [+ 10,+ -90+ ]+ ]+ }+ ]+ }+ },+ {+ "command": "motion.play",+ "params": {+ "study": "Open",+ "step": 5,+ "quiet": true+ }+ },+ {+ "command": "occurrence.properties",+ "params": {+ "occurrence": "Arm:1"+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-trace-arm-tip/expected.json b/tests/kernel-cases/assemblies/cov-motion-trace-arm-tip/expected.jsonnew file mode 100644index 0000000000..aa0291c9b8--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-trace-arm-tip/expected.json@@ -0,0 +1,46 @@+{+ "sources": [],+ "what": "motion.trace of the arm's tip as the hinge turns 0 to 90, 3 samples",+ "source": "analytic",+ "method": "Base: box 20x20x10 from (-10,-10,-10), grounded; Arm: box 40x10x10 from (0,-5,0), centre (20,0,5); radius 40 about z: (40,0,5), (40 cos45, 40 sin45, 5), (0,40,5); the design is not changed",+ "body_count": 2,+ "volume_mm3": 8000.0,+ "results": [+ {+ "step": 9,+ "json": {+ "samples": 3,+ "stopped_at": null,+ "points": [+ [+ 40.0,+ 0.0,+ 5.0+ ],+ [+ 28.284271,+ 28.284271,+ 5.0+ ],+ [+ 0.0,+ 40.0,+ 5.0+ ]+ ]+ }+ },+ {+ "step": 10,+ "json": {+ "total": {+ "center_of_mass": [+ 20.0,+ 0.0,+ 5.0+ ]+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-trace-arm-tip/recipe.json b/tests/kernel-cases/assemblies/cov-motion-trace-arm-tip/recipe.jsonnew file mode 100644index 0000000000..52014a1e8b--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-trace-arm-tip/recipe.json@@ -0,0 +1,131 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 20,+ "height": 10,+ "corner": [+ -10,+ -10,+ -10+ ],+ "operation": "new",+ "body_name": "BaseBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 10,+ "height": 10,+ "corner": [+ 0,+ -5,+ 0+ ],+ "operation": "new",+ "body_name": "ArmBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Base",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BaseBox"+ ],+ "component": "Base"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Arm",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "ArmBox"+ ],+ "component": "Arm"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Base:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Hinge",+ "flip": true,+ "a": {+ "occurrence": "Base",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Arm",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.trace",+ "params": {+ "occurrence": "Arm",+ "point": [+ 40,+ 0,+ 5+ ],+ "joint": "Hinge",+ "samples": 3,+ "from": 0,+ "to": 90+ }+ },+ {+ "command": "occurrence.properties",+ "params": {+ "occurrence": "Arm:1"+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-trace-coupler-midpoint/expected.json b/tests/kernel-cases/assemblies/cov-motion-trace-coupler-midpoint/expected.jsonnew file mode 100644index 0000000000..7075bbf24f--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-trace-coupler-midpoint/expected.json@@ -0,0 +1,38 @@+{+ "sources": [],+ "what": "motion.trace of a crank-slider rod's middle over half a turn, 3 samples",+ "source": "analytic",+ "method": "a crank-slider: crank r 10 about z through the origin, rod l 30 from the crank pin (10,0) to the slider's pin (40,0), slider on +x; the slider sits at x = r cos \u03b8 + \u221a(l\u00b2 - r\u00b2 sin\u00b2 \u03b8); the rod's middle is ((10 cos \u03b8 + x)/2, 5 sin \u03b8, 3): \u03b8 0 (25,0,3), 90 (14.14214,5,3), 180 (5,0,3)",+ "body_count": 4,+ "volume_mm3": 2720,+ "results": [+ {+ "step": 17,+ "json": {+ "conflicts": []+ }+ },+ {+ "step": 18,+ "json": {+ "points": [+ [+ 25.0,+ 0.0,+ 3.0+ ],+ [+ 14.142136,+ 5.0,+ 3.0+ ],+ [+ 5.0,+ 0.0,+ 3.0+ ]+ ]+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-trace-coupler-midpoint/recipe.json b/tests/kernel-cases/assemblies/cov-motion-trace-coupler-midpoint/recipe.jsonnew file mode 100644index 0000000000..23039f75ca--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-trace-coupler-midpoint/recipe.json@@ -0,0 +1,294 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 60,+ "width": 20,+ "height": 2,+ "corner": [+ -10,+ -10,+ -12+ ],+ "operation": "new",+ "body_name": "BedBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 14,+ "width": 4,+ "height": 2,+ "corner": [+ -2,+ -2,+ 0+ ],+ "operation": "new",+ "body_name": "CrankBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 34,+ "width": 2,+ "height": 2,+ "corner": [+ 8,+ -1,+ 2+ ],+ "operation": "new",+ "body_name": "RodBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 6,+ "width": 6,+ "height": 2,+ "corner": [+ 37,+ -3,+ 4+ ],+ "operation": "new",+ "body_name": "SliderBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Bed",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BedBox"+ ],+ "component": "Bed"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Crank",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "CrankBox"+ ],+ "component": "Crank"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Rod",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "RodBox"+ ],+ "component": "Rod"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Slider",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "SliderBox"+ ],+ "component": "Slider"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Bed:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Crank pin",+ "flip": true,+ "a": {+ "occurrence": "Bed",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Crank",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Big end",+ "flip": true,+ "a": {+ "occurrence": "Crank",+ "point": [+ 10,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Rod",+ "point": [+ 10,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "slider",+ "name": "Guide",+ "flip": true,+ "a": {+ "occurrence": "Bed",+ "point": [+ 40,+ 0,+ 5+ ],+ "z": [+ 1,+ 0,+ 0+ ]+ },+ "b": {+ "occurrence": "Slider",+ "point": [+ 40,+ 0,+ 5+ ],+ "z": [+ 1,+ 0,+ 0+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Small end",+ "flip": true,+ "a": {+ "occurrence": "Rod",+ "point": [+ 40,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Slider",+ "point": [+ 40,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "motion.trace",+ "params": {+ "occurrence": "Rod",+ "point": [+ 25,+ 0,+ 3+ ],+ "joint": "Crank pin",+ "samples": 3,+ "from": 0,+ "to": 180+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-trace-stops-at-contact/expected.json b/tests/kernel-cases/assemblies/cov-motion-trace-stops-at-contact/expected.jsonnew file mode 100644index 0000000000..f9299afb51--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-trace-stops-at-contact/expected.json@@ -0,0 +1,19 @@+{+ "sources": [],+ "what": "motion.trace of the arm's tip with a contact set between the arm and a block",+ "source": "analytic",+ "method": "Base: box 20x20x10 from (-10,-10,-10), grounded; Arm: box 40x10x10 from (0,-5,0), centre (20,0,5); Stop: box 50x10x10 from (-10,30,0), grounded; the arm's corner (40,5) turned \u03b8 reaches y = 40 sin \u03b8 + 5 cos \u03b8, which is 30 at \u03b8 = asin(30/\u221a1625) - atan(5/40) = 40.9676; contact sets stop the motion: the trace from 0 to 90 stops short of the block, its last point within the circle's arc up to \u03b8 = 40.97 (y \u2264 40 sin 40.97 = 26.22)",+ "body_count": 3,+ "volume_mm3": 13000.0,+ "results": [+ {+ "step": 15,+ "json": {+ "stopped_by_contact": {+ "a": "Stop:1",+ "b": "Arm:1"+ }+ }+ }+ ]+}diff --git a/tests/kernel-cases/assemblies/cov-motion-trace-stops-at-contact/recipe.json b/tests/kernel-cases/assemblies/cov-motion-trace-stops-at-contact/recipe.jsonnew file mode 100644index 0000000000..a1335955b4--- /dev/null+++ b/tests/kernel-cases/assemblies/cov-motion-trace-stops-at-contact/recipe.json@@ -0,0 +1,178 @@+{+ "commands": [+ {+ "command": "solid.box",+ "params": {+ "length": 20,+ "width": 20,+ "height": 10,+ "corner": [+ -10,+ -10,+ -10+ ],+ "operation": "new",+ "body_name": "BaseBox"+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 40,+ "width": 10,+ "height": 10,+ "corner": [+ 0,+ -5,+ 0+ ],+ "operation": "new",+ "body_name": "ArmBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Base",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "BaseBox"+ ],+ "component": "Base"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Arm",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "ArmBox"+ ],+ "component": "Arm"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Base:1",+ "grounded": true+ }+ },+ {+ "command": "solid.box",+ "params": {+ "length": 50,+ "width": 10,+ "height": 10,+ "corner": [+ -10,+ 30,+ 0+ ],+ "operation": "new",+ "body_name": "StopBox"+ }+ },+ {+ "command": "component.create",+ "params": {+ "name": "Stop",+ "parent": "root",+ "activate": false+ }+ },+ {+ "command": "component.move_bodies",+ "params": {+ "bodies": [+ "StopBox"+ ],+ "component": "Stop"+ }+ },+ {+ "command": "occurrence.ground",+ "params": {+ "occurrence": "Stop:1",+ "grounded": true+ }+ },+ {+ "command": "joint.create",+ "params": {+ "type": "revolute",+ "name": "Hinge",+ "flip": true,+ "a": {+ "occurrence": "Base",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "b": {+ "occurrence": "Arm",+ "point": [+ 0,+ 0,+ 0+ ],+ "z": [+ 0,+ 0,+ 1+ ]+ },+ "quiet": true+ }+ },+ {+ "command": "contact.create",+ "params": {+ "occurrences": [+ "Arm",+ "Stop"+ ],+ "name": "Stop set"+ }+ },+ {+ "command": "contact.enable_sets",+ "params": {}+ },+ {+ "command": "motion.trace",+ "params": {+ "occurrence": "Arm",+ "point": [+ 40,+ 0,+ 5+ ],+ "joint": "Hinge",+ "samples": 10,+ "from": 0,+ "to": 90+ }+ }+ ]+}