Add operations for variable declarations (#7451)
* Add operations for variable declarations * Update output * Change to use OpKclValue * Update output after merge
This commit is contained in:
@ -4,6 +4,332 @@ description: Operations executed involute_circular_units.kcl
|
||||
---
|
||||
{
|
||||
"rust/kcl-lib/tests/involute_circular_units/input.kcl": [
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "nTeeth",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 21.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "module",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 0.5,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "pitchDiameter",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 10.5,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "pressureAngle",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 20.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 3
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "addendum",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 0.5,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 4
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "deddendum",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 0.625,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 5
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "baseDiameter",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 9.867,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 6
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "tipDiameter",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 11.5,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 7
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "gearHeight",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 0.3,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 8
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "angle001",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 6.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 9
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "StdLibCall",
|
||||
"name": "startSketchOn",
|
||||
@ -97,6 +423,50 @@ description: Operations executed involute_circular_units.kcl
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "x",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 4.714,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": []
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"name": "y",
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 1.454,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Cm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visibility": "default",
|
||||
"nodePath": {
|
||||
"steps": []
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupEnd"
|
||||
},
|
||||
@ -196,8 +566,86 @@ description: Operations executed involute_circular_units.kcl
|
||||
],
|
||||
"std::appearance": [],
|
||||
"std::array": [],
|
||||
"std::math": [],
|
||||
"std::prelude": [],
|
||||
"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": [],
|
||||
|
||||
Reference in New Issue
Block a user