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_end.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_end.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_end.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_end.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_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
29,
48,
0
],
"range": [],
"command": {
"type": "make_plane",
"origin": {
@ -84,11 +64,7 @@ description: Artifact commands sketch_on_face_end.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_end.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_end.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_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
116,
138,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
146,
169,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands sketch_on_face_end.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_end.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_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
231,
251,
0
],
"range": [],
"command": {
"type": "extrude",
"target": "[uuid]",
@ -252,22 +192,14 @@ description: Artifact commands sketch_on_face_end.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_end.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_end.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_end.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_end.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_end.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_end.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_end.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_end.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_end.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_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
298,
323,
0
],
"range": [],
"command": {
"type": "enable_sketch_mode",
"entity_id": "[uuid]",
@ -416,22 +308,14 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
298,
323,
0
],
"range": [],
"command": {
"type": "start_path"
}
},
{
"cmdId": "[uuid]",
"range": [
298,
323,
0
],
"range": [],
"command": {
"type": "move_path_pen",
"path": "[uuid]",
@ -444,22 +328,14 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
298,
323,
0
],
"range": [],
"command": {
"type": "sketch_mode_disable"
}
},
{
"cmdId": "[uuid]",
"range": [
329,
348,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -476,11 +352,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
354,
373,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -497,11 +369,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
379,
399,
0
],
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
@ -518,11 +386,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
405,
413,
0
],
"range": [],
"command": {
"type": "close_path",
"path_id": "[uuid]"
@ -530,11 +394,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "enable_sketch_mode",
"entity_id": "[uuid]",
@ -546,11 +406,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "extrude",
"target": "[uuid]",
@ -560,22 +416,14 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "sketch_mode_disable"
}
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "object_bring_to_front",
"object_id": "[uuid]"
@ -583,11 +431,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]",
@ -596,11 +440,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -610,11 +450,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -624,11 +460,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -638,11 +470,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -652,11 +480,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -666,11 +490,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
@ -680,11 +500,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
0
],
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
@ -694,11 +510,7 @@ description: Artifact commands sketch_on_face_end.kcl
},
{
"cmdId": "[uuid]",
"range": [
419,
438,
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_end.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_end.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_end.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_end.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_end.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_end.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_end.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_end.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_end.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_end.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_end.kcl
},
{
"declaration": {
"end": 251,
"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_end.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_end.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_end.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,33 +371,33 @@ description: Result of parsing sketch_on_face_end.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"
},
@ -406,15 +406,15 @@ description: Result of parsing sketch_on_face_end.kcl
{
"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": {
@ -425,39 +425,39 @@ description: Result of parsing sketch_on_face_end.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
}
],
"end": 251,
"start": 195,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 185,
"start": 0,
"type": "VariableDeclarator"
},
"end": 251,
"end": 0,
"kind": "const",
"start": 185,
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 438,
"end": 0,
"id": {
"end": 260,
"end": 0,
"name": "part002",
"start": 253,
"start": 0,
"type": "Identifier"
},
"init": {
@ -465,29 +465,29 @@ description: Result of parsing sketch_on_face_end.kcl
{
"arguments": [
{
"end": 284,
"end": 0,
"name": "part001",
"start": 277,
"start": 0,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 291,
"end": 0,
"raw": "\"END\"",
"start": 286,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "END"
}
],
"callee": {
"end": 276,
"end": 0,
"name": "startSketchOn",
"start": 263,
"start": 0,
"type": "Identifier"
},
"end": 292,
"start": 263,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -496,9 +496,9 @@ description: Result of parsing sketch_on_face_end.kcl
{
"elements": [
{
"end": 315,
"end": 0,
"raw": "0",
"start": 314,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -507,9 +507,9 @@ description: Result of parsing sketch_on_face_end.kcl
}
},
{
"end": 318,
"end": 0,
"raw": "0",
"start": 317,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -518,26 +518,26 @@ description: Result of parsing sketch_on_face_end.kcl
}
}
],
"end": 319,
"start": 313,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"end": 322,
"start": 321,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 312,
"end": 0,
"name": "startProfileAt",
"start": 298,
"start": 0,
"type": "Identifier"
},
"end": 323,
"start": 298,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -546,17 +546,17 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"end": 337,
"end": 0,
"name": "end",
"start": 334,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 342,
"end": 0,
"raw": "0",
"start": 341,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -565,9 +565,9 @@ description: Result of parsing sketch_on_face_end.kcl
}
},
{
"end": 346,
"end": 0,
"raw": "10",
"start": 344,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -576,21 +576,21 @@ description: Result of parsing sketch_on_face_end.kcl
}
}
],
"end": 347,
"start": 340,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 333,
"end": 0,
"name": "line",
"start": 329,
"start": 0,
"type": "Identifier"
},
"end": 348,
"start": 329,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -600,17 +600,17 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"end": 362,
"end": 0,
"name": "end",
"start": 359,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 368,
"end": 0,
"raw": "10",
"start": 366,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -619,9 +619,9 @@ description: Result of parsing sketch_on_face_end.kcl
}
},
{
"end": 371,
"end": 0,
"raw": "0",
"start": 370,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -630,21 +630,21 @@ description: Result of parsing sketch_on_face_end.kcl
}
}
],
"end": 372,
"start": 365,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 358,
"end": 0,
"name": "line",
"start": 354,
"start": 0,
"type": "Identifier"
},
"end": 373,
"start": 354,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -654,17 +654,17 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"end": 387,
"end": 0,
"name": "end",
"start": 384,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 392,
"end": 0,
"raw": "0",
"start": 391,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -674,9 +674,9 @@ description: Result of parsing sketch_on_face_end.kcl
},
{
"argument": {
"end": 397,
"end": 0,
"raw": "10",
"start": 395,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -684,28 +684,28 @@ description: Result of parsing sketch_on_face_end.kcl
"suffix": "None"
}
},
"end": 397,
"end": 0,
"operator": "-",
"start": 394,
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 398,
"start": 390,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 383,
"end": 0,
"name": "line",
"start": 379,
"start": 0,
"type": "Identifier"
},
"end": 399,
"start": 379,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -713,20 +713,20 @@ description: Result of parsing sketch_on_face_end.kcl
{
"arguments": [
{
"end": 412,
"start": 411,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 410,
"end": 0,
"name": "close",
"start": 405,
"start": 0,
"type": "Identifier"
},
"end": 413,
"start": 405,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -735,15 +735,15 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"end": 433,
"end": 0,
"name": "length",
"start": 427,
"start": 0,
"type": "Identifier"
},
"arg": {
"end": 437,
"end": 0,
"raw": "5",
"start": 436,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -754,40 +754,40 @@ description: Result of parsing sketch_on_face_end.kcl
}
],
"callee": {
"end": 426,
"end": 0,
"name": "extrude",
"start": 419,
"start": 0,
"type": "Identifier"
},
"end": 438,
"start": 419,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 438,
"start": 263,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 253,
"start": 0,
"type": "VariableDeclarator"
},
"end": 438,
"end": 0,
"kind": "const",
"start": 253,
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"end": 439,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"end": 253,
"start": 251,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"

