2025-03-27 18:48:55 -04:00
|
|
|
---
|
|
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
|
|
description: Operations executed intersect_cubes.kcl
|
|
|
|
---
|
|
|
|
[
|
|
|
|
{
|
2025-04-29 06:38:52 -07:00
|
|
|
"type": "StdLibCall",
|
2025-05-19 16:50:15 +12:00
|
|
|
"name": "startSketchOn",
|
2025-05-02 16:08:12 -05:00
|
|
|
"unlabeledArg": {
|
|
|
|
"value": {
|
|
|
|
"type": "Plane",
|
|
|
|
"artifact_id": "[uuid]"
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
2025-05-19 16:50:15 +12:00
|
|
|
},
|
|
|
|
"labeledArgs": {},
|
2025-06-05 12:24:34 -04:00
|
|
|
"nodePath": {
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"type": "ProgramBodyItem",
|
|
|
|
"index": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationInit"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "FunctionExpressionBody"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "FunctionExpressionBodyItem",
|
|
|
|
"index": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "ReturnStatementArg"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "PipeBodyItem",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2025-05-19 16:50:15 +12:00
|
|
|
"sourceRange": []
|
2025-03-27 18:48:55 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "StdLibCall",
|
2025-05-19 16:50:15 +12:00
|
|
|
"name": "startSketchOn",
|
2025-05-02 16:08:12 -05:00
|
|
|
"unlabeledArg": {
|
|
|
|
"value": {
|
|
|
|
"type": "Plane",
|
|
|
|
"artifact_id": "[uuid]"
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
2025-05-19 16:50:15 +12:00
|
|
|
},
|
|
|
|
"labeledArgs": {},
|
2025-06-05 12:24:34 -04:00
|
|
|
"nodePath": {
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"type": "ProgramBodyItem",
|
|
|
|
"index": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationInit"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "FunctionExpressionBody"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "FunctionExpressionBodyItem",
|
|
|
|
"index": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "ReturnStatementArg"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "PipeBodyItem",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2025-05-19 16:50:15 +12:00
|
|
|
"sourceRange": []
|
2025-03-27 18:48:55 -04:00
|
|
|
},
|
|
|
|
{
|
2025-05-19 16:50:15 +12:00
|
|
|
"type": "StdLibCall",
|
|
|
|
"name": "extrude",
|
|
|
|
"unlabeledArg": {
|
|
|
|
"value": {
|
|
|
|
"type": "Sketch",
|
|
|
|
"value": {
|
|
|
|
"artifactId": "[uuid]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
|
|
|
},
|
2025-03-27 18:48:55 -04:00
|
|
|
"labeledArgs": {
|
|
|
|
"length": {
|
|
|
|
"value": {
|
|
|
|
"type": "Number",
|
2025-04-10 18:30:57 -07:00
|
|
|
"value": 20.0,
|
2025-03-27 18:48:55 -04:00
|
|
|
"ty": {
|
|
|
|
"type": "Default",
|
|
|
|
"len": {
|
|
|
|
"type": "Mm"
|
|
|
|
},
|
|
|
|
"angle": {
|
|
|
|
"type": "Degrees"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
|
|
|
}
|
|
|
|
},
|
2025-06-05 12:24:34 -04:00
|
|
|
"nodePath": {
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"type": "ProgramBodyItem",
|
|
|
|
"index": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationInit"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "FunctionExpressionBody"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "FunctionExpressionBodyItem",
|
|
|
|
"index": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "ReturnStatementArg"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "PipeBodyItem",
|
|
|
|
"index": 6
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2025-05-19 16:50:15 +12:00
|
|
|
"sourceRange": []
|
|
|
|
},
|
|
|
|
{
|
2025-03-27 18:48:55 -04:00
|
|
|
"type": "StdLibCall",
|
2025-05-19 16:50:15 +12:00
|
|
|
"name": "extrude",
|
2025-03-27 18:48:55 -04:00
|
|
|
"unlabeledArg": {
|
|
|
|
"value": {
|
|
|
|
"type": "Sketch",
|
|
|
|
"value": {
|
|
|
|
"artifactId": "[uuid]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
2025-05-19 16:50:15 +12:00
|
|
|
},
|
2025-03-27 18:48:55 -04:00
|
|
|
"labeledArgs": {
|
|
|
|
"length": {
|
|
|
|
"value": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 10.0,
|
|
|
|
"ty": {
|
|
|
|
"type": "Default",
|
|
|
|
"len": {
|
|
|
|
"type": "Mm"
|
|
|
|
},
|
|
|
|
"angle": {
|
|
|
|
"type": "Degrees"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
|
|
|
}
|
|
|
|
},
|
2025-06-05 12:24:34 -04:00
|
|
|
"nodePath": {
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"type": "ProgramBodyItem",
|
|
|
|
"index": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationInit"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "FunctionExpressionBody"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "FunctionExpressionBodyItem",
|
|
|
|
"index": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "ReturnStatementArg"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "PipeBodyItem",
|
|
|
|
"index": 6
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2025-05-19 16:50:15 +12:00
|
|
|
"sourceRange": []
|
2025-03-27 18:48:55 -04:00
|
|
|
},
|
|
|
|
{
|
2025-04-29 06:38:52 -07:00
|
|
|
"type": "GroupBegin",
|
|
|
|
"group": {
|
|
|
|
"type": "FunctionCall",
|
|
|
|
"name": "cube",
|
|
|
|
"functionSourceRange": [],
|
|
|
|
"unlabeledArg": null,
|
2025-05-01 11:36:51 -05:00
|
|
|
"labeledArgs": {
|
|
|
|
"center": {
|
|
|
|
"value": {
|
|
|
|
"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": []
|
|
|
|
},
|
|
|
|
"size": {
|
|
|
|
"value": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 10.0,
|
|
|
|
"ty": {
|
|
|
|
"type": "Default",
|
|
|
|
"len": {
|
|
|
|
"type": "Mm"
|
|
|
|
},
|
|
|
|
"angle": {
|
|
|
|
"type": "Degrees"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
|
|
|
}
|
|
|
|
}
|
2025-04-29 06:38:52 -07:00
|
|
|
},
|
2025-06-05 12:24:34 -04:00
|
|
|
"nodePath": {
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"type": "ProgramBodyItem",
|
|
|
|
"index": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationInit"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2025-04-29 06:38:52 -07:00
|
|
|
"sourceRange": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "GroupBegin",
|
|
|
|
"group": {
|
|
|
|
"type": "FunctionCall",
|
|
|
|
"name": "cube",
|
|
|
|
"functionSourceRange": [],
|
|
|
|
"unlabeledArg": null,
|
2025-05-01 11:36:51 -05:00
|
|
|
"labeledArgs": {
|
|
|
|
"center": {
|
|
|
|
"value": {
|
|
|
|
"type": "Array",
|
|
|
|
"value": [
|
|
|
|
{
|
|
|
|
"type": "Number",
|
|
|
|
"value": 7.0,
|
|
|
|
"ty": {
|
|
|
|
"type": "Default",
|
|
|
|
"len": {
|
|
|
|
"type": "Mm"
|
|
|
|
},
|
|
|
|
"angle": {
|
|
|
|
"type": "Degrees"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "Number",
|
|
|
|
"value": 3.0,
|
|
|
|
"ty": {
|
|
|
|
"type": "Default",
|
|
|
|
"len": {
|
|
|
|
"type": "Mm"
|
|
|
|
},
|
|
|
|
"angle": {
|
|
|
|
"type": "Degrees"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
|
|
|
},
|
|
|
|
"size": {
|
|
|
|
"value": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 5.0,
|
|
|
|
"ty": {
|
|
|
|
"type": "Default",
|
|
|
|
"len": {
|
|
|
|
"type": "Mm"
|
|
|
|
},
|
|
|
|
"angle": {
|
|
|
|
"type": "Degrees"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
|
|
|
}
|
|
|
|
}
|
2025-04-29 06:38:52 -07:00
|
|
|
},
|
2025-06-05 12:24:34 -04:00
|
|
|
"nodePath": {
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"type": "ProgramBodyItem",
|
|
|
|
"index": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationInit"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "PipeBodyItem",
|
|
|
|
"index": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2025-04-29 06:38:52 -07:00
|
|
|
"sourceRange": []
|
2025-03-27 18:48:55 -04:00
|
|
|
},
|
2025-06-02 10:32:36 -04:00
|
|
|
{
|
|
|
|
"type": "StdLibCall",
|
|
|
|
"name": "translate",
|
|
|
|
"unlabeledArg": {
|
|
|
|
"value": {
|
|
|
|
"type": "Solid",
|
|
|
|
"value": {
|
|
|
|
"artifactId": "[uuid]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
|
|
|
},
|
|
|
|
"labeledArgs": {
|
|
|
|
"z": {
|
|
|
|
"value": {
|
|
|
|
"type": "Number",
|
|
|
|
"value": 1.0,
|
|
|
|
"ty": {
|
|
|
|
"type": "Default",
|
|
|
|
"len": {
|
|
|
|
"type": "Mm"
|
|
|
|
},
|
|
|
|
"angle": {
|
|
|
|
"type": "Degrees"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
|
|
|
}
|
|
|
|
},
|
2025-06-05 12:24:34 -04:00
|
|
|
"nodePath": {
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"type": "ProgramBodyItem",
|
|
|
|
"index": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationInit"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "PipeBodyItem",
|
|
|
|
"index": 1
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2025-06-02 10:32:36 -04:00
|
|
|
"sourceRange": []
|
|
|
|
},
|
2025-03-27 18:48:55 -04:00
|
|
|
{
|
|
|
|
"type": "StdLibCall",
|
2025-05-19 16:50:15 +12:00
|
|
|
"name": "intersect",
|
2025-05-02 16:08:12 -05:00
|
|
|
"unlabeledArg": {
|
|
|
|
"value": {
|
|
|
|
"type": "Array",
|
|
|
|
"value": [
|
|
|
|
{
|
|
|
|
"type": "Solid",
|
|
|
|
"value": {
|
|
|
|
"artifactId": "[uuid]"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "Solid",
|
|
|
|
"value": {
|
|
|
|
"artifactId": "[uuid]"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"sourceRange": []
|
2025-05-19 16:50:15 +12:00
|
|
|
},
|
|
|
|
"labeledArgs": {},
|
2025-06-05 12:24:34 -04:00
|
|
|
"nodePath": {
|
|
|
|
"steps": [
|
|
|
|
{
|
|
|
|
"type": "ProgramBodyItem",
|
|
|
|
"index": 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "VariableDeclarationInit"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2025-05-19 16:50:15 +12:00
|
|
|
"sourceRange": []
|
2025-04-29 06:38:52 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "GroupEnd"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "GroupEnd"
|
2025-03-27 18:48:55 -04:00
|
|
|
}
|
|
|
|
]
|