--- source: kcl-lib/src/simulation_tests.rs description: Operations executed spool.kcl --- { "public/kcl-samples/spool/main.kcl": [ { "type": "VariableDeclaration", "name": "hubDiameter", "value": { "type": "Number", "value": 2.0, "ty": { "type": "Known", "type": "Length", "type": "Inches" } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 0 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "spoolDiameter", "value": { "type": "Number", "value": 305.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": "spoolThickness", "value": { "type": "Number", "value": 267.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": "coreDiameter", "value": { "type": "Number", "value": 150.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": "webThickness", "value": { "type": "Number", "value": 10.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": "stockDiameter", "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": "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": "revolve", "unlabeledArg": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "axis": { "value": { "type": "Object", "value": { "direction": { "type": "Array", "value": [ { "type": "Number", "value": 1.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, { "type": "Number", "value": 0.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": 6 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 9 } ] }, "sourceRange": [] }, { "type": "GroupBegin", "group": { "type": "FunctionCall", "name": "score", "functionSourceRange": [], "unlabeledArg": null, "labeledArgs": { "depth": { "value": { "type": "Number", "value": 133.5, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] }, "length": { "value": { "type": "Number", "value": 1.1653543307086616, "ty": { "type": "Known", "type": "Length", "type": "Inches" } }, "sourceRange": [] }, "radius": { "value": { "type": "Number", "value": 1.3937007874015748, "ty": { "type": "Known", "type": "Length", "type": "Inches" } }, "sourceRange": [] } } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 8 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "face": { "value": { "type": "TagIdentifier", "value": "seg01", "artifact_id": "[uuid]" }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 7 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "FunctionExpressionBody" }, { "type": "FunctionExpressionBodyItem", "index": 0 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 0 } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "extrude", "unlabeledArg": { "value": { "type": "Array", "value": [ { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } } ] }, "sourceRange": [] }, "labeledArgs": { "length": { "value": { "type": "Number", "value": -133.5, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 7 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "FunctionExpressionBody" }, { "type": "FunctionExpressionBodyItem", "index": 0 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 8 } ] }, "sourceRange": [] }, { "type": "GroupEnd" }, { "type": "GroupBegin", "group": { "type": "FunctionCall", "name": "score", "functionSourceRange": [], "unlabeledArg": null, "labeledArgs": { "depth": { "value": { "type": "Number", "value": 5.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] }, "length": { "value": { "type": "Number", "value": 47.5, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] }, "radius": { "value": { "type": "Number", "value": 75.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 9 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 0 } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "face": { "value": { "type": "TagIdentifier", "value": "seg01", "artifact_id": "[uuid]" }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 7 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "FunctionExpressionBody" }, { "type": "FunctionExpressionBodyItem", "index": 0 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 0 } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "extrude", "unlabeledArg": { "value": { "type": "Array", "value": [ { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { "type": "Sketch", "value": { "artifactId": "[uuid]" } } ] }, "sourceRange": [] }, "labeledArgs": { "length": { "value": { "type": "Number", "value": -5.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 7 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "FunctionExpressionBody" }, { "type": "FunctionExpressionBodyItem", "index": 0 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 8 } ] }, "sourceRange": [] }, { "type": "GroupEnd" }, { "type": "StdLibCall", "name": "patternCircular3d", "unlabeledArg": { "value": { "type": "Array", "value": [ { "type": "Solid", "value": { "artifactId": "[uuid]" } }, { "type": "Solid", "value": { "artifactId": "[uuid]" } }, { "type": "Solid", "value": { "artifactId": "[uuid]" } }, { "type": "Solid", "value": { "artifactId": "[uuid]" } }, { "type": "Solid", "value": { "artifactId": "[uuid]" } }, { "type": "Solid", "value": { "artifactId": "[uuid]" } }, { "type": "Solid", "value": { "artifactId": "[uuid]" } }, { "type": "Solid", "value": { "artifactId": "[uuid]" } } ] }, "sourceRange": [] }, "labeledArgs": { "axis": { "value": { "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" } } }, { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } } ] }, "sourceRange": [] }, "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" } } }, { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } } ] }, "sourceRange": [] }, "instances": { "value": { "type": "Number", "value": 2.0, "ty": { "type": "Known", "type": "Count" } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 9 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 1 } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "helix", "unlabeledArg": null, "labeledArgs": { "angleStart": { "value": { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] }, "axis": { "value": { "type": "Object", "value": { "direction": { "type": "Array", "value": [ { "type": "Number", "value": 1.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, { "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" } } } ] }, "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" } } }, { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } } ] } } }, "sourceRange": [] }, "length": { "value": { "type": "Number", "value": 267.0, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] }, "radius": { "value": { "type": "Number", "value": 77.5, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] }, "revolutions": { "value": { "type": "Number", "value": 35.6, "ty": { "type": "Known", "type": "Count" } }, "sourceRange": [] } }, "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": 11 }, { "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": "Helix", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 11 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 2 } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "translate", "unlabeledArg": { "value": { "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "x": { "value": { "type": "Number", "value": -133.5, "ty": { "type": "Default", "len": { "type": "Mm" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 11 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 3 } ] }, "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": [] }