Improve snapshot testing (#5856)

* Improve snapshot testing

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Nick Cameron
2025-03-20 11:06:27 +13:00
committed by GitHub
parent 4b6166dc4f
commit a7e09a89ef
551 changed files with 115788 additions and 275855 deletions

View File

@ -5,11 +5,7 @@ description: Artifact commands sketch_on_face_start.kcl
[
{
"cmdId": "[uuid]",
"range": [
0,
0,
0
],
"range": [],
"command": {
"type": "edge_lines_visible",
"hidden": false
@ -17,11 +13,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
0,
0,
0
],
"range": [],
"command": {
"type": "set_scene_units",
"unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
0,
0,
0
],
"range": [],
"command": {
"type": "object_visible",
"object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
0,
0,
0
],
"range": [],
"command": {
"type": "object_visible",
"object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
29,
48,
0
],
"range": [],
"command": {
"type": "make_plane",
"origin": {
@ -84,11 +64,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
56,
78,
0
],
"range": [],
"command": {
"type": "enable_sketch_mode",
"entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
56,
78,
0
],
"range": [],
"command": {
"type": "start_path"
}
},
{
"cmdId": "[uuid]",
"range": [
56,
78,
0
],
"range": [],
"command": {
"type": "move_path_pen",
"path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
56,
78,
0
],
"range": [],
"command": {
"type": "sketch_mode_disable"
}
},
{
"cmdId": "[uuid]",
"range": [
86,
108,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
116,
138,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
146,
169,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
217,
225,
0
],
"range": [],
"command": {
"type": "close_path",
"path_id": "[uuid]"
@ -218,11 +166,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "enable_sketch_mode",
"entity_id": "[uuid]",
@ -238,11 +182,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "extrude",
"target": "[uuid]",
@ -252,22 +192,14 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "sketch_mode_disable"
}
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "object_bring_to_front",
"object_id": "[uuid]"
@ -275,11 +207,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]",
@ -288,11 +216,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -302,11 +226,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -316,11 +236,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -330,11 +246,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -344,11 +256,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -358,11 +266,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -372,11 +276,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -386,11 +286,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -400,11 +296,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
303,
328,
0
],
"range": [],
"command": {
"type": "enable_sketch_mode",
"entity_id": "[uuid]",
@ -416,22 +308,14 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
303,
328,
0
],
"range": [],
"command": {
"type": "start_path"
}
},
{
"cmdId": "[uuid]",
"range": [
303,
328,
0
],
"range": [],
"command": {
"type": "move_path_pen",
"path": "[uuid]",
@ -444,22 +328,14 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
303,
328,
0
],
"range": [],
"command": {
"type": "sketch_mode_disable"
}
},
{
"cmdId": "[uuid]",
"range": [
334,
353,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -476,11 +352,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
359,
378,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -497,11 +369,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
384,
404,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -518,11 +386,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
410,
418,
0
],
"range": [],
"command": {
"type": "close_path",
"path_id": "[uuid]"
@ -530,11 +394,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "enable_sketch_mode",
"entity_id": "[uuid]",
@ -546,11 +406,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "extrude",
"target": "[uuid]",
@ -560,22 +416,14 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "sketch_mode_disable"
}
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "object_bring_to_front",
"object_id": "[uuid]"
@ -583,11 +431,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]",
@ -596,11 +440,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -610,11 +450,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -624,11 +460,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -638,11 +470,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -652,11 +480,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -666,11 +490,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -680,11 +500,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -694,11 +510,7 @@ description: Artifact commands sketch_on_face_start.kcl
},
{
"cmdId": "[uuid]",
"range": [
424,
443,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",

View File

@ -7,11 +7,11 @@ description: Result of parsing sketch_on_face_start.kcl
"body": [
{
"declaration": {
"end": 184,
"end": 0,
"id": {
"end": 7,
"end": 0,
"name": "cube",
"start": 3,
"start": 0,
"type": "Identifier"
},
"init": {
@ -19,11 +19,11 @@ description: Result of parsing sketch_on_face_start.kcl
"body": [
{
"declaration": {
"end": 169,
"end": 0,
"id": {
"end": 26,
"end": 0,
"name": "sg",
"start": 24,
"start": 0,
"type": "Identifier"
},
"init": {
@ -31,49 +31,49 @@ description: Result of parsing sketch_on_face_start.kcl
{
"arguments": [
{
"end": 47,
"end": 0,
"raw": "'XY'",
"start": 43,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "XY"
}
],
"callee": {
"end": 42,
"end": 0,
"name": "startSketchOn",
"start": 29,
"start": 0,
"type": "Identifier"
},
"end": 48,
"start": 29,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"end": 74,
"end": 0,
"name": "pos",
"start": 71,
"start": 0,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 77,
"start": 76,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 70,
"end": 0,
"name": "startProfileAt",
"start": 56,
"start": 0,
"type": "Identifier"
},
"end": 78,
"start": 56,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -82,17 +82,17 @@ description: Result of parsing sketch_on_face_start.kcl
{
"type": "LabeledArg",
"label": {
"end": 94,
"end": 0,
"name": "end",
"start": 91,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 99,
"end": 0,
"raw": "0",
"start": 98,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -101,28 +101,28 @@ description: Result of parsing sketch_on_face_start.kcl
}
},
{
"end": 106,
"end": 0,
"name": "scale",
"start": 101,
"start": 0,
"type": "Identifier",
"type": "Identifier"
}
],
"end": 107,
"start": 97,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 90,
"end": 0,
"name": "line",
"start": 86,
"start": 0,
"type": "Identifier"
},
"end": 108,
"start": 86,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -132,24 +132,24 @@ description: Result of parsing sketch_on_face_start.kcl
{
"type": "LabeledArg",
"label": {
"end": 124,
"end": 0,
"name": "end",
"start": 121,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 133,
"end": 0,
"name": "scale",
"start": 128,
"start": 0,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 136,
"end": 0,
"raw": "0",
"start": 135,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -158,21 +158,21 @@ description: Result of parsing sketch_on_face_start.kcl
}
}
],
"end": 137,
"start": 127,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 120,
"end": 0,
"name": "line",
"start": 116,
"start": 0,
"type": "Identifier"
},
"end": 138,
"start": 116,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -182,17 +182,17 @@ description: Result of parsing sketch_on_face_start.kcl
{
"type": "LabeledArg",
"label": {
"end": 154,
"end": 0,
"name": "end",
"start": 151,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 159,
"end": 0,
"raw": "0",
"start": 158,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -202,74 +202,74 @@ description: Result of parsing sketch_on_face_start.kcl
},
{
"argument": {
"end": 167,
"end": 0,
"name": "scale",
"start": 162,
"start": 0,
"type": "Identifier",
"type": "Identifier"
},
"end": 167,
"end": 0,
"operator": "-",
"start": 161,
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 168,
"start": 157,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 150,
"end": 0,
"name": "line",
"start": 146,
"start": 0,
"type": "Identifier"
},
"end": 169,
"start": 146,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 169,
"start": 29,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 24,
"start": 0,
"type": "VariableDeclarator"
},
"end": 169,
"end": 0,
"kind": "const",
"start": 24,
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"argument": {
"end": 182,
"end": 0,
"name": "sg",
"start": 180,
"start": 0,
"type": "Identifier",
"type": "Identifier"
},
"end": 182,
"start": 173,
"end": 0,
"start": 0,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 184,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"0": [
{
"end": 173,
"start": 169,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"
@ -279,37 +279,37 @@ description: Result of parsing sketch_on_face_start.kcl
},
"startNodes": []
},
"start": 20
"start": 0
},
"end": 184,
"end": 0,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 11,
"end": 0,
"name": "pos",
"start": 8,
"start": 0,
"type": "Identifier"
}
},
{
"type": "Parameter",
"identifier": {
"end": 18,
"end": 0,
"name": "scale",
"start": 13,
"start": 0,
"type": "Identifier"
}
}
],
"start": 7,
"start": 0,
"type": "FunctionExpression",
"type": "FunctionExpression"
},
"start": 3,
"start": 0,
"type": "VariableDeclarator"
},
"end": 184,
"end": 0,
"kind": "fn",
"start": 0,
"type": "VariableDeclaration",
@ -317,11 +317,11 @@ description: Result of parsing sketch_on_face_start.kcl
},
{
"declaration": {
"end": 258,
"end": 0,
"id": {
"end": 192,
"end": 0,
"name": "part001",
"start": 185,
"start": 0,
"type": "Identifier"
},
"init": {
@ -331,9 +331,9 @@ description: Result of parsing sketch_on_face_start.kcl
{
"elements": [
{
"end": 202,
"end": 0,
"raw": "0",
"start": 201,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -342,9 +342,9 @@ description: Result of parsing sketch_on_face_start.kcl
}
},
{
"end": 205,
"end": 0,
"raw": "0",
"start": 204,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -353,15 +353,15 @@ description: Result of parsing sketch_on_face_start.kcl
}
}
],
"end": 206,
"start": 200,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"end": 210,
"end": 0,
"raw": "20",
"start": 208,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -371,52 +371,52 @@ description: Result of parsing sketch_on_face_start.kcl
}
],
"callee": {
"end": 199,
"end": 0,
"name": "cube",
"start": 195,
"start": 0,
"type": "Identifier"
},
"end": 211,
"start": 195,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"end": 224,
"start": 223,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 222,
"end": 0,
"name": "close",
"start": 217,
"start": 0,
"type": "Identifier"
},
"end": 225,
"start": 217,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"end": 258,
"end": 0,
"expr": {
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 245,
"end": 0,
"name": "length",
"start": 239,
"start": 0,
"type": "Identifier"
},
"arg": {
"end": 250,
"end": 0,
"raw": "20",
"start": 248,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -427,49 +427,49 @@ description: Result of parsing sketch_on_face_start.kcl
}
],
"callee": {
"end": 238,
"end": 0,
"name": "extrude",
"start": 231,
"start": 0,
"type": "Identifier"
},
"end": 251,
"start": 231,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
"label": {
"end": 258,
"end": 0,
"name": "foo",
"start": 255,
"start": 0,
"type": "Identifier"
},
"start": 231,
"start": 0,
"type": "LabelledExpression",
"type": "LabelledExpression"
}
],
"end": 258,
"start": 195,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 185,
"start": 0,
"type": "VariableDeclarator"
},
"end": 258,
"end": 0,
"kind": "const",
"start": 185,
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 443,
"end": 0,
"id": {
"end": 267,
"end": 0,
"name": "part002",
"start": 260,
"start": 0,
"type": "Identifier"
},
"init": {
@ -477,29 +477,29 @@ description: Result of parsing sketch_on_face_start.kcl
{
"arguments": [
{
"end": 287,
"end": 0,
"name": "foo",
"start": 284,
"start": 0,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 296,
"end": 0,
"raw": "\"start\"",
"start": 289,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "start"
}
],
"callee": {
"end": 283,
"end": 0,
"name": "startSketchOn",
"start": 270,
"start": 0,
"type": "Identifier"
},
"end": 297,
"start": 270,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -508,9 +508,9 @@ description: Result of parsing sketch_on_face_start.kcl
{
"elements": [
{
"end": 320,
"end": 0,
"raw": "0",
"start": 319,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -519,9 +519,9 @@ description: Result of parsing sketch_on_face_start.kcl
}
},
{
"end": 323,
"end": 0,
"raw": "0",
"start": 322,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -530,26 +530,26 @@ description: Result of parsing sketch_on_face_start.kcl
}
}
],
"end": 324,
"start": 318,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"end": 327,
"start": 326,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 317,
"end": 0,
"name": "startProfileAt",
"start": 303,
"start": 0,
"type": "Identifier"
},
"end": 328,
"start": 303,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -558,17 +558,17 @@ description: Result of parsing sketch_on_face_start.kcl
{
"type": "LabeledArg",
"label": {
"end": 342,
"end": 0,
"name": "end",
"start": 339,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 347,
"end": 0,
"raw": "0",
"start": 346,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -577,9 +577,9 @@ description: Result of parsing sketch_on_face_start.kcl
}
},
{
"end": 351,
"end": 0,
"raw": "10",
"start": 349,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -588,21 +588,21 @@ description: Result of parsing sketch_on_face_start.kcl
}
}
],
"end": 352,
"start": 345,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 338,
"end": 0,
"name": "line",
"start": 334,
"start": 0,
"type": "Identifier"
},
"end": 353,
"start": 334,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -612,17 +612,17 @@ description: Result of parsing sketch_on_face_start.kcl
{
"type": "LabeledArg",
"label": {
"end": 367,
"end": 0,
"name": "end",
"start": 364,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 373,
"end": 0,
"raw": "10",
"start": 371,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -631,9 +631,9 @@ description: Result of parsing sketch_on_face_start.kcl
}
},
{
"end": 376,
"end": 0,
"raw": "0",
"start": 375,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -642,21 +642,21 @@ description: Result of parsing sketch_on_face_start.kcl
}
}
],
"end": 377,
"start": 370,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 363,
"end": 0,
"name": "line",
"start": 359,
"start": 0,
"type": "Identifier"
},
"end": 378,
"start": 359,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -666,17 +666,17 @@ description: Result of parsing sketch_on_face_start.kcl
{
"type": "LabeledArg",
"label": {
"end": 392,
"end": 0,
"name": "end",
"start": 389,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 397,
"end": 0,
"raw": "0",
"start": 396,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -686,9 +686,9 @@ description: Result of parsing sketch_on_face_start.kcl
},
{
"argument": {
"end": 402,
"end": 0,
"raw": "10",
"start": 400,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -696,28 +696,28 @@ description: Result of parsing sketch_on_face_start.kcl
"suffix": "None"
}
},
"end": 402,
"end": 0,
"operator": "-",
"start": 399,
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 403,
"start": 395,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 388,
"end": 0,
"name": "line",
"start": 384,
"start": 0,
"type": "Identifier"
},
"end": 404,
"start": 384,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -725,20 +725,20 @@ description: Result of parsing sketch_on_face_start.kcl
{
"arguments": [
{
"end": 417,
"start": 416,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 415,
"end": 0,
"name": "close",
"start": 410,
"start": 0,
"type": "Identifier"
},
"end": 418,
"start": 410,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -747,15 +747,15 @@ description: Result of parsing sketch_on_face_start.kcl
{
"type": "LabeledArg",
"label": {
"end": 438,
"end": 0,
"name": "length",
"start": 432,
"start": 0,
"type": "Identifier"
},
"arg": {
"end": 442,
"end": 0,
"raw": "5",
"start": 441,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -766,40 +766,40 @@ description: Result of parsing sketch_on_face_start.kcl
}
],
"callee": {
"end": 431,
"end": 0,
"name": "extrude",
"start": 424,
"start": 0,
"type": "Identifier"
},
"end": 443,
"start": 424,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 443,
"start": 270,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 260,
"start": 0,
"type": "VariableDeclarator"
},
"end": 443,
"end": 0,
"kind": "const",
"start": 260,
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"end": 444,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"end": 260,
"start": 258,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"

View File

@ -13,11 +13,7 @@ description: Operations executed sketch_on_face_start.kcl
],
"unlabeledArg": null,
"labeledArgs": {},
"sourceRange": [
195,
211,
0
]
"sourceRange": []
},
{
"labeledArgs": {
@ -26,19 +22,11 @@ description: Operations executed sketch_on_face_start.kcl
"type": "String",
"value": "XY"
},
"sourceRange": [
43,
47,
0
]
"sourceRange": []
}
},
"name": "startSketchOn",
"sourceRange": [
29,
48,
0
],
"sourceRange": [],
"type": "StdLibCall",
"unlabeledArg": null
},
@ -61,19 +49,11 @@ description: Operations executed sketch_on_face_start.kcl
}
}
},
"sourceRange": [
248,
250,
0
]
"sourceRange": []
}
},
"name": "extrude",
"sourceRange": [
231,
251,
0
],
"sourceRange": [],
"type": "StdLibCall",
"unlabeledArg": {
"value": {
@ -82,11 +62,7 @@ description: Operations executed sketch_on_face_start.kcl
"artifactId": "[uuid]"
}
},
"sourceRange": [
231,
251,
0
]
"sourceRange": []
}
},
{
@ -98,30 +74,18 @@ description: Operations executed sketch_on_face_start.kcl
"artifactId": "[uuid]"
}
},
"sourceRange": [
284,
287,
0
]
"sourceRange": []
},
"tag": {
"value": {
"type": "String",
"value": "start"
},
"sourceRange": [
289,
296,
0
]
"sourceRange": []
}
},
"name": "startSketchOn",
"sourceRange": [
270,
297,
0
],
"sourceRange": [],
"type": "StdLibCall",
"unlabeledArg": null
},
@ -141,19 +105,11 @@ description: Operations executed sketch_on_face_start.kcl
}
}
},
"sourceRange": [
441,
442,
0
]
"sourceRange": []
}
},
"name": "extrude",
"sourceRange": [
424,
443,
0
],
"sourceRange": [],
"type": "StdLibCall",
"unlabeledArg": {
"value": {
@ -162,11 +118,7 @@ description: Operations executed sketch_on_face_start.kcl
"artifactId": "[uuid]"
}
},
"sourceRange": [
424,
443,
0
]
"sourceRange": []
}
}
]

