* Add NodePath to operations * Change to use nodePath to get pathToNode instead of sourceRange * Add additional node path unit test * Update output * Fix import statement NodePaths * Update output * Factor into function
208 lines
3.7 KiB
Plaintext
208 lines
3.7 KiB
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Operations executed multi_transform.kcl
|
|
---
|
|
[
|
|
{
|
|
"type": "StdLibCall",
|
|
"name": "startSketchOn",
|
|
"unlabeledArg": {
|
|
"value": {
|
|
"type": "Plane",
|
|
"artifact_id": "[uuid]"
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
"labeledArgs": {},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 1
|
|
},
|
|
{
|
|
"type": "ExpressionStatementExpr"
|
|
},
|
|
{
|
|
"type": "PipeBodyItem",
|
|
"index": 0
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "StdLibCall",
|
|
"name": "extrude",
|
|
"unlabeledArg": {
|
|
"value": {
|
|
"type": "Sketch",
|
|
"value": {
|
|
"artifactId": "[uuid]"
|
|
}
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
"labeledArgs": {
|
|
"length": {
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 4.0,
|
|
"ty": {
|
|
"type": "Default",
|
|
"len": {
|
|
"type": "Mm"
|
|
},
|
|
"angle": {
|
|
"type": "Degrees"
|
|
}
|
|
}
|
|
},
|
|
"sourceRange": []
|
|
}
|
|
},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 1
|
|
},
|
|
{
|
|
"type": "ExpressionStatementExpr"
|
|
},
|
|
{
|
|
"type": "PipeBodyItem",
|
|
"index": 3
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "GroupBegin",
|
|
"group": {
|
|
"type": "FunctionCall",
|
|
"name": null,
|
|
"functionSourceRange": [],
|
|
"unlabeledArg": {
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 1.0,
|
|
"ty": {
|
|
"type": "Known",
|
|
"type": "Count"
|
|
}
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
"labeledArgs": {}
|
|
},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 1
|
|
},
|
|
{
|
|
"type": "ExpressionStatementExpr"
|
|
},
|
|
{
|
|
"type": "PipeBodyItem",
|
|
"index": 4
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "GroupBegin",
|
|
"group": {
|
|
"type": "FunctionCall",
|
|
"name": null,
|
|
"functionSourceRange": [],
|
|
"unlabeledArg": {
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 2.0,
|
|
"ty": {
|
|
"type": "Known",
|
|
"type": "Count"
|
|
}
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
"labeledArgs": {}
|
|
},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 1
|
|
},
|
|
{
|
|
"type": "ExpressionStatementExpr"
|
|
},
|
|
{
|
|
"type": "PipeBodyItem",
|
|
"index": 4
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "StdLibCall",
|
|
"name": "patternTransform",
|
|
"unlabeledArg": {
|
|
"value": {
|
|
"type": "Solid",
|
|
"value": {
|
|
"artifactId": "[uuid]"
|
|
}
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
"labeledArgs": {
|
|
"instances": {
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 3.0,
|
|
"ty": {
|
|
"type": "Known",
|
|
"type": "Count"
|
|
}
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
"transform": {
|
|
"value": {
|
|
"type": "Function"
|
|
},
|
|
"sourceRange": []
|
|
}
|
|
},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 1
|
|
},
|
|
{
|
|
"type": "ExpressionStatementExpr"
|
|
},
|
|
{
|
|
"type": "PipeBodyItem",
|
|
"index": 4
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "GroupEnd"
|
|
},
|
|
{
|
|
"type": "GroupEnd"
|
|
}
|
|
]
|