2025-02-25 23:04:10 -05:00
|
|
|
---
|
|
|
|
source: kcl/src/simulation_tests.rs
|
|
|
|
description: Result of parsing revolve_about_edge.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"declaration": {
|
|
|
|
"end": 107,
|
|
|
|
"id": {
|
|
|
|
"end": 9,
|
|
|
|
"name": "sketch001",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 30,
|
|
|
|
"raw": "'XY'",
|
|
|
|
"start": 26,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": "XY"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 25,
|
|
|
|
"name": "startSketchOn",
|
|
|
|
"start": 12,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 31,
|
|
|
|
"start": 12,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"argument": {
|
|
|
|
"end": 56,
|
|
|
|
"raw": "25",
|
|
|
|
"start": 54,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 25.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": 56,
|
|
|
|
"operator": "-",
|
|
|
|
"start": 53,
|
|
|
|
"type": "UnaryExpression",
|
|
|
|
"type": "UnaryExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 60,
|
|
|
|
"raw": "25",
|
|
|
|
"start": 58,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 25.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 61,
|
|
|
|
"start": 52,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 64,
|
|
|
|
"start": 63,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 51,
|
|
|
|
"name": "startProfileAt",
|
|
|
|
"start": 37,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 65,
|
|
|
|
"start": 37,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"argument": {
|
|
|
|
"end": 80,
|
|
|
|
"raw": "50",
|
|
|
|
"start": 78,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 50.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"end": 80,
|
|
|
|
"operator": "-",
|
|
|
|
"start": 77,
|
|
|
|
"type": "UnaryExpression",
|
|
|
|
"type": "UnaryExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 83,
|
|
|
|
"start": 82,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 106,
|
|
|
|
"start": 85,
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"value": "rectangleSegmentB001"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 76,
|
|
|
|
"name": "yLine",
|
|
|
|
"start": 71,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 107,
|
|
|
|
"start": 71,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 107,
|
|
|
|
"start": 12,
|
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
|
|
|
"end": 107,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"declaration": {
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 263,
|
2025-02-25 23:04:10 -05:00
|
|
|
"id": {
|
|
|
|
"end": 117,
|
|
|
|
"name": "sketch002",
|
|
|
|
"start": 108,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 138,
|
|
|
|
"raw": "'XY'",
|
|
|
|
"start": 134,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": "XY"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 133,
|
|
|
|
"name": "startSketchOn",
|
|
|
|
"start": 120,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 139,
|
|
|
|
"start": 120,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "center"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"argument": {
|
|
|
|
"end": 165,
|
|
|
|
"raw": "50",
|
|
|
|
"start": 163,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 50.0,
|
|
|
|
"suffix": "None"
|
2025-02-25 23:04:10 -05:00
|
|
|
}
|
2025-02-28 17:40:01 -08:00
|
|
|
},
|
|
|
|
"end": 165,
|
|
|
|
"operator": "-",
|
|
|
|
"start": 162,
|
|
|
|
"type": "UnaryExpression",
|
|
|
|
"type": "UnaryExpression"
|
2025-02-25 23:04:10 -05:00
|
|
|
},
|
2025-02-28 17:40:01 -08:00
|
|
|
{
|
|
|
|
"end": 168,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 167,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
2025-02-28 17:40:01 -08:00
|
|
|
"value": 0.0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
2025-02-28 17:40:01 -08:00
|
|
|
],
|
|
|
|
"end": 169,
|
|
|
|
"start": 161,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
}
|
2025-02-25 23:04:10 -05:00
|
|
|
},
|
|
|
|
{
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "radius"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"end": 182,
|
|
|
|
"raw": "10",
|
|
|
|
"start": 180,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 10.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
2025-02-25 23:04:10 -05:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 151,
|
|
|
|
"name": "circle",
|
|
|
|
"start": 145,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 183,
|
2025-02-25 23:04:10 -05:00
|
|
|
"start": 145,
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2025-02-25 23:04:10 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 259,
|
2025-02-25 23:04:10 -05:00
|
|
|
"properties": [
|
|
|
|
{
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 216,
|
2025-02-25 23:04:10 -05:00
|
|
|
"key": {
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 211,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "angle",
|
2025-02-28 17:40:01 -08:00
|
|
|
"start": 206,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-02-28 17:40:01 -08:00
|
|
|
"start": 206,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "ObjectProperty",
|
|
|
|
"value": {
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 216,
|
2025-02-25 23:04:10 -05:00
|
|
|
"raw": "90",
|
2025-02-28 17:40:01 -08:00
|
|
|
"start": 214,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 90.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 252,
|
2025-02-25 23:04:10 -05:00
|
|
|
"key": {
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 229,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "axis",
|
2025-02-28 17:40:01 -08:00
|
|
|
"start": 225,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-02-28 17:40:01 -08:00
|
|
|
"start": 225,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "ObjectProperty",
|
|
|
|
"value": {
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 252,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "rectangleSegmentB001",
|
2025-02-28 17:40:01 -08:00
|
|
|
"start": 232,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2025-02-28 17:40:01 -08:00
|
|
|
"start": 197,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "ObjectExpression",
|
|
|
|
"type": "ObjectExpression"
|
|
|
|
},
|
|
|
|
{
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 262,
|
|
|
|
"start": 261,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 196,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "revolve",
|
2025-02-28 17:40:01 -08:00
|
|
|
"start": 189,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 263,
|
|
|
|
"start": 189,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
}
|
|
|
|
],
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 263,
|
2025-02-25 23:04:10 -05:00
|
|
|
"start": 120,
|
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
|
|
|
"start": 108,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 263,
|
2025-02-25 23:04:10 -05:00
|
|
|
"kind": "const",
|
|
|
|
"start": 108,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
}
|
|
|
|
],
|
2025-02-28 17:40:01 -08:00
|
|
|
"end": 264,
|
2025-02-25 23:04:10 -05:00
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|