Move the wasm lib, and cleanup rust directory and all references (#5585)
* git mv src/wasm-lib rust Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv wasm-lib to workspace Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv kcl-lib Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv derive docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * resolve file paths Signed-off-by: Jess Frazelle <github@jessfraz.com> * clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * move more shit Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix more paths Signed-off-by: Jess Frazelle <github@jessfraz.com> * make yarn build:wasm work Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix scripts Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * better references Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix cargo ci Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix reference Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix more ci Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * cargo sort Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix script Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix a dep Signed-off-by: Jess Frazelle <github@jessfraz.com> * sort Signed-off-by: Jess Frazelle <github@jessfraz.com> * remove unused deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * Revert "remove unused deps" This reverts commit fbabdb062e275fd5cbc1476f8480a1afee15d972. * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * deps; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
4535
rust/kcl-lib/tests/ssi_pattern/artifact_commands.snap
Normal file
4535
rust/kcl-lib/tests/ssi_pattern/artifact_commands.snap
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,6 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Artifact graph flowchart ssi_pattern.kcl
|
||||
extension: md
|
||||
snapshot_kind: binary
|
||||
---
|
||||
@ -0,0 +1,94 @@
|
||||
```mermaid
|
||||
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]"]
|
||||
9[Solid2d]
|
||||
end
|
||||
subgraph path28 [Path]
|
||||
28["Path<br>[370, 414, 0]"]
|
||||
29["Segment<br>[370, 414, 0]"]
|
||||
30[Solid2d]
|
||||
end
|
||||
1["Plane<br>[12, 31, 0]"]
|
||||
10["Sweep Extrusion<br>[287, 318, 0]"]
|
||||
11[Wall]
|
||||
12[Wall]
|
||||
13[Wall]
|
||||
14[Wall]
|
||||
15[Wall]
|
||||
16["Cap Start"]
|
||||
17["Cap End"]
|
||||
18["SweepEdge Opposite"]
|
||||
19["SweepEdge Adjacent"]
|
||||
20["SweepEdge Opposite"]
|
||||
21["SweepEdge Adjacent"]
|
||||
22["SweepEdge Opposite"]
|
||||
23["SweepEdge Adjacent"]
|
||||
24["SweepEdge Opposite"]
|
||||
25["SweepEdge Adjacent"]
|
||||
26["SweepEdge Opposite"]
|
||||
27["SweepEdge Adjacent"]
|
||||
31["Sweep Extrusion<br>[604, 625, 0]"]
|
||||
32[Wall]
|
||||
33["SweepEdge Opposite"]
|
||||
34["SweepEdge Adjacent"]
|
||||
35["StartSketchOnFace<br>[332, 364, 0]"]
|
||||
1 --- 2
|
||||
2 --- 3
|
||||
2 --- 4
|
||||
2 --- 5
|
||||
2 --- 6
|
||||
2 --- 7
|
||||
2 --- 8
|
||||
2 ---- 10
|
||||
2 --- 9
|
||||
3 --- 15
|
||||
3 --- 26
|
||||
3 --- 27
|
||||
4 --- 14
|
||||
4 --- 24
|
||||
4 --- 25
|
||||
5 --- 13
|
||||
5 --- 22
|
||||
5 --- 23
|
||||
6 --- 12
|
||||
6 --- 20
|
||||
6 --- 21
|
||||
7 --- 11
|
||||
7 --- 18
|
||||
7 --- 19
|
||||
10 --- 11
|
||||
10 --- 12
|
||||
10 --- 13
|
||||
10 --- 14
|
||||
10 --- 15
|
||||
10 --- 16
|
||||
10 --- 17
|
||||
10 --- 18
|
||||
10 --- 19
|
||||
10 --- 20
|
||||
10 --- 21
|
||||
10 --- 22
|
||||
10 --- 23
|
||||
10 --- 24
|
||||
10 --- 25
|
||||
10 --- 26
|
||||
10 --- 27
|
||||
11 --- 28
|
||||
28 --- 29
|
||||
28 ---- 31
|
||||
28 --- 30
|
||||
29 --- 32
|
||||
29 --- 33
|
||||
29 --- 34
|
||||
31 --- 32
|
||||
31 --- 33
|
||||
31 --- 34
|
||||
11 <--x 35
|
||||
```
|
||||
852
rust/kcl-lib/tests/ssi_pattern/ast.snap
Normal file
852
rust/kcl-lib/tests/ssi_pattern/ast.snap
Normal file
@ -0,0 +1,852 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Result of parsing ssi_pattern.kcl
|
||||
---
|
||||
{
|
||||
"Ok": {
|
||||
"body": [
|
||||
{
|
||||
"declaration": {
|
||||
"end": 272,
|
||||
"id": {
|
||||
"end": 9,
|
||||
"name": "sketch001",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 30,
|
||||
"raw": "'XZ'",
|
||||
"start": 26,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XZ"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 25,
|
||||
"name": "startSketchOn",
|
||||
"start": 12,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 31,
|
||||
"start": 12,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"argument": {
|
||||
"end": 58,
|
||||
"raw": "4.35",
|
||||
"start": 54,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 4.35,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 58,
|
||||
"operator": "-",
|
||||
"start": 53,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"end": 66,
|
||||
"raw": "12.26",
|
||||
"start": 61,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 12.26,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 66,
|
||||
"operator": "-",
|
||||
"start": 60,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
],
|
||||
"end": 67,
|
||||
"start": 52,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"end": 70,
|
||||
"start": 69,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 51,
|
||||
"name": "startProfileAt",
|
||||
"start": 37,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 71,
|
||||
"start": 37,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 87,
|
||||
"raw": "10.2",
|
||||
"start": 83,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 10.2,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 90,
|
||||
"start": 89,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 82,
|
||||
"name": "yLine",
|
||||
"start": 77,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 91,
|
||||
"start": 77,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "end"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 113,
|
||||
"raw": "0.54",
|
||||
"start": 109,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.54,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"end": 120,
|
||||
"raw": "0.03",
|
||||
"start": 116,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.03,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 120,
|
||||
"operator": "-",
|
||||
"start": 115,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
],
|
||||
"end": 121,
|
||||
"start": 108,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 101,
|
||||
"name": "line",
|
||||
"start": 97,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 122,
|
||||
"start": 97,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"end": 149,
|
||||
"raw": "20.4",
|
||||
"start": 145,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 20.4,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 156,
|
||||
"raw": "14.61",
|
||||
"start": 151,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 14.61,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 157,
|
||||
"start": 144,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"end": 160,
|
||||
"start": 159,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 143,
|
||||
"name": "tangentialArcTo",
|
||||
"start": 128,
|
||||
"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,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "endAbsolute"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 224,
|
||||
"start": 223,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 222,
|
||||
"name": "profileStartX",
|
||||
"start": 209,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 225,
|
||||
"start": 209,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 242,
|
||||
"start": 241,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 240,
|
||||
"name": "profileStartY",
|
||||
"start": 227,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 243,
|
||||
"start": 227,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"end": 244,
|
||||
"start": 208,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "tag"
|
||||
},
|
||||
"arg": {
|
||||
"end": 258,
|
||||
"start": 252,
|
||||
"type": "TagDeclarator",
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 193,
|
||||
"name": "line",
|
||||
"start": 189,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 259,
|
||||
"start": 189,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [],
|
||||
"callee": {
|
||||
"end": 270,
|
||||
"name": "close",
|
||||
"start": 265,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 272,
|
||||
"start": 265,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"end": 272,
|
||||
"start": 12,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
},
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 272,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 318,
|
||||
"id": {
|
||||
"end": 284,
|
||||
"name": "extrude001",
|
||||
"start": 274,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "length"
|
||||
},
|
||||
"arg": {
|
||||
"end": 317,
|
||||
"raw": "50",
|
||||
"start": 315,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 50.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 294,
|
||||
"name": "extrude",
|
||||
"start": 287,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 318,
|
||||
"start": 287,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"end": 304,
|
||||
"name": "sketch001",
|
||||
"start": 295,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
}
|
||||
},
|
||||
"start": 274,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 318,
|
||||
"kind": "const",
|
||||
"start": 274,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 625,
|
||||
"id": {
|
||||
"end": 329,
|
||||
"name": "sketch002",
|
||||
"start": 320,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 356,
|
||||
"name": "extrude001",
|
||||
"start": 346,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
{
|
||||
"end": 363,
|
||||
"name": "seg01",
|
||||
"start": 358,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 345,
|
||||
"name": "startSketchOn",
|
||||
"start": 332,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 364,
|
||||
"start": 332,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "center"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"argument": {
|
||||
"end": 392,
|
||||
"raw": "2.08",
|
||||
"start": 388,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 2.08,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 392,
|
||||
"operator": "-",
|
||||
"start": 387,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
},
|
||||
{
|
||||
"end": 398,
|
||||
"raw": "47.7",
|
||||
"start": 394,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 47.7,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 399,
|
||||
"start": 386,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "radius"
|
||||
},
|
||||
"arg": {
|
||||
"end": 413,
|
||||
"raw": "1.4",
|
||||
"start": 410,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 1.4,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 376,
|
||||
"name": "circle",
|
||||
"start": 370,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 414,
|
||||
"start": 370,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "instances"
|
||||
},
|
||||
"arg": {
|
||||
"end": 449,
|
||||
"raw": "5",
|
||||
"start": 448,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "distance"
|
||||
},
|
||||
"arg": {
|
||||
"end": 463,
|
||||
"raw": "5",
|
||||
"start": 462,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "axis"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 474,
|
||||
"raw": "1",
|
||||
"start": 473,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 1.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 477,
|
||||
"raw": "0",
|
||||
"start": 476,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 478,
|
||||
"start": 472,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 435,
|
||||
"name": "patternLinear2d",
|
||||
"start": 420,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 479,
|
||||
"start": 420,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "instances"
|
||||
},
|
||||
"arg": {
|
||||
"end": 567,
|
||||
"raw": "6",
|
||||
"start": 566,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 6.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "distance"
|
||||
},
|
||||
"arg": {
|
||||
"end": 581,
|
||||
"raw": "4",
|
||||
"start": 580,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 4.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "axis"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 592,
|
||||
"raw": "0",
|
||||
"start": 591,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"end": 596,
|
||||
"raw": "1",
|
||||
"start": 595,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 1.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 596,
|
||||
"operator": "-",
|
||||
"start": 594,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
],
|
||||
"end": 597,
|
||||
"start": 590,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 553,
|
||||
"name": "patternLinear2d",
|
||||
"start": 538,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 598,
|
||||
"start": 538,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"type": "Identifier",
|
||||
"name": "length"
|
||||
},
|
||||
"arg": {
|
||||
"argument": {
|
||||
"end": 624,
|
||||
"raw": "40",
|
||||
"start": 622,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 40.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 624,
|
||||
"operator": "-",
|
||||
"start": 621,
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 611,
|
||||
"name": "extrude",
|
||||
"start": 604,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 625,
|
||||
"start": 604,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"end": 625,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"2": [
|
||||
{
|
||||
"end": 532,
|
||||
"start": 481,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "blockComment",
|
||||
"value": "Instances was reduced from 12 to speed this up.",
|
||||
"style": "line"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"startNodes": []
|
||||
},
|
||||
"start": 332,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
},
|
||||
"start": 320,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 625,
|
||||
"kind": "const",
|
||||
"start": 320,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"end": 626,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"0": [
|
||||
{
|
||||
"end": 274,
|
||||
"start": 272,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLine"
|
||||
}
|
||||
}
|
||||
],
|
||||
"1": [
|
||||
{
|
||||
"end": 320,
|
||||
"start": 318,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLine"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"startNodes": []
|
||||
},
|
||||
"start": 0
|
||||
}
|
||||
}
|
||||
17
rust/kcl-lib/tests/ssi_pattern/input.kcl
Normal file
17
rust/kcl-lib/tests/ssi_pattern/input.kcl
Normal file
@ -0,0 +1,17 @@
|
||||
sketch001 = startSketchOn('XZ')
|
||||
|> startProfileAt([-4.35, -12.26], %)
|
||||
|> yLine(10.2, %)
|
||||
|> line(end = [0.54, -0.03])
|
||||
|> tangentialArcTo([20.4, 14.61], %)
|
||||
|> yLine(-26.76, %)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg01)
|
||||
|> close()
|
||||
|
||||
extrude001 = extrude(sketch001, length = 50)
|
||||
|
||||
sketch002 = startSketchOn(extrude001, seg01)
|
||||
|> circle(center = [-2.08, 47.7], radius = 1.4)
|
||||
|> patternLinear2d(instances = 5, distance = 5, axis = [1, 0])
|
||||
// Instances was reduced from 12 to speed this up.
|
||||
|> patternLinear2d(instances = 6, distance = 4, axis = [0, -1])
|
||||
|> extrude(length = -40)
|
||||
243
rust/kcl-lib/tests/ssi_pattern/ops.snap
Normal file
243
rust/kcl-lib/tests/ssi_pattern/ops.snap
Normal file
@ -0,0 +1,243 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Operations executed ssi_pattern.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"labeledArgs": {
|
||||
"data": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XZ"
|
||||
},
|
||||
"sourceRange": [
|
||||
26,
|
||||
30,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "startSketchOn",
|
||||
"sourceRange": [
|
||||
12,
|
||||
31,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": null
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
"length": {
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 50.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
315,
|
||||
317,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
287,
|
||||
318,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
295,
|
||||
304,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
"data": {
|
||||
"value": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
346,
|
||||
356,
|
||||
0
|
||||
]
|
||||
},
|
||||
"tag": {
|
||||
"value": {
|
||||
"type": "TagIdentifier",
|
||||
"value": "seg01",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": [
|
||||
358,
|
||||
363,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "startSketchOn",
|
||||
"sourceRange": [
|
||||
332,
|
||||
364,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": null
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
"length": {
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": -40.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
621,
|
||||
624,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
604,
|
||||
625,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Sketches",
|
||||
"value": [
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
},
|
||||
{
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
15820
rust/kcl-lib/tests/ssi_pattern/program_memory.snap
Normal file
15820
rust/kcl-lib/tests/ssi_pattern/program_memory.snap
Normal file
File diff suppressed because it is too large
Load Diff
BIN
rust/kcl-lib/tests/ssi_pattern/rendered_model.png
Normal file
BIN
rust/kcl-lib/tests/ssi_pattern/rendered_model.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
Reference in New Issue
Block a user