--- source: kcl-lib/src/simulation_tests.rs description: Operations executed truss-structure.kcl --- { "public/kcl-samples/truss-structure/main.kcl": [ { "type": "VariableDeclaration", "name": "thickness", "value": { "type": "Number", "value": 4.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 0 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "totalLength", "value": { "type": "Number", "value": 180.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 1 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "totalWidth", "value": { "type": "Number", "value": 120.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 2 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "totalHeight", "value": { "type": "Number", "value": 120.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 3 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "legHeight", "value": { "type": "Number", "value": 48.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 4 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "topTrussAngle", "value": { "type": "Number", "value": 25.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 5 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "beamWidth", "value": { "type": "Number", "value": 4.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 6 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "beamLength", "value": { "type": "Number", "value": 2.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 7 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "sparAngle", "value": { "type": "Number", "value": 30.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 8 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "nFrames", "value": { "type": "Number", "value": 3.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "visibility": "default", "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 9 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "VariableDeclaration", "name": "crossBeamLength", "value": { "type": "Number", "value": 82.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "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": 11 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "tool": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 15 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "tool": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 16 }, { "type": "ExpressionStatementExpr" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "length": { "value": { "type": "Number", "value": 2.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 17 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] }, "labeledArgs": { "offset": { "value": { "type": "Number", "value": 0.1, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 18 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "CallKwUnlabeledArg" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] }, "labeledArgs": {}, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 18 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "length": { "value": { "type": "Number", "value": 1.8, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 20 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "length": { "value": { "type": "Number", "value": 1.8, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 22 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] }, "labeledArgs": { "offset": { "value": { "type": "Number", "value": 0.1, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 24 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "CallKwUnlabeledArg" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] }, "labeledArgs": {}, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 24 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "length": { "value": { "type": "Number", "value": -48.1, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 27 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "length": { "value": { "type": "Number", "value": -48.1, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 28 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "axis": { "value": { "type": "Array", "value": [ { "type": "Number", "value": -1.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } } ] }, "sourceRange": [] }, "distance": { "value": { "type": "Number", "value": 84.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] }, "instances": { "value": { "type": "Number", "value": 3.0, "ty": { "type": "Known", "type": "Count" } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 29 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 1 } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] }, "labeledArgs": {}, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 30 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "length": { "value": { "type": "Number", "value": -82.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 32 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 0 } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] }, "labeledArgs": { "axis": { "value": { "type": "Array", "value": [ { "type": "Number", "value": -1.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } } ] }, "sourceRange": [] }, "distance": { "value": { "type": "Number", "value": 84.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] }, "instances": { "value": { "type": "Number", "value": 2.0, "ty": { "type": "Known", "type": "Count" } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 32 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" }, { "type": "PipeBodyItem", "index": 1 } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] }, "labeledArgs": {}, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 33 }, { "type": "VariableDeclarationDeclaration" }, { "type": "VariableDeclarationInit" } ] }, "sourceRange": [] }, { "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": 82.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 36 }, { "type": "ExpressionStatementExpr" }, { "type": "PipeBodyItem", "index": 0 } ] }, "sourceRange": [] }, { "type": "StdLibCall", "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ { "type": "Solid", "value": { "artifactId": "[uuid]" } }, { "type": "Solid", "value": { "artifactId": "[uuid]" } } ] }, "sourceRange": [] }, "labeledArgs": { "axis": { "value": { "type": "Array", "value": [ { "type": "Number", "value": -1.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, { "type": "Number", "value": 0.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } } ] }, "sourceRange": [] }, "distance": { "value": { "type": "Number", "value": 84.0, "ty": { "type": "Default", "len": { "type": "Inches" }, "angle": { "type": "Degrees" } } }, "sourceRange": [] }, "instances": { "value": { "type": "Number", "value": 2.0, "ty": { "type": "Known", "type": "Count" } }, "sourceRange": [] } }, "nodePath": { "steps": [ { "type": "ProgramBodyItem", "index": 36 }, { "type": "ExpressionStatementExpr" }, { "type": "PipeBodyItem", "index": 1 } ] }, "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": [] }