* Add libm dependency * Change to use libm for trig functions * Remove redactions for floating point * Update output * Use clippy to prevent stdlib math sneaking back in --------- Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
644 lines
13 KiB
Plaintext
644 lines
13 KiB
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Operations executed thermal-block-insert.kcl
|
|
---
|
|
{
|
|
"public/kcl-samples/thermal-block-insert/main.kcl": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"name": "insertLength",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 400.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": "insertHeight",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 200.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": "insertThickness",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 50.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": "setbackFactor",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 0.25,
|
|
"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": "tongueTargetCount",
|
|
"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": "VariableDeclaration",
|
|
"name": "tongueCount",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 5.0,
|
|
"ty": {
|
|
"type": "Default",
|
|
"len": {
|
|
"type": "Mm"
|
|
},
|
|
"angle": {
|
|
"type": "Degrees"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "default",
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 5
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"name": "tongueLength",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 47.05882352941177,
|
|
"ty": {
|
|
"type": "Default",
|
|
"len": {
|
|
"type": "Mm"
|
|
},
|
|
"angle": {
|
|
"type": "Degrees"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "default",
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 6
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"name": "tongueGap",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 23.529411764705884,
|
|
"ty": {
|
|
"type": "Default",
|
|
"len": {
|
|
"type": "Mm"
|
|
},
|
|
"angle": {
|
|
"type": "Degrees"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "default",
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 7
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"name": "tongueStep",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 70.58823529411765,
|
|
"ty": {
|
|
"type": "Default",
|
|
"len": {
|
|
"type": "Mm"
|
|
},
|
|
"angle": {
|
|
"type": "Degrees"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "default",
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 8
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"name": "tongueDepth",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 23.529411764705884,
|
|
"ty": {
|
|
"type": "Default",
|
|
"len": {
|
|
"type": "Mm"
|
|
},
|
|
"angle": {
|
|
"type": "Degrees"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "default",
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 9
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"name": "tongueSetback",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 11.764705882352942,
|
|
"ty": {
|
|
"type": "Default",
|
|
"len": {
|
|
"type": "Mm"
|
|
},
|
|
"angle": {
|
|
"type": "Degrees"
|
|
}
|
|
}
|
|
},
|
|
"visibility": "default",
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 10
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "StdLibCall",
|
|
"name": "startSketchOn",
|
|
"unlabeledArg": {
|
|
"value": {
|
|
"type": "Plane",
|
|
"artifact_id": "[uuid]"
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
"labeledArgs": {},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 12
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
},
|
|
{
|
|
"type": "PipeBodyItem",
|
|
"index": 0
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "GroupBegin",
|
|
"group": {
|
|
"type": "FunctionCall",
|
|
"name": "tongueBlockFn",
|
|
"functionSourceRange": [],
|
|
"unlabeledArg": null,
|
|
"labeledArgs": {}
|
|
},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 12
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
},
|
|
{
|
|
"type": "PipeBodyItem",
|
|
"index": 2
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "GroupEnd"
|
|
},
|
|
{
|
|
"type": "StdLibCall",
|
|
"name": "startSketchOn",
|
|
"unlabeledArg": {
|
|
"value": {
|
|
"type": "Plane",
|
|
"artifact_id": "[uuid]"
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
"labeledArgs": {},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 13
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
},
|
|
{
|
|
"type": "PipeBodyItem",
|
|
"index": 0
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "GroupBegin",
|
|
"group": {
|
|
"type": "FunctionCall",
|
|
"name": "tongueBlockFn",
|
|
"functionSourceRange": [],
|
|
"unlabeledArg": null,
|
|
"labeledArgs": {}
|
|
},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 13
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
},
|
|
{
|
|
"type": "PipeBodyItem",
|
|
"index": 2
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "GroupEnd"
|
|
},
|
|
{
|
|
"type": "StdLibCall",
|
|
"name": "extrude",
|
|
"unlabeledArg": {
|
|
"value": {
|
|
"type": "Array",
|
|
"value": [
|
|
{
|
|
"type": "Sketch",
|
|
"value": {
|
|
"artifactId": "[uuid]"
|
|
}
|
|
},
|
|
{
|
|
"type": "Sketch",
|
|
"value": {
|
|
"artifactId": "[uuid]"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
"labeledArgs": {
|
|
"length": {
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 200.0,
|
|
"ty": {
|
|
"type": "Default",
|
|
"len": {
|
|
"type": "Mm"
|
|
},
|
|
"angle": {
|
|
"type": "Degrees"
|
|
}
|
|
}
|
|
},
|
|
"sourceRange": []
|
|
}
|
|
},
|
|
"nodePath": {
|
|
"steps": [
|
|
{
|
|
"type": "ProgramBodyItem",
|
|
"index": 14
|
|
},
|
|
{
|
|
"type": "VariableDeclarationDeclaration"
|
|
},
|
|
{
|
|
"type": "VariableDeclarationInit"
|
|
}
|
|
]
|
|
},
|
|
"sourceRange": []
|
|
}
|
|
],
|
|
"std::appearance": [],
|
|
"std::array": [],
|
|
"std::math": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"name": "PI",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 3.141592653589793,
|
|
"ty": {
|
|
"type": "Unknown"
|
|
}
|
|
},
|
|
"visibility": "export",
|
|
"nodePath": {
|
|
"steps": []
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"name": "E",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 2.718281828459045,
|
|
"ty": {
|
|
"type": "Known",
|
|
"type": "Count"
|
|
}
|
|
},
|
|
"visibility": "export",
|
|
"nodePath": {
|
|
"steps": []
|
|
},
|
|
"sourceRange": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"name": "TAU",
|
|
"value": {
|
|
"type": "Number",
|
|
"value": 6.283185307179586,
|
|
"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": []
|
|
}
|