View File

@ -16,44 +16,28 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
86,
108,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
116,
138,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
146,
169,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
217,
225,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
@ -65,11 +49,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
86,
108,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -88,11 +68,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
116,
138,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -111,11 +87,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
146,
169,
0
]
"sourceRange": []
},
"from": [
20.0,
@ -134,11 +106,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
217,
225,
0
]
"sourceRange": []
},
"from": [
20.0,
@ -199,11 +167,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
56,
78,
0
]
"sourceRange": []
}
},
"artifactId": "[uuid]",
@ -230,44 +194,28 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
86,
108,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
116,
138,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
146,
169,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
217,
225,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
@ -279,11 +227,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
86,
108,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -302,11 +246,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
116,
138,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -325,11 +265,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
146,
169,
0
]
"sourceRange": []
},
"from": [
20.0,
@ -348,11 +284,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
217,
225,
0
]
"sourceRange": []
},
"from": [
20.0,
@ -413,11 +345,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
56,
78,
0
]
"sourceRange": []
}
},
"artifactId": "[uuid]",
@ -444,44 +372,28 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
334,
353,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
359,
378,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
384,
404,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
410,
418,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
@ -493,11 +405,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
334,
353,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -516,11 +424,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
359,
378,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -539,11 +443,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
384,
404,
0
]
"sourceRange": []
},
"from": [
10.0,
@ -562,11 +462,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
410,
418,
0
]
"sourceRange": []
},
"from": [
10.0,
@ -611,44 +507,28 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
86,
108,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
116,
138,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
146,
169,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
217,
225,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
@ -660,11 +540,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
86,
108,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -683,11 +559,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
116,
138,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -706,11 +578,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
146,
169,
0
]
"sourceRange": []
},
"from": [
20.0,
@ -729,11 +597,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
217,
225,
0
]
"sourceRange": []
},
"from": [
20.0,
@ -794,11 +658,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
56,
78,
0
]
"sourceRange": []
}
},
"artifactId": "[uuid]",
@ -833,11 +693,7 @@ description: Variables in memory after executing sketch_on_face_start.kcl
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
303,
328,
0
]
"sourceRange": []
}
},
"artifactId": "[uuid]",

View File

@ -0,0 +1,24 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing sketch_on_face_start.kcl
---
fn cube(pos, scale) {
sg = startSketchOn('XY')
|> startProfileAt(pos, %)
|> line(end = [0, scale])
|> line(end = [scale, 0])
|> line(end = [0, -scale])
return sg
}
part001 = cube([0, 0], 20)
|> close(%)
|> extrude(length = 20) as foo
part002 = startSketchOn(foo, "start")
|> startProfileAt([0, 0], %)
|> line(end = [0, 10])
|> line(end = [10, 0])
|> line(end = [0, -10])
|> close(%)
|> extrude(length = 5)