732 lines
16 KiB
Plaintext
732 lines
16 KiB
Plaintext
![]() |
---
|
||
|
source: kcl-lib/src/simulation_tests.rs
|
||
|
description: Operations executed mug.kcl
|
||
|
---
|
||
|
{
|
||
|
"public/kcl-samples/mug/main.kcl": [
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "mugDiameter",
|
||
|
"value": {
|
||
|
"type": "Number",
|
||
|
"value": 80.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"visibility": "default",
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 0
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "mugHeight",
|
||
|
"value": {
|
||
|
"type": "Number",
|
||
|
"value": 95.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"visibility": "default",
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 1
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "wallThickness",
|
||
|
"value": {
|
||
|
"type": "Number",
|
||
|
"value": 6.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"visibility": "default",
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 2
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "handleWidth",
|
||
|
"value": {
|
||
|
"type": "Number",
|
||
|
"value": 18.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"visibility": "default",
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 3
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "handleThickness",
|
||
|
"value": {
|
||
|
"type": "Number",
|
||
|
"value": 5.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"visibility": "default",
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 4
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "StdLibCall",
|
||
|
"name": "startSketchOn",
|
||
|
"unlabeledArg": {
|
||
|
"value": {
|
||
|
"type": "Plane",
|
||
|
"artifact_id": "[uuid]"
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
"labeledArgs": {},
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 5
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
},
|
||
|
{
|
||
|
"type": "PipeBodyItem",
|
||
|
"index": 0
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "StdLibCall",
|
||
|
"name": "revolve",
|
||
|
"unlabeledArg": {
|
||
|
"value": {
|
||
|
"type": "Sketch",
|
||
|
"value": {
|
||
|
"artifactId": "[uuid]"
|
||
|
}
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
"labeledArgs": {
|
||
|
"axis": {
|
||
|
"value": {
|
||
|
"type": "Object",
|
||
|
"value": {
|
||
|
"direction": {
|
||
|
"type": "Array",
|
||
|
"value": [
|
||
|
{
|
||
|
"type": "Number",
|
||
|
"value": 0.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "Number",
|
||
|
"value": 1.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"origin": {
|
||
|
"type": "Array",
|
||
|
"value": [
|
||
|
{
|
||
|
"type": "Number",
|
||
|
"value": 0.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "Number",
|
||
|
"value": 0.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
}
|
||
|
},
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 5
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
},
|
||
|
{
|
||
|
"type": "PipeBodyItem",
|
||
|
"index": 14
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "StdLibCall",
|
||
|
"name": "startSketchOn",
|
||
|
"unlabeledArg": {
|
||
|
"value": {
|
||
|
"type": "Plane",
|
||
|
"artifact_id": "[uuid]"
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
"labeledArgs": {},
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 6
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
},
|
||
|
{
|
||
|
"type": "PipeBodyItem",
|
||
|
"index": 0
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "StdLibCall",
|
||
|
"name": "offsetPlane",
|
||
|
"unlabeledArg": {
|
||
|
"value": {
|
||
|
"type": "Plane",
|
||
|
"artifact_id": "[uuid]"
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
"labeledArgs": {
|
||
|
"offset": {
|
||
|
"value": {
|
||
|
"type": "Number",
|
||
|
"value": 26.667,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
}
|
||
|
},
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 7
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
},
|
||
|
{
|
||
|
"type": "PipeBodyItem",
|
||
|
"index": 0
|
||
|
},
|
||
|
{
|
||
|
"type": "CallKwUnlabeledArg"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "StdLibCall",
|
||
|
"name": "startSketchOn",
|
||
|
"unlabeledArg": {
|
||
|
"value": {
|
||
|
"type": "Plane",
|
||
|
"artifact_id": "[uuid]"
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
"labeledArgs": {},
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 7
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
},
|
||
|
{
|
||
|
"type": "PipeBodyItem",
|
||
|
"index": 0
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "StdLibCall",
|
||
|
"name": "sweep",
|
||
|
"unlabeledArg": {
|
||
|
"value": {
|
||
|
"type": "Sketch",
|
||
|
"value": {
|
||
|
"artifactId": "[uuid]"
|
||
|
}
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
"labeledArgs": {
|
||
|
"path": {
|
||
|
"value": {
|
||
|
"type": "Sketch",
|
||
|
"value": {
|
||
|
"artifactId": "[uuid]"
|
||
|
}
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
}
|
||
|
},
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 7
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
},
|
||
|
{
|
||
|
"type": "PipeBodyItem",
|
||
|
"index": 7
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "StdLibCall",
|
||
|
"name": "subtract",
|
||
|
"unlabeledArg": {
|
||
|
"value": {
|
||
|
"type": "Solid",
|
||
|
"value": {
|
||
|
"artifactId": "[uuid]"
|
||
|
}
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
"labeledArgs": {
|
||
|
"tools": {
|
||
|
"value": {
|
||
|
"type": "Solid",
|
||
|
"value": {
|
||
|
"artifactId": "[uuid]"
|
||
|
}
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
}
|
||
|
},
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 7
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
},
|
||
|
{
|
||
|
"type": "PipeBodyItem",
|
||
|
"index": 8
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "StdLibCall",
|
||
|
"name": "startSketchOn",
|
||
|
"unlabeledArg": {
|
||
|
"value": {
|
||
|
"type": "Plane",
|
||
|
"artifact_id": "[uuid]"
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
"labeledArgs": {},
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 8
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
},
|
||
|
{
|
||
|
"type": "PipeBodyItem",
|
||
|
"index": 0
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "StdLibCall",
|
||
|
"name": "revolve",
|
||
|
"unlabeledArg": {
|
||
|
"value": {
|
||
|
"type": "Sketch",
|
||
|
"value": {
|
||
|
"artifactId": "[uuid]"
|
||
|
}
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
"labeledArgs": {
|
||
|
"axis": {
|
||
|
"value": {
|
||
|
"type": "Object",
|
||
|
"value": {
|
||
|
"direction": {
|
||
|
"type": "Array",
|
||
|
"value": [
|
||
|
{
|
||
|
"type": "Number",
|
||
|
"value": 0.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "Number",
|
||
|
"value": 1.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"origin": {
|
||
|
"type": "Array",
|
||
|
"value": [
|
||
|
{
|
||
|
"type": "Number",
|
||
|
"value": 0.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "Number",
|
||
|
"value": 0.0,
|
||
|
"ty": {
|
||
|
"type": "Default",
|
||
|
"len": {
|
||
|
"type": "Mm"
|
||
|
},
|
||
|
"angle": {
|
||
|
"type": "Degrees"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
}
|
||
|
},
|
||
|
"nodePath": {
|
||
|
"steps": [
|
||
|
{
|
||
|
"type": "ProgramBodyItem",
|
||
|
"index": 8
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclarationInit"
|
||
|
},
|
||
|
{
|
||
|
"type": "PipeBodyItem",
|
||
|
"index": 16
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
}
|
||
|
],
|
||
|
"std::appearance": [],
|
||
|
"std::array": [],
|
||
|
"std::math": [
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "PI",
|
||
|
"value": {
|
||
|
"type": "Number",
|
||
|
"value": 3.142,
|
||
|
"ty": {
|
||
|
"type": "Unknown"
|
||
|
}
|
||
|
},
|
||
|
"visibility": "export",
|
||
|
"nodePath": {
|
||
|
"steps": []
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "E",
|
||
|
"value": {
|
||
|
"type": "Number",
|
||
|
"value": 2.718,
|
||
|
"ty": {
|
||
|
"type": "Known",
|
||
|
"type": "Count"
|
||
|
}
|
||
|
},
|
||
|
"visibility": "export",
|
||
|
"nodePath": {
|
||
|
"steps": []
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "TAU",
|
||
|
"value": {
|
||
|
"type": "Number",
|
||
|
"value": 6.283,
|
||
|
"ty": {
|
||
|
"type": "Known",
|
||
|
"type": "Count"
|
||
|
}
|
||
|
},
|
||
|
"visibility": "export",
|
||
|
"nodePath": {
|
||
|
"steps": []
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
}
|
||
|
],
|
||
|
"std::prelude": [
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "START",
|
||
|
"value": {
|
||
|
"type": "String",
|
||
|
"value": "start"
|
||
|
},
|
||
|
"visibility": "export",
|
||
|
"nodePath": {
|
||
|
"steps": []
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
},
|
||
|
{
|
||
|
"type": "VariableDeclaration",
|
||
|
"name": "END",
|
||
|
"value": {
|
||
|
"type": "String",
|
||
|
"value": "end"
|
||
|
},
|
||
|
"visibility": "export",
|
||
|
"nodePath": {
|
||
|
"steps": []
|
||
|
},
|
||
|
"sourceRange": []
|
||
|
}
|
||
|
],
|
||
|
"std::sketch": [],
|
||
|
"std::solid": [],
|
||
|
"std::sweep": [],
|
||
|
"std::transform": [],
|
||
|
"std::turns": [],
|
||
|
"std::types": [],
|
||
|
"std::units": []
|
||
|
}
|