216a7ed625
Port the runtime-tracer half of PR #30 (feat/cadquery_converter) and rewrite its emission layer to the current Feature Tree Convention, following the tools/research/histjson four-stage pattern (trace / translate / validate / profile + responsibility wall: the translator only translates). - tracer/ (instrument, fingerprint, cq_runner, worker) ported near-verbatim: runs under .venv-cq (Python 3.11 + cadquery 2.8); records resolved plane frames, serialized args, selector strings, and geometric fingerprints of actually-selected faces/edges plus ground-truth volume/bbox per program. - emission rewritten for FTC: block headers with closed role vocabulary and no positional slugs; transcribed planar profiles authored through the sketch API (local coords, pooled points, three-point arcs via circumcenter) annotated profile=geometry; booleans in list form over a histjson-shaped bodies dataflow; fillet/chamfer/shell selections synthesized as QL predicate bands from trace fingerprints with take/exactly cardinality; through-cut depths derived from the trace bbox; zero in-source verification; literal numbers only. - unknown ops become untranslated notes, never silent drops; static-AST path and exploratory scoring/edit-bench from the PR intentionally not ported. - directory named cadqueryftc so it can never shadow `import cadquery`. - fixtures are real traces captured with cadquery 2.8; 13 tests pin format contracts + volume reconciliation (all four reconcile at <=2.2e-12 rel err) with no cadquery required in CI; full test/ suite 1516 passed.
844 lines
14 KiB
JSON
844 lines
14 KiB
JSON
{
|
|
"cq_status": "ok",
|
|
"error": "",
|
|
"cq_volume": 315628.4374466159,
|
|
"cq_bbox": [
|
|
-70.0,
|
|
-70.0,
|
|
-12.6,
|
|
70.0,
|
|
70.0,
|
|
12.6
|
|
],
|
|
"steps": [
|
|
{
|
|
"op": "Workplane",
|
|
"args": [
|
|
"YZ"
|
|
],
|
|
"plane_name": "YZ",
|
|
"plane_origin": [
|
|
0.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_normal": [
|
|
1.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_x_dir": [
|
|
0.0,
|
|
1.0,
|
|
0.0
|
|
],
|
|
"produced_solid": false
|
|
},
|
|
{
|
|
"op": "polyline",
|
|
"args": [
|
|
[
|
|
[
|
|
17.5,
|
|
-12.6
|
|
],
|
|
[
|
|
31.5,
|
|
-12.6
|
|
],
|
|
[
|
|
62.4,
|
|
-12.6
|
|
],
|
|
[
|
|
62.4,
|
|
-5.0
|
|
],
|
|
[
|
|
70.0,
|
|
-5.0
|
|
],
|
|
[
|
|
70.0,
|
|
5.0
|
|
],
|
|
[
|
|
62.4,
|
|
5.0
|
|
],
|
|
[
|
|
62.4,
|
|
12.6
|
|
],
|
|
[
|
|
31.5,
|
|
12.6
|
|
],
|
|
[
|
|
17.5,
|
|
12.6
|
|
]
|
|
]
|
|
],
|
|
"plane_origin": [
|
|
0.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_normal": [
|
|
1.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_x_dir": [
|
|
0.0,
|
|
1.0,
|
|
0.0
|
|
],
|
|
"produced_solid": false
|
|
},
|
|
{
|
|
"op": "Workplane",
|
|
"plane_origin": [
|
|
0.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_normal": [
|
|
0.0,
|
|
0.0,
|
|
1.0
|
|
],
|
|
"plane_x_dir": [
|
|
1.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"produced_solid": false
|
|
},
|
|
{
|
|
"op": "close",
|
|
"plane_origin": [
|
|
0.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_normal": [
|
|
1.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_x_dir": [
|
|
0.0,
|
|
1.0,
|
|
0.0
|
|
],
|
|
"selections": [
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
24.5,
|
|
-12.6
|
|
],
|
|
"length": 14.0,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
17.5,
|
|
-12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
31.5,
|
|
-12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
17.5,
|
|
-12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
31.5,
|
|
-12.6
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
46.95,
|
|
-12.6
|
|
],
|
|
"length": 30.9,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
31.5,
|
|
-12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
62.4,
|
|
-12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
31.5,
|
|
-12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
62.4,
|
|
-12.6
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
62.4,
|
|
-8.799999999999999
|
|
],
|
|
"length": 7.6,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
62.4,
|
|
-12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
62.4,
|
|
-5.0
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
62.4,
|
|
-12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
62.4,
|
|
-5.0
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
66.2,
|
|
-5.0
|
|
],
|
|
"length": 7.600000000000001,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
62.4,
|
|
-5.0
|
|
],
|
|
"max": [
|
|
0.0,
|
|
70.0,
|
|
-5.0
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
62.4,
|
|
-5.0
|
|
],
|
|
"end": [
|
|
0.0,
|
|
70.0,
|
|
-5.0
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
70.0,
|
|
2.220446049250313e-16
|
|
],
|
|
"length": 10.0,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
70.0,
|
|
-5.0
|
|
],
|
|
"max": [
|
|
0.0,
|
|
70.0,
|
|
5.0
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
70.0,
|
|
-5.0
|
|
],
|
|
"end": [
|
|
0.0,
|
|
70.0,
|
|
5.0
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
66.2,
|
|
5.0
|
|
],
|
|
"length": 7.600000000000001,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
62.4,
|
|
5.0
|
|
],
|
|
"max": [
|
|
0.0,
|
|
70.0,
|
|
5.0
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
70.0,
|
|
5.0
|
|
],
|
|
"end": [
|
|
0.0,
|
|
62.4,
|
|
5.0
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
62.4,
|
|
8.799999999999999
|
|
],
|
|
"length": 7.6,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
62.4,
|
|
5.0
|
|
],
|
|
"max": [
|
|
0.0,
|
|
62.4,
|
|
12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
62.4,
|
|
5.0
|
|
],
|
|
"end": [
|
|
0.0,
|
|
62.4,
|
|
12.6
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
46.95,
|
|
12.6
|
|
],
|
|
"length": 30.9,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
31.5,
|
|
12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
62.4,
|
|
12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
62.4,
|
|
12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
31.5,
|
|
12.6
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
24.5,
|
|
12.6
|
|
],
|
|
"length": 14.0,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
17.5,
|
|
12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
31.5,
|
|
12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
31.5,
|
|
12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
17.5,
|
|
12.6
|
|
]
|
|
}
|
|
],
|
|
"produced_solid": false
|
|
},
|
|
{
|
|
"op": "polyline",
|
|
"args": [
|
|
[
|
|
[
|
|
17.5,
|
|
12.6,
|
|
0.0
|
|
],
|
|
[
|
|
17.5,
|
|
-12.6,
|
|
0.0
|
|
]
|
|
]
|
|
],
|
|
"plane_origin": [
|
|
0.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_normal": [
|
|
1.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_x_dir": [
|
|
0.0,
|
|
1.0,
|
|
0.0
|
|
],
|
|
"selections": [
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
24.5,
|
|
-12.6
|
|
],
|
|
"length": 14.0,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
17.5,
|
|
-12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
31.5,
|
|
-12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
17.5,
|
|
-12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
31.5,
|
|
-12.6
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
46.95,
|
|
-12.6
|
|
],
|
|
"length": 30.9,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
31.5,
|
|
-12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
62.4,
|
|
-12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
31.5,
|
|
-12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
62.4,
|
|
-12.6
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
62.4,
|
|
-8.799999999999999
|
|
],
|
|
"length": 7.6,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
62.4,
|
|
-12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
62.4,
|
|
-5.0
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
62.4,
|
|
-12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
62.4,
|
|
-5.0
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
66.2,
|
|
-5.0
|
|
],
|
|
"length": 7.600000000000001,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
62.4,
|
|
-5.0
|
|
],
|
|
"max": [
|
|
0.0,
|
|
70.0,
|
|
-5.0
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
62.4,
|
|
-5.0
|
|
],
|
|
"end": [
|
|
0.0,
|
|
70.0,
|
|
-5.0
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
70.0,
|
|
2.220446049250313e-16
|
|
],
|
|
"length": 10.0,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
70.0,
|
|
-5.0
|
|
],
|
|
"max": [
|
|
0.0,
|
|
70.0,
|
|
5.0
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
70.0,
|
|
-5.0
|
|
],
|
|
"end": [
|
|
0.0,
|
|
70.0,
|
|
5.0
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
66.2,
|
|
5.0
|
|
],
|
|
"length": 7.600000000000001,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
62.4,
|
|
5.0
|
|
],
|
|
"max": [
|
|
0.0,
|
|
70.0,
|
|
5.0
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
70.0,
|
|
5.0
|
|
],
|
|
"end": [
|
|
0.0,
|
|
62.4,
|
|
5.0
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
62.4,
|
|
8.799999999999999
|
|
],
|
|
"length": 7.6,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
62.4,
|
|
5.0
|
|
],
|
|
"max": [
|
|
0.0,
|
|
62.4,
|
|
12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
62.4,
|
|
5.0
|
|
],
|
|
"end": [
|
|
0.0,
|
|
62.4,
|
|
12.6
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
46.95,
|
|
12.6
|
|
],
|
|
"length": 30.9,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
31.5,
|
|
12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
62.4,
|
|
12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
62.4,
|
|
12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
31.5,
|
|
12.6
|
|
]
|
|
},
|
|
{
|
|
"kind": "edge",
|
|
"geom_type": "LINE",
|
|
"center": [
|
|
0.0,
|
|
24.5,
|
|
12.6
|
|
],
|
|
"length": 14.0,
|
|
"bbox": {
|
|
"min": [
|
|
0.0,
|
|
17.5,
|
|
12.6
|
|
],
|
|
"max": [
|
|
0.0,
|
|
31.5,
|
|
12.6
|
|
]
|
|
},
|
|
"start": [
|
|
0.0,
|
|
31.5,
|
|
12.6
|
|
],
|
|
"end": [
|
|
0.0,
|
|
17.5,
|
|
12.6
|
|
]
|
|
}
|
|
],
|
|
"produced_solid": false
|
|
},
|
|
{
|
|
"op": "Workplane",
|
|
"plane_origin": [
|
|
0.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_normal": [
|
|
0.0,
|
|
0.0,
|
|
1.0
|
|
],
|
|
"plane_x_dir": [
|
|
1.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"produced_solid": false
|
|
},
|
|
{
|
|
"op": "Workplane",
|
|
"plane_origin": [
|
|
0.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_normal": [
|
|
0.0,
|
|
0.0,
|
|
1.0
|
|
],
|
|
"plane_x_dir": [
|
|
1.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"produced_solid": false
|
|
},
|
|
{
|
|
"op": "revolve",
|
|
"args": [
|
|
360,
|
|
[
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
[
|
|
0,
|
|
1,
|
|
0
|
|
]
|
|
],
|
|
"plane_origin": [
|
|
0.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_normal": [
|
|
1.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_x_dir": [
|
|
0.0,
|
|
1.0,
|
|
0.0
|
|
],
|
|
"produced_solid": false
|
|
},
|
|
{
|
|
"op": "Workplane",
|
|
"plane_origin": [
|
|
0.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"plane_normal": [
|
|
0.0,
|
|
0.0,
|
|
1.0
|
|
],
|
|
"plane_x_dir": [
|
|
1.0,
|
|
0.0,
|
|
0.0
|
|
],
|
|
"produced_solid": true
|
|
}
|
|
],
|
|
"stem": "revolve_ring",
|
|
"family": ""
|
|
}
|