--- source: kcl-lib/src/simulation_tests.rs description: Result of parsing i-beam.kcl --- { "Ok": { "body": [ { "commentStart": 160, "declaration": { "commentStart": 183, "end": 0, "id": { "commentStart": 183, "end": 0, "name": "beamLength", "start": 0, "type": "Identifier" }, "init": { "commentStart": 196, "end": 0, "left": { "commentStart": 196, "end": 0, "raw": "6", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 6.0, "suffix": "None" } }, "operator": "*", "right": { "arguments": [], "callee": { "abs_path": false, "commentStart": 200, "end": 0, "name": { "commentStart": 200, "end": 0, "name": "ft", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 200, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "preComments": [ "// Define parameters" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 205, "declaration": { "commentStart": 205, "end": 0, "id": { "commentStart": 205, "end": 0, "name": "beamHeight", "start": 0, "type": "Identifier" }, "init": { "commentStart": 218, "end": 0, "raw": "4", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 4.0, "suffix": "None" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 220, "declaration": { "commentStart": 220, "end": 0, "id": { "commentStart": 220, "end": 0, "name": "flangeWidth", "start": 0, "type": "Identifier" }, "init": { "commentStart": 234, "end": 0, "raw": "2.663", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.663, "suffix": "None" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 240, "declaration": { "commentStart": 240, "end": 0, "id": { "commentStart": 240, "end": 0, "name": "flangeThickness", "start": 0, "type": "Identifier" }, "init": { "commentStart": 258, "end": 0, "raw": "0.293", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.293, "suffix": "None" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 264, "declaration": { "commentStart": 264, "end": 0, "id": { "commentStart": 264, "end": 0, "name": "webThickness", "start": 0, "type": "Identifier" }, "init": { "commentStart": 279, "end": 0, "raw": "0.193", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.193, "suffix": "None" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 285, "declaration": { "commentStart": 285, "end": 0, "id": { "commentStart": 285, "end": 0, "name": "rootRadius", "start": 0, "type": "Identifier" }, "init": { "commentStart": 298, "end": 0, "raw": "0.457", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.457, "suffix": "None" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 303, "declaration": { "commentStart": 430, "end": 0, "id": { "commentStart": 430, "end": 0, "name": "iBeam", "start": 0, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "argument": { "abs_path": false, "commentStart": 453, "end": 0, "name": { "commentStart": 453, "end": 0, "name": "XZ", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "commentStart": 452, "end": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" } ], "callee": { "abs_path": false, "commentStart": 438, "end": 0, "name": { "commentStart": 438, "end": 0, "name": "startSketchOn", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 438, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 477, "elements": [ { "commentStart": 478, "end": 0, "raw": "0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "commentStart": 481, "end": 0, "left": { "abs_path": false, "commentStart": 481, "end": 0, "name": { "commentStart": 481, "end": 0, "name": "beamHeight", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "/", "right": { "commentStart": 494, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } ], "end": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" }, { "commentStart": 498, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 462, "end": 0, "name": { "commentStart": 462, "end": 0, "name": "startProfileAt", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 462, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 512, "end": 0, "name": "length", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 521, "end": 0, "left": { "abs_path": false, "commentStart": 521, "end": 0, "name": { "commentStart": 521, "end": 0, "name": "flangeWidth", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "/", "right": { "commentStart": 535, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "abs_path": false, "commentStart": 506, "end": 0, "name": { "commentStart": 506, "end": 0, "name": "xLine", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 506, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 549, "end": 0, "name": "length", "start": 0, "type": "Identifier" }, "arg": { "argument": { "abs_path": false, "commentStart": 559, "end": 0, "name": { "commentStart": 559, "end": 0, "name": "flangeThickness", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "commentStart": 558, "end": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" } } ], "callee": { "abs_path": false, "commentStart": 543, "end": 0, "name": { "commentStart": 543, "end": 0, "name": "yLine", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 543, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 587, "end": 0, "name": "endAbsolute", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 601, "end": 0, "left": { "commentStart": 601, "end": 0, "left": { "abs_path": false, "commentStart": 601, "end": 0, "name": { "commentStart": 601, "end": 0, "name": "webThickness", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "/", "right": { "commentStart": 616, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "operator": "+", "right": { "abs_path": false, "commentStart": 620, "end": 0, "name": { "commentStart": 620, "end": 0, "name": "rootRadius", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "abs_path": false, "commentStart": 581, "end": 0, "name": { "commentStart": 581, "end": 0, "name": "xLine", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 581, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "commentStart": 651, "end": 0, "properties": [ { "commentStart": 653, "end": 0, "key": { "commentStart": 653, "end": 0, "name": "radius", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "abs_path": false, "commentStart": 662, "end": 0, "name": { "commentStart": 662, "end": 0, "name": "rootRadius", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } }, { "commentStart": 674, "end": 0, "key": { "commentStart": 674, "end": 0, "name": "offset", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "commentStart": 683, "end": 0, "raw": "90", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, "suffix": "None" } } } ], "start": 0, "type": "ObjectExpression", "type": "ObjectExpression" }, { "commentStart": 689, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 637, "end": 0, "name": { "commentStart": 637, "end": 0, "name": "tangentialArc", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 637, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 703, "end": 0, "name": "endAbsolute", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 717, "end": 0, "raw": "0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } } ], "callee": { "abs_path": false, "commentStart": 697, "end": 0, "name": { "commentStart": 697, "end": 0, "name": "yLine", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 697, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 734, "end": 0, "name": "axis", "start": 0, "type": "Identifier" }, "arg": { "abs_path": false, "commentStart": 741, "end": 0, "name": { "commentStart": 741, "end": 0, "name": "X", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "callee": { "abs_path": false, "commentStart": 725, "end": 0, "name": { "commentStart": 725, "end": 0, "name": "mirror2d", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 725, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 758, "end": 0, "name": "axis", "start": 0, "type": "Identifier" }, "arg": { "abs_path": false, "commentStart": 765, "end": 0, "name": { "commentStart": 765, "end": 0, "name": "Y", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "callee": { "abs_path": false, "commentStart": 749, "end": 0, "name": { "commentStart": 749, "end": 0, "name": "mirror2d", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 749, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 781, "end": 0, "name": "length", "start": 0, "type": "Identifier" }, "arg": { "abs_path": false, "commentStart": 790, "end": 0, "name": { "commentStart": 790, "end": 0, "name": "beamLength", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "callee": { "abs_path": false, "commentStart": 773, "end": 0, "name": { "commentStart": 773, "end": 0, "name": "extrude", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 773, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null } ], "commentStart": 438, "end": 0, "start": 0, "type": "PipeExpression", "type": "PipeExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "preComments": [ "", "", "// Sketch a quadrant of the beam cross section, then mirror for symmetry across each axis. Extrude to the appropriate length" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" } ], "commentStart": 0, "end": 0, "innerAttrs": [ { "commentStart": 0, "end": 0, "name": { "commentStart": 128, "end": 0, "name": "settings", "start": 0, "type": "Identifier" }, "preComments": [ "// I-beam", "// A structural metal beam with an I shaped cross section. Often used in construction and architecture", "", "", "// Set units" ], "properties": [ { "commentStart": 137, "end": 0, "key": { "commentStart": 137, "end": 0, "name": "defaultLengthUnit", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "abs_path": false, "commentStart": 157, "end": 0, "name": { "commentStart": 157, "end": 0, "name": "in", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "start": 0, "type": "Annotation" } ], "nonCodeMeta": { "nonCodeNodes": {}, "startNodes": [ { "commentStart": 160, "end": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ] }, "start": 0 } }