View File

@ -13,11 +13,7 @@ description: Operations executed sketch_on_face_end.kcl
],
"unlabeledArg": null,
"labeledArgs": {},
"sourceRange": [
195,
211,
0
]
"sourceRange": []
},
{
"labeledArgs": {
@ -26,19 +22,11 @@ description: Operations executed sketch_on_face_end.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_end.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_end.kcl
"artifactId": "[uuid]"
}
},
"sourceRange": [
231,
251,
0
]
"sourceRange": []
}
},
{
@ -98,30 +74,18 @@ description: Operations executed sketch_on_face_end.kcl
"artifactId": "[uuid]"
}
},
"sourceRange": [
277,
284,
0
]
"sourceRange": []
},
"tag": {
"value": {
"type": "String",
"value": "END"
},
"sourceRange": [
286,
291,
0
]
"sourceRange": []
}
},
"name": "startSketchOn",
"sourceRange": [
263,
292,
0
],
"sourceRange": [],
"type": "StdLibCall",
"unlabeledArg": null
},
@ -141,19 +105,11 @@ description: Operations executed sketch_on_face_end.kcl
}
}
},
"sourceRange": [
436,
437,
0
]
"sourceRange": []
}
},
"name": "extrude",
"sourceRange": [
419,
438,
0
],
"sourceRange": [],
"type": "StdLibCall",
"unlabeledArg": {
"value": {
@ -162,11 +118,7 @@ description: Operations executed sketch_on_face_end.kcl
"artifactId": "[uuid]"
}
},
"sourceRange": [
419,
438,
0
]
"sourceRange": []
}
}
]

View File

@ -16,44 +16,28 @@ description: Variables in memory after executing sketch_on_face_end.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_end.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_end.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_end.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_end.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_end.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_end.kcl
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
329,
348,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
354,
373,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
379,
399,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
405,
413,
0
],
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
@ -279,11 +227,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
329,
348,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -302,11 +246,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
354,
373,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -325,11 +265,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
379,
399,
0
]
"sourceRange": []
},
"from": [
10.0,
@ -348,11 +284,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
405,
413,
0
]
"sourceRange": []
},
"from": [
10.0,
@ -397,44 +329,28 @@ description: Variables in memory after executing sketch_on_face_end.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"
}
@ -446,11 +362,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
86,
108,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -469,11 +381,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
116,
138,
0
]
"sourceRange": []
},
"from": [
0.0,
@ -492,11 +400,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
146,
169,
0
]
"sourceRange": []
},
"from": [
20.0,
@ -515,11 +419,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
217,
225,
0
]
"sourceRange": []
},
"from": [
20.0,
@ -580,11 +480,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
56,
78,
0
]
"sourceRange": []
}
},
"artifactId": "[uuid]",
@ -619,11 +515,7 @@ description: Variables in memory after executing sketch_on_face_end.kcl
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
298,
323,
0
]
"sourceRange": []
}
},
"artifactId": "[uuid]",

View File

@ -0,0 +1,24 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing sketch_on_face_end.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)
part002 = startSketchOn(part001, "END")
|> startProfileAt([0, 0], %)
|> line(end = [0, 10])
|> line(end = [10, 0])
|> line(end = [0, -10])
|> close(%)
|> extrude(length = 5)