mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-04 02:55:54 +00:00
Kernel rig: one results check, each {step, pointer?, json, rel?, abs_mm?}
Two branches added a results field in different forms ({step, json} and {command, pointer,
value}). The grader keeps one: a 1-based step, an optional JSON pointer into its answer, and the
value matched as files are, with an optional relative or absolute tolerance. The construction and
inspect cases are rewritten to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -110,9 +110,8 @@ the frozen truck-geometry PRs, a `kernel-paused` PR), for the report's coverage
|
||||
| `timeout_s` | A longer timeout for this case than the run's (at most 1800 s), for cases that are slow by nature. A case that only needs it on a loaded machine shouldn't set it. |
|
||||
| `tolerance` | Optional overrides: `rel`, `abs_mm`, `mesh_mm`, `weld_mm`. |
|
||||
| `files` | The files the case wrote to `$OUT`, each `{path, json \| csv \| dxf}`, matched as a part of what is there: every key the case gives, an array item by item and as long, a whole number exactly, any other number within `rel`. `json`: the file's JSON; `csv`: its rows, as objects keyed by the header row; `dxf`: per layer of its ENTITIES section, how many of each entity (`{"CUT": {"CIRCLE": 1, "ELLIPSE": 0, "length_mm": 31.416}}`; a count may be a range `[min, max]`) and `length_mm`, the total length of its lines, arcs, circles, ellipses and polylines. |
|
||||
| `results` | The commands' own answers, each `{step, json}`: the answer of the `step`th command (from 1) matched as `files` matches JSON (a flat pattern's bends, a rule's values). |
|
||||
| `results` | The commands' own answers, each `{step, pointer?, json, rel?, abs_mm?}`: the answer of the `step`th command (from 1, base commands included), or its part at the JSON `pointer` (RFC 6901), matched as `files` matches JSON: a whole number exactly (a count), another within `rel` (the case's relative tolerance unless given) or `abs_mm`, lists item by item. |
|
||||
| `construction` | `{name: spec}`, a spec being `{point: [x,y,z]}`, `{axis: {through, dir}}` or `{plane: {through, normal}}`: each named construction point, axis or plane as the timeline evaluated it. A point within the position tolerance (`tolerance.abs_mm`, else 1e-3 of the box diagonal, of 1 mm where there is no body); an axis whose direction is parallel to `dir` (either way, sine of the angle at most 1e-6) and whose line passes within it of `through`; a plane likewise with `normal`. An axis or plane is graded as the line or plane it is, not by the origin it keeps. |
|
||||
| `results` | `[{command, pointer, value, rel?, abs_mm?}]`: values in the commands' own replies (an inspect command's numbers). The reply of the script's `command`-th command (from 0, base commands included), at the JSON `pointer`, is `value`: a number within the relative tolerance, `[x, y, z]` within the position tolerance, anything else (a string, a bool, null, a list) equal. |
|
||||
| `missing` | A capability SolidCraft has no command or parameter for yet (`"solid.thread has no start count"`): the case is reported **not supported yet** without running, so the gap stays visible. |
|
||||
|
||||
## The kernel rig gate
|
||||
|
||||
@@ -5,32 +5,32 @@
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin (V 24000 at (20,15,10)) and a cylinder r 5, h 10 on (60,0,0) (V 250 pi = 785.40 at (60,0,5)): the volume-weighted mean (21.2675, 14.5247, 9.8416), V = 24000 + 250 pi",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/center",
|
||||
"value": [
|
||||
"json": [
|
||||
21.267517524987444,
|
||||
14.524680928129708,
|
||||
9.84156030937657
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/volume",
|
||||
"value": 24785.398163397447
|
||||
"json": 24785.398163397447
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/bodies/1/center",
|
||||
"value": [
|
||||
"json": [
|
||||
60,
|
||||
0,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/bodies/1/volume",
|
||||
"value": 785.3981633974482
|
||||
"json": 785.3981633974482
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin: the middle (20,15,10), V = 40 x 30 x 20 = 24000",
|
||||
"results": [
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/center",
|
||||
"value": [
|
||||
"json": [
|
||||
20,
|
||||
15,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/volume",
|
||||
"value": 24000.0
|
||||
"json": 24000.0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,38 +5,38 @@
|
||||
"method": "spheres r 5 on (0,0,0) and (20,0,0): 20 - 5 - 5 = 10 apart, from (5,0,0) to (15,0,0)",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/overlaps",
|
||||
"value": []
|
||||
"json": []
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/near/0/a",
|
||||
"value": "A"
|
||||
"json": "A"
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/near/0/b",
|
||||
"value": "B"
|
||||
"json": "B"
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/near/0/distance_mm",
|
||||
"value": 10.0
|
||||
"json": 10.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/near/0/from",
|
||||
"value": [
|
||||
"json": [
|
||||
5,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/near/0/to",
|
||||
"value": [
|
||||
"json": [
|
||||
15,
|
||||
0,
|
||||
0
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
"method": "spheres r 5 on (0,0,0) and (8,0,0): the lens pi (4r + d)(2r - d)^2 / 12 = pi 28 4 / 12 = 29.3215, centred on (4,0,0)",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/overlaps/0/volume_mm3",
|
||||
"value": 29.321531433504735
|
||||
"json": 29.321531433504735
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/overlaps/0/center",
|
||||
"value": [
|
||||
"json": [
|
||||
4,
|
||||
0,
|
||||
0
|
||||
|
||||
+4
-4
@@ -5,14 +5,14 @@
|
||||
"method": "spheres r 5 on (0,0,0) and (20,0,0) are 10 apart; closer than 5 asked: none",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/overlaps",
|
||||
"value": []
|
||||
"json": []
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/near",
|
||||
"value": []
|
||||
"json": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,19 +5,19 @@
|
||||
"method": "boxes 40 x 30 x 20 on the same corner: identical, no region, B - A = 0",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/identical",
|
||||
"value": true
|
||||
"json": true
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/regions",
|
||||
"value": []
|
||||
"json": []
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/difference/volume_mm3",
|
||||
"value": 0.0
|
||||
"json": 0.0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,49 +5,49 @@
|
||||
"method": "box A 40 x 30 x 20 and B 40 x 30 x 25 on the same corner: B - A is the slab z 20..25, V 6000, only in B, at most 5 from A",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/a/volume_mm3",
|
||||
"value": 24000.0
|
||||
"json": 24000.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/b/volume_mm3",
|
||||
"value": 30000.0
|
||||
"json": 30000.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/difference/volume_mm3",
|
||||
"value": 6000.0
|
||||
"json": 6000.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/identical",
|
||||
"value": false
|
||||
"json": false
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/regions/0/side",
|
||||
"value": "only_in_b"
|
||||
"json": "only_in_b"
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/regions/0/volume_mm3",
|
||||
"value": 6000.0
|
||||
"json": 6000.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/only_in_b/volume_mm3",
|
||||
"value": 6000.0
|
||||
"json": 6000.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/only_in_a/volume_mm3",
|
||||
"value": 0.0
|
||||
"json": 0.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/deviation/max_mm",
|
||||
"value": 5.0
|
||||
"json": 5.0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,29 +5,29 @@
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin: the faces y = 0 and z = 0 meet at 90 deg along their edge: g0, sharp, normal angle 90",
|
||||
"results": [
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/summary/edges",
|
||||
"value": 1
|
||||
"json": 1
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/bodies/0/edges/0/order",
|
||||
"value": "g0"
|
||||
"json": "g0"
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/bodies/0/edges/0/verdict",
|
||||
"value": "sharp"
|
||||
"json": "sharp"
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/bodies/0/edges/0/normal_angle_deg/value",
|
||||
"value": 90.0
|
||||
"json": 90.0
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/bodies/0/edges/0/gap_mm/value",
|
||||
"value": 0.0,
|
||||
"json": 0.0,
|
||||
"rel": 1e-06
|
||||
}
|
||||
]
|
||||
|
||||
@@ -5,39 +5,39 @@
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin, its top-front edge (y 0, z 20) rounded r 3: the round meets the top (at y 3) and the front (at z 17) tangent, curvature jumping 0 to 1/3: g1, jump 1/3 per mm",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/summary/edges",
|
||||
"value": 2
|
||||
"json": 2
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/bodies/0/edges/0/order",
|
||||
"value": "g1"
|
||||
"json": "g1"
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/bodies/0/edges/1/order",
|
||||
"value": "g1"
|
||||
"json": "g1"
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/bodies/0/edges/0/curvature_jump_per_mm/value",
|
||||
"value": 0.3333333333333333
|
||||
"json": 0.3333333333333333
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/bodies/0/edges/1/curvature_jump_per_mm/value",
|
||||
"value": 0.3333333333333333
|
||||
"json": 0.3333333333333333
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/bodies/0/edges/0/verdict",
|
||||
"value": "curvature_jump"
|
||||
"json": "curvature_jump"
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/bodies/0/edges/1/verdict",
|
||||
"value": "curvature_jump"
|
||||
"json": "curvature_jump"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,24 +5,24 @@
|
||||
"method": "circle r 7: curvature 1/7 everywhere, radius 7; a line: straight, no radius",
|
||||
"results": [
|
||||
{
|
||||
"command": 4,
|
||||
"step": 5,
|
||||
"pointer": "/combs/0/min_radius",
|
||||
"value": 7.0
|
||||
"json": 7.0
|
||||
},
|
||||
{
|
||||
"command": 4,
|
||||
"step": 5,
|
||||
"pointer": "/combs/0/max_curvature",
|
||||
"value": 0.14285714285714285
|
||||
"json": 0.14285714285714285
|
||||
},
|
||||
{
|
||||
"command": 4,
|
||||
"step": 5,
|
||||
"pointer": "/combs/1/min_radius",
|
||||
"value": null
|
||||
"json": null
|
||||
},
|
||||
{
|
||||
"command": 4,
|
||||
"step": 5,
|
||||
"pointer": "/combs/1/max_curvature",
|
||||
"value": 0.0
|
||||
"json": 0.0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
"method": "a cylinder r 5 on (60,0,0): its top edge is a circle of r 5, curvature 1/5",
|
||||
"results": [
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/combs/0/min_radius",
|
||||
"value": 5.0
|
||||
"json": 5.0
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/combs/0/max_curvature",
|
||||
"value": 0.2
|
||||
"json": 0.2
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,19 +5,19 @@
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin and a box 10 x 10 x 10 from (5,5,5) inside it: the overlap is the small box: V 1000, centre (10,10,10)",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/count",
|
||||
"value": 1
|
||||
"json": 1
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/interferences/0/volume_mm3",
|
||||
"value": 1000.0
|
||||
"json": 1000.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/interferences/0/center",
|
||||
"value": [
|
||||
"json": [
|
||||
10,
|
||||
10,
|
||||
10
|
||||
|
||||
+4
-4
@@ -5,14 +5,14 @@
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin and a box 40 x 30 x 20 from (40,0,0): they share the face x = 40 and no volume: no interference",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/count",
|
||||
"value": 0
|
||||
"json": 0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/interferences",
|
||||
"value": []
|
||||
"json": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,42 +5,42 @@
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin and a box 40 x 30 x 20 from (30,20,10): they share the cube x 30..40, y 20..30, z 10..20: V 1000, A 600, centre (35,25,15)",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/count",
|
||||
"value": 1
|
||||
"json": 1
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/interferences/0/volume_mm3",
|
||||
"value": 1000.0
|
||||
"json": 1000.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/interferences/0/area_mm2",
|
||||
"value": 600.0
|
||||
"json": 600.0
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/interferences/0/center",
|
||||
"value": [
|
||||
"json": [
|
||||
35,
|
||||
25,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/interferences/0/bbox/min",
|
||||
"value": [
|
||||
"json": [
|
||||
30,
|
||||
20,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/interferences/0/bbox/max",
|
||||
"value": [
|
||||
"json": [
|
||||
40,
|
||||
30,
|
||||
20
|
||||
|
||||
@@ -5,24 +5,24 @@
|
||||
"method": "cube 40 with a corner at the origin: its top is the plane z = 40, 0..40 each way; 3 curves each way, evenly spaced, are x = 10, 20, 30 and y = 10, 20, 30: 3 u-curves and 3 v-curves",
|
||||
"results": [
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/faces/0/body",
|
||||
"value": "Cube"
|
||||
"json": "Cube"
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/faces/0/count",
|
||||
"value": 3
|
||||
"json": 3
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/faces/0/u_curves",
|
||||
"value": 3
|
||||
"json": 3
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/faces/0/v_curves",
|
||||
"value": 3
|
||||
"json": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin: every face is flat: no radius (null)",
|
||||
"results": [
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/min_radius",
|
||||
"value": null
|
||||
"json": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
"method": "a cylinder r 5 on (60,0,0): its top edge is a circle of r 5",
|
||||
"results": [
|
||||
{
|
||||
"command": 1,
|
||||
"step": 2,
|
||||
"pointer": "/min_radius",
|
||||
"value": 5.0
|
||||
"json": 5.0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin, its top-front edge (y 0, z 20) rounded r 3: the flat faces have none, the round is a cylinder of r 3: the smallest radius is 3",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"step": 3,
|
||||
"pointer": "/min_radius",
|
||||
"value": 3.0
|
||||
"json": 3.0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
"method": "ellipse a 10, b 4: tightest at the ends of the major axis, b^2 / a = 1.6, at (+-10, 0)",
|
||||
"results": [
|
||||
{
|
||||
"command": 3,
|
||||
"step": 4,
|
||||
"pointer": "/min_radius",
|
||||
"value": 1.6
|
||||
"json": 1.6
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user