2024-11-18 16:20:32 -06:00
|
|
|
---
|
2025-03-07 22:07:16 -06:00
|
|
|
source: kcl-lib/src/simulation_tests.rs
|
2024-11-18 16:20:32 -06:00
|
|
|
description: Result of parsing tan_arc_x_line.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"id": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"name": "startX",
|
2024-11-18 16:20:32 -06:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"raw": "0",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"kind": "const",
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"id": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"name": "startY",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"raw": "0",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"kind": "const",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"id": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"name": "angleOffset",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"raw": "135",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 135.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"kind": "const",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"id": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"name": "r",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"raw": "1",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 1.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"kind": "const",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"id": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"name": "angleStart",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"raw": "110",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 110.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"kind": "const",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"expression": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"callee": {
|
2025-03-24 20:58:55 +13:00
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"end": 0,
|
|
|
|
"name": "startSketchOn",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"type": "Name"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-05-02 16:08:12 -05:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": {
|
|
|
|
"abs_path": false,
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "XY",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
|
|
|
"start": 0,
|
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-04-25 16:01:35 -05:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "at",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"end": 0,
|
2025-04-25 16:01:35 -05:00
|
|
|
"name": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "startX",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
2025-03-24 20:58:55 +13:00
|
|
|
"start": 0,
|
2025-04-25 16:01:35 -05:00
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
2025-03-24 20:58:55 +13:00
|
|
|
},
|
2025-04-25 16:01:35 -05:00
|
|
|
{
|
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"end": 0,
|
2025-04-25 16:01:35 -05:00
|
|
|
"name": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "startY",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
2025-03-24 20:58:55 +13:00
|
|
|
"start": 0,
|
2025-04-25 16:01:35 -05:00
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-24 20:58:55 +13:00
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"end": 0,
|
2025-04-25 16:01:35 -05:00
|
|
|
"name": "startProfile",
|
2025-03-24 20:58:55 +13:00
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"type": "Name"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-04-25 16:01:35 -05:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
KCL: Angled line should use keyword args (#5803)
We continue migrating KCL stdlib functions to use keyword arguments. Next up is the `angledLine` family of functions (except `angledLineThatIntersects, which will be a quick follow-up).
Before vs. after:
`angledLine({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, length = 3, tag = $edge)`
`angledLineOfXLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthX = 3, tag = $edge)`
`angledLineOfYLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthY = 3, tag = $edge)`
`angledLineToX({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteX = 3, tag = $edge)`
`angledLineToY({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteY = 3, tag = $edge)`
2025-04-09 14:55:15 -05:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "angle",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"abs_path": false,
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
KCL: Angled line should use keyword args (#5803)
We continue migrating KCL stdlib functions to use keyword arguments. Next up is the `angledLine` family of functions (except `angledLineThatIntersects, which will be a quick follow-up).
Before vs. after:
`angledLine({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, length = 3, tag = $edge)`
`angledLineOfXLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthX = 3, tag = $edge)`
`angledLineOfYLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthY = 3, tag = $edge)`
`angledLineToX({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteX = 3, tag = $edge)`
`angledLineToY({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteY = 3, tag = $edge)`
2025-04-09 14:55:15 -05:00
|
|
|
"name": "angleStart",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
KCL: Angled line should use keyword args (#5803)
We continue migrating KCL stdlib functions to use keyword arguments. Next up is the `angledLine` family of functions (except `angledLineThatIntersects, which will be a quick follow-up).
Before vs. after:
`angledLine({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, length = 3, tag = $edge)`
`angledLineOfXLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthX = 3, tag = $edge)`
`angledLineOfYLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthY = 3, tag = $edge)`
`angledLineToX({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteX = 3, tag = $edge)`
`angledLineToY({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteY = 3, tag = $edge)`
2025-04-09 14:55:15 -05:00
|
|
|
"type": "Identifier"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
KCL: Angled line should use keyword args (#5803)
We continue migrating KCL stdlib functions to use keyword arguments. Next up is the `angledLine` family of functions (except `angledLineThatIntersects, which will be a quick follow-up).
Before vs. after:
`angledLine({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, length = 3, tag = $edge)`
`angledLineOfXLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthX = 3, tag = $edge)`
`angledLineOfYLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthY = 3, tag = $edge)`
`angledLineToX({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteX = 3, tag = $edge)`
`angledLineToY({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteY = 3, tag = $edge)`
2025-04-09 14:55:15 -05:00
|
|
|
"path": [],
|
|
|
|
"start": 0,
|
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
KCL: Angled line should use keyword args (#5803)
We continue migrating KCL stdlib functions to use keyword arguments. Next up is the `angledLine` family of functions (except `angledLineThatIntersects, which will be a quick follow-up).
Before vs. after:
`angledLine({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, length = 3, tag = $edge)`
`angledLineOfXLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthX = 3, tag = $edge)`
`angledLineOfYLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthY = 3, tag = $edge)`
`angledLineToX({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteX = 3, tag = $edge)`
`angledLineToY({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteY = 3, tag = $edge)`
2025-04-09 14:55:15 -05:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "length",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"raw": ".000001",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 0.000001,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-24 20:58:55 +13:00
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"end": 0,
|
|
|
|
"name": "angledLine",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"type": "Name"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
KCL: Angled line should use keyword args (#5803)
We continue migrating KCL stdlib functions to use keyword arguments. Next up is the `angledLine` family of functions (except `angledLineThatIntersects, which will be a quick follow-up).
Before vs. after:
`angledLine({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, length = 3, tag = $edge)`
`angledLineOfXLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthX = 3, tag = $edge)`
`angledLineOfYLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthY = 3, tag = $edge)`
`angledLineToX({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteX = 3, tag = $edge)`
`angledLineToY({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteY = 3, tag = $edge)`
2025-04-09 14:55:15 -05:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "angle",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"abs_path": false,
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"name": "angleOffset",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "Identifier"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2025-04-11 14:17:20 -04:00
|
|
|
"path": [],
|
|
|
|
"start": 0,
|
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "radius",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"abs_path": false,
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"name": "r",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
|
|
|
"start": 0,
|
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "tag",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"value": "arc1"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-24 20:58:55 +13:00
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"end": 0,
|
|
|
|
"name": "tangentialArc",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"type": "Name"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "angle",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"abs_path": false,
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"name": "angleOffset",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
|
|
|
"start": 0,
|
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "radius",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"left": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"raw": "0.5",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-18 16:20:32 -06:00
|
|
|
"value": {
|
2025-04-11 14:17:20 -04:00
|
|
|
"value": 0.5,
|
|
|
|
"suffix": "None"
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
},
|
2025-04-11 14:17:20 -04:00
|
|
|
"operator": "*",
|
|
|
|
"right": {
|
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"name": "r",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-04-11 14:17:20 -04:00
|
|
|
"path": [],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "BinaryExpression",
|
|
|
|
"type": "BinaryExpression"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "tag",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"value": "arc2"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-24 20:58:55 +13:00
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"end": 0,
|
|
|
|
"name": "tangentialArc",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"type": "Name"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "angle",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"argument": {
|
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"name": "angleOffset",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-04-11 14:17:20 -04:00
|
|
|
"path": [],
|
|
|
|
"start": 0,
|
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
|
|
|
},
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"operator": "-",
|
|
|
|
"start": 0,
|
|
|
|
"type": "UnaryExpression",
|
|
|
|
"type": "UnaryExpression"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "radius",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"left": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"raw": "0.5",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-18 16:20:32 -06:00
|
|
|
"value": {
|
2025-04-11 14:17:20 -04:00
|
|
|
"value": 0.5,
|
|
|
|
"suffix": "None"
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
},
|
2025-04-11 14:17:20 -04:00
|
|
|
"operator": "*",
|
|
|
|
"right": {
|
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"name": "r",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-04-11 14:17:20 -04:00
|
|
|
"path": [],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "Name",
|
|
|
|
"type": "Name"
|
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "BinaryExpression",
|
|
|
|
"type": "BinaryExpression"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"name": "tag",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"commentStart": 0,
|
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"value": "arc3"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-24 20:58:55 +13:00
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"end": 0,
|
|
|
|
"name": "tangentialArc",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"type": "Name"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-04-11 14:17:20 -04:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"name": "endAbsolute",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"raw": "1",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 1.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2025-01-22 08:29:30 +13:00
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-24 20:58:55 +13:00
|
|
|
"abs_path": false,
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"name": {
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"end": 0,
|
|
|
|
"name": "xLine",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"path": [],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-24 20:58:55 +13:00
|
|
|
"type": "Name"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
],
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "ExpressionStatement",
|
|
|
|
"type": "ExpressionStatement"
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"nonCodeMeta": {
|
|
|
|
"nonCodeNodes": {
|
|
|
|
"4": [
|
|
|
|
{
|
2025-04-07 17:42:15 +12:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "NonCodeNode",
|
|
|
|
"value": {
|
|
|
|
"type": "newLine"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"startNodes": []
|
|
|
|
},
|
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|