2024-11-21 18:33:02 -06:00
|
|
|
---
|
|
|
|
source: kcl/src/simulation_tests.rs
|
2024-11-25 10:50:43 +13:00
|
|
|
assertion_line: 92
|
2024-11-21 18:33:02 -06:00
|
|
|
description: Program memory after executing function_sketch.kcl
|
|
|
|
snapshot_kind: text
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"environments": [
|
|
|
|
{
|
|
|
|
"bindings": {
|
|
|
|
"HALF_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 180.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"QUARTER_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 90.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"THREE_QUARTER_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 270.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"ZERO": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 0.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"box": {
|
|
|
|
"type": "Function",
|
|
|
|
"expression": {
|
|
|
|
"body": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"declarations": [
|
|
|
|
{
|
|
|
|
"end": 193,
|
|
|
|
"id": {
|
|
|
|
"end": 31,
|
|
|
|
"name": "myBox",
|
|
|
|
"start": 26,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 52,
|
|
|
|
"raw": "'XY'",
|
|
|
|
"start": 48,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": "XY"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 47,
|
|
|
|
"name": "startSketchOn",
|
|
|
|
"start": 34,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 53,
|
|
|
|
"optional": false,
|
|
|
|
"start": 34,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 78,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 77,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 0.0
|
2024-11-21 18:33:02 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 81,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 80,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 0.0
|
2024-11-21 18:33:02 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 82,
|
|
|
|
"start": 76,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 85,
|
|
|
|
"start": 84,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 75,
|
|
|
|
"name": "startProfileAt",
|
|
|
|
"start": 61,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 86,
|
|
|
|
"optional": false,
|
|
|
|
"start": 61,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 101,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 100,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 0.0
|
2024-11-21 18:33:02 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 104,
|
|
|
|
"name": "l",
|
|
|
|
"start": 103,
|
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 105,
|
|
|
|
"start": 99,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 108,
|
|
|
|
"start": 107,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 98,
|
|
|
|
"name": "line",
|
|
|
|
"start": 94,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 109,
|
|
|
|
"optional": false,
|
|
|
|
"start": 94,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 124,
|
|
|
|
"name": "w",
|
|
|
|
"start": 123,
|
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 127,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 126,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 0.0
|
2024-11-21 18:33:02 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 128,
|
|
|
|
"start": 122,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 131,
|
|
|
|
"start": 130,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 121,
|
|
|
|
"name": "line",
|
|
|
|
"start": 117,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 132,
|
|
|
|
"optional": false,
|
|
|
|
"start": 117,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 147,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 146,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 0.0
|
2024-11-21 18:33:02 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"argument": {
|
|
|
|
"end": 151,
|
|
|
|
"name": "l",
|
|
|
|
"start": 150,
|
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 151,
|
|
|
|
"operator": "-",
|
|
|
|
"start": 149,
|
|
|
|
"type": "UnaryExpression",
|
|
|
|
"type": "UnaryExpression"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 152,
|
|
|
|
"start": 145,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 155,
|
|
|
|
"start": 154,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 144,
|
|
|
|
"name": "line",
|
|
|
|
"start": 140,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 156,
|
|
|
|
"optional": false,
|
|
|
|
"start": 140,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 171,
|
|
|
|
"start": 170,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 169,
|
|
|
|
"name": "close",
|
|
|
|
"start": 164,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 172,
|
|
|
|
"optional": false,
|
|
|
|
"start": 164,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 189,
|
|
|
|
"name": "h",
|
|
|
|
"start": 188,
|
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 192,
|
|
|
|
"start": 191,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 187,
|
|
|
|
"name": "extrude",
|
|
|
|
"start": 180,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 193,
|
|
|
|
"optional": false,
|
|
|
|
"start": 180,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 193,
|
|
|
|
"start": 34,
|
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
|
|
|
"start": 26,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 193,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 26,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"argument": {
|
|
|
|
"end": 209,
|
|
|
|
"name": "myBox",
|
|
|
|
"start": 204,
|
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 209,
|
|
|
|
"start": 197,
|
|
|
|
"type": "ReturnStatement",
|
|
|
|
"type": "ReturnStatement"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 211,
|
|
|
|
"nonCodeMeta": {
|
|
|
|
"nonCodeNodes": {
|
|
|
|
"0": [
|
|
|
|
{
|
|
|
|
"end": 197,
|
|
|
|
"start": 193,
|
|
|
|
"type": "NonCodeNode",
|
|
|
|
"value": {
|
|
|
|
"type": "newLine"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"startNodes": []
|
|
|
|
},
|
|
|
|
"start": 22
|
|
|
|
},
|
|
|
|
"end": 211,
|
|
|
|
"params": [
|
|
|
|
{
|
|
|
|
"type": "Parameter",
|
|
|
|
"identifier": {
|
|
|
|
"end": 11,
|
|
|
|
"name": "h",
|
|
|
|
"start": 10,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"optional": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "Parameter",
|
|
|
|
"identifier": {
|
|
|
|
"end": 14,
|
|
|
|
"name": "l",
|
|
|
|
"start": 13,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"optional": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "Parameter",
|
|
|
|
"identifier": {
|
|
|
|
"end": 17,
|
|
|
|
"name": "w",
|
|
|
|
"start": 16,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"optional": false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"start": 9,
|
|
|
|
"type": "FunctionExpression"
|
|
|
|
},
|
|
|
|
"memory": {
|
|
|
|
"environments": [
|
|
|
|
{
|
|
|
|
"bindings": {
|
|
|
|
"HALF_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 180.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"QUARTER_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 90.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"THREE_QUARTER_TURN": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 270.0,
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"ZERO": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 0.0,
|
|
|
|
"__meta": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"parent": null
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"currentEnv": 0,
|
|
|
|
"return": null
|
|
|
|
},
|
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
|
|
|
9,
|
|
|
|
211,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"fnBox": {
|
|
|
|
"type": "Solid",
|
|
|
|
"type": "Solid",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"value": [
|
|
|
|
{
|
|
|
|
"faceId": "[uuid]",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
|
|
|
94,
|
|
|
|
109,
|
|
|
|
0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"type": "extrudePlane"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"faceId": "[uuid]",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
|
|
|
117,
|
|
|
|
132,
|
|
|
|
0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"type": "extrudePlane"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"faceId": "[uuid]",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
|
|
|
140,
|
|
|
|
156,
|
|
|
|
0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"type": "extrudePlane"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"faceId": "[uuid]",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
|
|
|
164,
|
|
|
|
172,
|
|
|
|
0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"type": "extrudePlane"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"sketch": {
|
|
|
|
"type": "Sketch",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"paths": [
|
|
|
|
{
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
|
|
|
94,
|
|
|
|
109,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"from": [
|
|
|
|
0.0,
|
|
|
|
0.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"to": [
|
|
|
|
0.0,
|
|
|
|
6.0
|
|
|
|
],
|
|
|
|
"type": "ToPoint"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
|
|
|
117,
|
|
|
|
132,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"from": [
|
|
|
|
0.0,
|
|
|
|
6.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"to": [
|
|
|
|
10.0,
|
|
|
|
6.0
|
|
|
|
],
|
|
|
|
"type": "ToPoint"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
|
|
|
140,
|
|
|
|
156,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"from": [
|
|
|
|
10.0,
|
|
|
|
6.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"to": [
|
|
|
|
10.0,
|
|
|
|
0.0
|
|
|
|
],
|
|
|
|
"type": "ToPoint"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
|
|
|
164,
|
|
|
|
172,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"from": [
|
|
|
|
10.0,
|
|
|
|
0.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"to": [
|
|
|
|
0.0,
|
|
|
|
0.0
|
|
|
|
],
|
|
|
|
"type": "ToPoint"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"on": {
|
|
|
|
"type": "plane",
|
|
|
|
"id": "[uuid]",
|
|
|
|
"value": "XY",
|
|
|
|
"origin": {
|
|
|
|
"x": 0.0,
|
|
|
|
"y": 0.0,
|
|
|
|
"z": 0.0
|
|
|
|
},
|
|
|
|
"xAxis": {
|
|
|
|
"x": 1.0,
|
|
|
|
"y": 0.0,
|
|
|
|
"z": 0.0
|
|
|
|
},
|
|
|
|
"yAxis": {
|
|
|
|
"x": 0.0,
|
|
|
|
"y": 1.0,
|
|
|
|
"z": 0.0
|
|
|
|
},
|
|
|
|
"zAxis": {
|
|
|
|
"x": 0.0,
|
|
|
|
"y": 0.0,
|
|
|
|
"z": 1.0
|
|
|
|
},
|
|
|
|
"__meta": []
|
|
|
|
},
|
|
|
|
"start": {
|
|
|
|
"from": [
|
|
|
|
0.0,
|
|
|
|
0.0
|
|
|
|
],
|
|
|
|
"to": [
|
|
|
|
0.0,
|
|
|
|
0.0
|
|
|
|
],
|
|
|
|
"tag": null,
|
|
|
|
"__geoMeta": {
|
|
|
|
"id": "[uuid]",
|
|
|
|
"sourceRange": [
|
|
|
|
61,
|
|
|
|
86,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
|
|
|
61,
|
|
|
|
86,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"height": 3.0,
|
|
|
|
"startCapId": "[uuid]",
|
|
|
|
"endCapId": "[uuid]",
|
|
|
|
"__meta": [
|
|
|
|
{
|
|
|
|
"sourceRange": [
|
|
|
|
61,
|
|
|
|
86,
|
|
|
|
0
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"parent": null
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"currentEnv": 0,
|
|
|
|
"return": null
|
|
|
|
}
|