KCL: Convert x/y lines to use keyword arguments (#5615)
Previously, `xLine`, `xLineTo`, `yLine` and `yLineTo` used positional arguments. Now: - `xLineTo` and `yLineTo` have been removed - `xLine` and `yLine` both use keyword arguments: - `length`, optional (i.e. a relative distance along the X or Y axis) - `endAbsolute` optional (i.e. an absolute point along the X or Y axis) - `tag` optional - Exactly one of `length` or `endAbsolute` must be given. Not both, not neither. For example: ``` // Old way |> xLine(6.04, %) |> yLineTo(20, %, $base) // New way |> xLine(length = 6.04) |> yLine(endAbsolute = 20, tag = $base) ``` This also improves some of the general-purpose keyword arguments code in modeling app's TS codebase.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Artifact graph flowchart ssi_pattern.kcl
|
||||
extension: md
|
||||
snapshot_kind: binary
|
||||
|
||||
@ -2,21 +2,21 @@
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[37, 71, 0]"]
|
||||
3["Segment<br>[77, 91, 0]"]
|
||||
4["Segment<br>[97, 122, 0]"]
|
||||
5["Segment<br>[128, 161, 0]"]
|
||||
6["Segment<br>[167, 183, 0]"]
|
||||
7["Segment<br>[189, 259, 0]"]
|
||||
8["Segment<br>[265, 272, 0]"]
|
||||
3["Segment<br>[77, 97, 0]"]
|
||||
4["Segment<br>[103, 128, 0]"]
|
||||
5["Segment<br>[134, 167, 0]"]
|
||||
6["Segment<br>[173, 195, 0]"]
|
||||
7["Segment<br>[201, 271, 0]"]
|
||||
8["Segment<br>[277, 284, 0]"]
|
||||
9[Solid2d]
|
||||
end
|
||||
subgraph path28 [Path]
|
||||
28["Path<br>[370, 414, 0]"]
|
||||
29["Segment<br>[370, 414, 0]"]
|
||||
28["Path<br>[382, 426, 0]"]
|
||||
29["Segment<br>[382, 426, 0]"]
|
||||
30[Solid2d]
|
||||
end
|
||||
1["Plane<br>[12, 31, 0]"]
|
||||
10["Sweep Extrusion<br>[287, 318, 0]"]
|
||||
10["Sweep Extrusion<br>[299, 330, 0]"]
|
||||
11[Wall]
|
||||
12[Wall]
|
||||
13[Wall]
|
||||
@ -34,11 +34,11 @@ flowchart LR
|
||||
25["SweepEdge Adjacent"]
|
||||
26["SweepEdge Opposite"]
|
||||
27["SweepEdge Adjacent"]
|
||||
31["Sweep Extrusion<br>[604, 625, 0]"]
|
||||
31["Sweep Extrusion<br>[616, 637, 0]"]
|
||||
32[Wall]
|
||||
33["SweepEdge Opposite"]
|
||||
34["SweepEdge Adjacent"]
|
||||
35["StartSketchOnFace<br>[332, 364, 0]"]
|
||||
35["StartSketchOnFace<br>[344, 376, 0]"]
|
||||
1 --- 2
|
||||
2 --- 3
|
||||
2 --- 4
|
||||
|
||||
@ -7,7 +7,7 @@ description: Result of parsing ssi_pattern.kcl
|
||||
"body": [
|
||||
{
|
||||
"declaration": {
|
||||
"end": 272,
|
||||
"end": 284,
|
||||
"id": {
|
||||
"end": 9,
|
||||
"name": "sketch001",
|
||||
@ -105,21 +105,24 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 87,
|
||||
"raw": "10.2",
|
||||
"start": 83,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 10.2,
|
||||
"suffix": "None"
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 89,
|
||||
"name": "length",
|
||||
"start": 83,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 96,
|
||||
"raw": "10.2",
|
||||
"start": 92,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 10.2,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 90,
|
||||
"start": 89,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
@ -128,27 +131,28 @@ description: Result of parsing ssi_pattern.kcl
|
||||
"start": 77,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 91,
|
||||
"end": 97,
|
||||
"start": 77,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 105,
|
||||
"end": 111,
|
||||
"name": "end",
|
||||
"start": 102,
|
||||
"start": 108,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 113,
|
||||
"end": 119,
|
||||
"raw": "0.54",
|
||||
"start": 109,
|
||||
"start": 115,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -158,9 +162,9 @@ description: Result of parsing ssi_pattern.kcl
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"end": 120,
|
||||
"end": 126,
|
||||
"raw": "0.03",
|
||||
"start": 116,
|
||||
"start": 122,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -168,28 +172,28 @@ description: Result of parsing ssi_pattern.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 120,
|
||||
"end": 126,
|
||||
"operator": "-",
|
||||
"start": 115,
|
||||
"start": 121,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
],
|
||||
"end": 121,
|
||||
"start": 108,
|
||||
"end": 127,
|
||||
"start": 114,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 101,
|
||||
"end": 107,
|
||||
"name": "line",
|
||||
"start": 97,
|
||||
"start": 103,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 122,
|
||||
"start": 97,
|
||||
"end": 128,
|
||||
"start": 103,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
@ -199,9 +203,9 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"end": 149,
|
||||
"end": 155,
|
||||
"raw": "20.4",
|
||||
"start": 145,
|
||||
"start": 151,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -210,9 +214,9 @@ description: Result of parsing ssi_pattern.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 156,
|
||||
"end": 162,
|
||||
"raw": "14.61",
|
||||
"start": 151,
|
||||
"start": 157,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -221,64 +225,26 @@ description: Result of parsing ssi_pattern.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 157,
|
||||
"start": 144,
|
||||
"end": 163,
|
||||
"start": 150,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"end": 160,
|
||||
"start": 159,
|
||||
"end": 166,
|
||||
"start": 165,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 143,
|
||||
"end": 149,
|
||||
"name": "tangentialArcTo",
|
||||
"start": 128,
|
||||
"start": 134,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 161,
|
||||
"start": 128,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"argument": {
|
||||
"end": 179,
|
||||
"raw": "26.76",
|
||||
"start": 174,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 26.76,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 179,
|
||||
"operator": "-",
|
||||
"start": 173,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
},
|
||||
{
|
||||
"end": 182,
|
||||
"start": 181,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 172,
|
||||
"name": "yLine",
|
||||
"start": 167,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 183,
|
||||
"start": 167,
|
||||
"end": 167,
|
||||
"start": 134,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
@ -287,9 +253,51 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 205,
|
||||
"end": 185,
|
||||
"name": "length",
|
||||
"start": 179,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"argument": {
|
||||
"end": 194,
|
||||
"raw": "26.76",
|
||||
"start": 189,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 26.76,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 194,
|
||||
"operator": "-",
|
||||
"start": 188,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 178,
|
||||
"name": "yLine",
|
||||
"start": 173,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 195,
|
||||
"start": 173,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 217,
|
||||
"name": "endAbsolute",
|
||||
"start": 194,
|
||||
"start": 206,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
@ -297,46 +305,46 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 224,
|
||||
"start": 223,
|
||||
"end": 236,
|
||||
"start": 235,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 222,
|
||||
"end": 234,
|
||||
"name": "profileStartX",
|
||||
"start": 209,
|
||||
"start": 221,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 225,
|
||||
"start": 209,
|
||||
"end": 237,
|
||||
"start": 221,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 242,
|
||||
"start": 241,
|
||||
"end": 254,
|
||||
"start": 253,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 240,
|
||||
"end": 252,
|
||||
"name": "profileStartY",
|
||||
"start": 227,
|
||||
"start": 239,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 243,
|
||||
"start": 227,
|
||||
"end": 255,
|
||||
"start": 239,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"end": 244,
|
||||
"start": 208,
|
||||
"end": 256,
|
||||
"start": 220,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
@ -344,14 +352,14 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 249,
|
||||
"end": 261,
|
||||
"name": "tag",
|
||||
"start": 246,
|
||||
"start": 258,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 258,
|
||||
"start": 252,
|
||||
"end": 270,
|
||||
"start": 264,
|
||||
"type": "TagDeclarator",
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
@ -359,13 +367,13 @@ description: Result of parsing ssi_pattern.kcl
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 193,
|
||||
"end": 205,
|
||||
"name": "line",
|
||||
"start": 189,
|
||||
"start": 201,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 259,
|
||||
"start": 189,
|
||||
"end": 271,
|
||||
"start": 201,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
@ -373,18 +381,18 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"arguments": [],
|
||||
"callee": {
|
||||
"end": 270,
|
||||
"end": 282,
|
||||
"name": "close",
|
||||
"start": 265,
|
||||
"start": 277,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 272,
|
||||
"start": 265,
|
||||
"end": 284,
|
||||
"start": 277,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"end": 272,
|
||||
"end": 284,
|
||||
"start": 12,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
@ -392,7 +400,7 @@ description: Result of parsing ssi_pattern.kcl
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 272,
|
||||
"end": 284,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -400,11 +408,11 @@ description: Result of parsing ssi_pattern.kcl
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 318,
|
||||
"end": 330,
|
||||
"id": {
|
||||
"end": 284,
|
||||
"end": 296,
|
||||
"name": "extrude001",
|
||||
"start": 274,
|
||||
"start": 286,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
@ -412,15 +420,15 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 312,
|
||||
"end": 324,
|
||||
"name": "length",
|
||||
"start": 306,
|
||||
"start": 318,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 317,
|
||||
"end": 329,
|
||||
"raw": "50",
|
||||
"start": 315,
|
||||
"start": 327,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -431,39 +439,39 @@ description: Result of parsing ssi_pattern.kcl
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 294,
|
||||
"end": 306,
|
||||
"name": "extrude",
|
||||
"start": 287,
|
||||
"start": 299,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 318,
|
||||
"start": 287,
|
||||
"end": 330,
|
||||
"start": 299,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"end": 304,
|
||||
"end": 316,
|
||||
"name": "sketch001",
|
||||
"start": 295,
|
||||
"start": 307,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
}
|
||||
},
|
||||
"start": 274,
|
||||
"start": 286,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 318,
|
||||
"end": 330,
|
||||
"kind": "const",
|
||||
"start": 274,
|
||||
"start": 286,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 625,
|
||||
"end": 637,
|
||||
"id": {
|
||||
"end": 329,
|
||||
"end": 341,
|
||||
"name": "sketch002",
|
||||
"start": 320,
|
||||
"start": 332,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
@ -471,28 +479,28 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 356,
|
||||
"end": 368,
|
||||
"name": "extrude001",
|
||||
"start": 346,
|
||||
"start": 358,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
{
|
||||
"end": 363,
|
||||
"end": 375,
|
||||
"name": "seg01",
|
||||
"start": 358,
|
||||
"start": 370,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 345,
|
||||
"end": 357,
|
||||
"name": "startSketchOn",
|
||||
"start": 332,
|
||||
"start": 344,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 364,
|
||||
"start": 332,
|
||||
"end": 376,
|
||||
"start": 344,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
@ -501,18 +509,18 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 383,
|
||||
"end": 395,
|
||||
"name": "center",
|
||||
"start": 377,
|
||||
"start": 389,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"argument": {
|
||||
"end": 392,
|
||||
"end": 404,
|
||||
"raw": "2.08",
|
||||
"start": 388,
|
||||
"start": 400,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -520,16 +528,16 @@ description: Result of parsing ssi_pattern.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 392,
|
||||
"end": 404,
|
||||
"operator": "-",
|
||||
"start": 387,
|
||||
"start": 399,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
},
|
||||
{
|
||||
"end": 398,
|
||||
"end": 410,
|
||||
"raw": "47.7",
|
||||
"start": 394,
|
||||
"start": 406,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -538,8 +546,8 @@ description: Result of parsing ssi_pattern.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 399,
|
||||
"start": 386,
|
||||
"end": 411,
|
||||
"start": 398,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
@ -547,15 +555,15 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 407,
|
||||
"end": 419,
|
||||
"name": "radius",
|
||||
"start": 401,
|
||||
"start": 413,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 413,
|
||||
"end": 425,
|
||||
"raw": "1.4",
|
||||
"start": 410,
|
||||
"start": 422,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -566,13 +574,13 @@ description: Result of parsing ssi_pattern.kcl
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 376,
|
||||
"end": 388,
|
||||
"name": "circle",
|
||||
"start": 370,
|
||||
"start": 382,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 414,
|
||||
"start": 370,
|
||||
"end": 426,
|
||||
"start": 382,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
@ -582,35 +590,15 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 445,
|
||||
"end": 457,
|
||||
"name": "instances",
|
||||
"start": 436,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 449,
|
||||
"raw": "5",
|
||||
"start": 448,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 459,
|
||||
"name": "distance",
|
||||
"start": 451,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 463,
|
||||
"end": 461,
|
||||
"raw": "5",
|
||||
"start": 462,
|
||||
"start": 460,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -622,17 +610,37 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 469,
|
||||
"end": 471,
|
||||
"name": "distance",
|
||||
"start": 463,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 475,
|
||||
"raw": "5",
|
||||
"start": 474,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 481,
|
||||
"name": "axis",
|
||||
"start": 465,
|
||||
"start": 477,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 474,
|
||||
"end": 486,
|
||||
"raw": "1",
|
||||
"start": 473,
|
||||
"start": 485,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -641,9 +649,9 @@ description: Result of parsing ssi_pattern.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 477,
|
||||
"end": 489,
|
||||
"raw": "0",
|
||||
"start": 476,
|
||||
"start": 488,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -652,21 +660,21 @@ description: Result of parsing ssi_pattern.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 478,
|
||||
"start": 472,
|
||||
"end": 490,
|
||||
"start": 484,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 435,
|
||||
"end": 447,
|
||||
"name": "patternLinear2d",
|
||||
"start": 420,
|
||||
"start": 432,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 479,
|
||||
"start": 420,
|
||||
"end": 491,
|
||||
"start": 432,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
@ -676,15 +684,15 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 563,
|
||||
"end": 575,
|
||||
"name": "instances",
|
||||
"start": 554,
|
||||
"start": 566,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 567,
|
||||
"end": 579,
|
||||
"raw": "6",
|
||||
"start": 566,
|
||||
"start": 578,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -696,15 +704,15 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 577,
|
||||
"end": 589,
|
||||
"name": "distance",
|
||||
"start": 569,
|
||||
"start": 581,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 581,
|
||||
"end": 593,
|
||||
"raw": "4",
|
||||
"start": 580,
|
||||
"start": 592,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -716,17 +724,17 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 587,
|
||||
"end": 599,
|
||||
"name": "axis",
|
||||
"start": 583,
|
||||
"start": 595,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 592,
|
||||
"end": 604,
|
||||
"raw": "0",
|
||||
"start": 591,
|
||||
"start": 603,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -736,9 +744,9 @@ description: Result of parsing ssi_pattern.kcl
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"end": 596,
|
||||
"end": 608,
|
||||
"raw": "1",
|
||||
"start": 595,
|
||||
"start": 607,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -746,28 +754,28 @@ description: Result of parsing ssi_pattern.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 596,
|
||||
"end": 608,
|
||||
"operator": "-",
|
||||
"start": 594,
|
||||
"start": 606,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
],
|
||||
"end": 597,
|
||||
"start": 590,
|
||||
"end": 609,
|
||||
"start": 602,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 553,
|
||||
"end": 565,
|
||||
"name": "patternLinear2d",
|
||||
"start": 538,
|
||||
"start": 550,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 598,
|
||||
"start": 538,
|
||||
"end": 610,
|
||||
"start": 550,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
@ -777,16 +785,16 @@ description: Result of parsing ssi_pattern.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 618,
|
||||
"end": 630,
|
||||
"name": "length",
|
||||
"start": 612,
|
||||
"start": 624,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"argument": {
|
||||
"end": 624,
|
||||
"end": 636,
|
||||
"raw": "40",
|
||||
"start": 622,
|
||||
"start": 634,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -794,34 +802,34 @@ description: Result of parsing ssi_pattern.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 624,
|
||||
"end": 636,
|
||||
"operator": "-",
|
||||
"start": 621,
|
||||
"start": 633,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 611,
|
||||
"end": 623,
|
||||
"name": "extrude",
|
||||
"start": 604,
|
||||
"start": 616,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 625,
|
||||
"start": 604,
|
||||
"end": 637,
|
||||
"start": 616,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"end": 625,
|
||||
"end": 637,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"2": [
|
||||
{
|
||||
"end": 532,
|
||||
"start": 481,
|
||||
"end": 544,
|
||||
"start": 493,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "blockComment",
|
||||
@ -833,27 +841,27 @@ description: Result of parsing ssi_pattern.kcl
|
||||
},
|
||||
"startNodes": []
|
||||
},
|
||||
"start": 332,
|
||||
"start": 344,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
},
|
||||
"start": 320,
|
||||
"start": 332,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 625,
|
||||
"end": 637,
|
||||
"kind": "const",
|
||||
"start": 320,
|
||||
"start": 332,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"end": 626,
|
||||
"end": 638,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"0": [
|
||||
{
|
||||
"end": 274,
|
||||
"start": 272,
|
||||
"end": 286,
|
||||
"start": 284,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLine"
|
||||
@ -862,8 +870,8 @@ description: Result of parsing ssi_pattern.kcl
|
||||
],
|
||||
"1": [
|
||||
{
|
||||
"end": 320,
|
||||
"start": 318,
|
||||
"end": 332,
|
||||
"start": 330,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLine"
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
sketch001 = startSketchOn('XZ')
|
||||
|> startProfileAt([-4.35, -12.26], %)
|
||||
|> yLine(10.2, %)
|
||||
|> yLine(length = 10.2)
|
||||
|> line(end = [0.54, -0.03])
|
||||
|> tangentialArcTo([20.4, 14.61], %)
|
||||
|> yLine(-26.76, %)
|
||||
|> yLine(length = -26.76)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg01)
|
||||
|> close()
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Operations executed ssi_pattern.kcl
|
||||
---
|
||||
[
|
||||
@ -43,16 +43,16 @@ description: Operations executed ssi_pattern.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
315,
|
||||
317,
|
||||
327,
|
||||
329,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
287,
|
||||
318,
|
||||
299,
|
||||
330,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -64,8 +64,8 @@ description: Operations executed ssi_pattern.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
295,
|
||||
304,
|
||||
307,
|
||||
316,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -80,8 +80,8 @@ description: Operations executed ssi_pattern.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
346,
|
||||
356,
|
||||
358,
|
||||
368,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -92,16 +92,16 @@ description: Operations executed ssi_pattern.kcl
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": [
|
||||
358,
|
||||
363,
|
||||
370,
|
||||
375,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "startSketchOn",
|
||||
"sourceRange": [
|
||||
332,
|
||||
364,
|
||||
344,
|
||||
376,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -124,16 +124,16 @@ description: Operations executed ssi_pattern.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
621,
|
||||
624,
|
||||
633,
|
||||
636,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
604,
|
||||
625,
|
||||
616,
|
||||
637,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user