--- source: kcl-lib/src/simulation_tests.rs description: Result of parsing pipe-with-bend.kcl --- { "Ok": { "body": [ { "commentStart": 210, "declaration": { "commentStart": 232, "end": 0, "id": { "commentStart": 232, "end": 0, "name": "innerDiameter", "start": 0, "type": "Identifier" }, "init": { "commentStart": 248, "end": 0, "raw": "10", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 10.0, "suffix": "None" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "preComments": [ "// Define constants" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 251, "declaration": { "commentStart": 251, "end": 0, "id": { "commentStart": 251, "end": 0, "name": "outerDiameter", "start": 0, "type": "Identifier" }, "init": { "commentStart": 267, "end": 0, "raw": "20", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 20.0, "suffix": "None" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 270, "declaration": { "commentStart": 270, "end": 0, "id": { "commentStart": 270, "end": 0, "name": "bendRadius", "start": 0, "type": "Identifier" }, "init": { "commentStart": 283, "end": 0, "raw": "30", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 30.0, "suffix": "None" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 286, "declaration": { "commentStart": 286, "end": 0, "id": { "commentStart": 286, "end": 0, "name": "bendAngle", "start": 0, "type": "Identifier" }, "init": { "commentStart": 298, "end": 0, "raw": "90", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, "suffix": "None" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 300, "declaration": { "commentStart": 339, "end": 0, "id": { "commentStart": 339, "end": 0, "name": "sketch000", "start": 0, "type": "Identifier" }, "init": { "arguments": [ { "commentStart": 365, "end": 0, "raw": "\"XZ\"", "start": 0, "type": "Literal", "type": "Literal", "value": "XZ" } ], "callee": { "commentStart": 351, "end": 0, "name": "startSketchOn", "start": 0, "type": "Identifier" }, "commentStart": 351, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "preComments": [ "", "", "// create a sketch in the 'XZ' plane" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 370, "declaration": { "commentStart": 415, "end": 0, "id": { "commentStart": 415, "end": 0, "name": "outerProfile", "start": 0, "type": "Identifier" }, "init": { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 448, "end": 0, "name": "center", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 457, "elements": [ { "commentStart": 458, "end": 0, "name": "bendRadius", "start": 0, "type": "Identifier", "type": "Identifier" }, { "commentStart": 470, "end": 0, "raw": "0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "commentStart": 474, "end": 0, "name": "radius", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 483, "end": 0, "left": { "commentStart": 483, "end": 0, "name": "outerDiameter", "start": 0, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "commentStart": 499, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "commentStart": 430, "end": 0, "name": "circle", "start": 0, "type": "Identifier" }, "commentStart": 430, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": { "commentStart": 437, "end": 0, "name": "sketch000", "start": 0, "type": "Identifier", "type": "Identifier" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "preComments": [ "", "", "// create a profile for the outer diameter" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 501, "declaration": { "commentStart": 546, "end": 0, "id": { "commentStart": 546, "end": 0, "name": "innerProfile", "start": 0, "type": "Identifier" }, "init": { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 579, "end": 0, "name": "center", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 588, "elements": [ { "commentStart": 589, "end": 0, "name": "bendRadius", "start": 0, "type": "Identifier", "type": "Identifier" }, { "commentStart": 601, "end": 0, "raw": "0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "commentStart": 605, "end": 0, "name": "radius", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 614, "end": 0, "left": { "commentStart": 614, "end": 0, "name": "innerDiameter", "start": 0, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "commentStart": 630, "end": 0, "raw": "2", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "commentStart": 561, "end": 0, "name": "circle", "start": 0, "type": "Identifier" }, "commentStart": 561, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": { "commentStart": 568, "end": 0, "name": "sketch000", "start": 0, "type": "Identifier", "type": "Identifier" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "preComments": [ "", "", "// create a profile for the inner diameter" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 632, "declaration": { "commentStart": 668, "end": 0, "id": { "commentStart": 668, "end": 0, "name": "pipeProfile", "start": 0, "type": "Identifier" }, "init": { "body": [ { "commentStart": 682, "end": 0, "name": "outerProfile", "start": 0, "type": "Identifier", "type": "Identifier" }, { "arguments": [ { "commentStart": 705, "end": 0, "name": "innerProfile", "start": 0, "type": "Identifier", "type": "Identifier" }, { "commentStart": 719, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "commentStart": 700, "end": 0, "name": "hole", "start": 0, "type": "Identifier" }, "commentStart": 700, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" } ], "commentStart": 682, "end": 0, "nonCodeMeta": { "nonCodeNodes": { "1": [ { "commentStart": 721, "end": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "revolve the pipe profile at the desired angle", "style": "line" } } ] }, "startNodes": [] }, "start": 0, "type": "PipeExpression", "type": "PipeExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "preComments": [ "", "", "// create the profile of the pipe" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 772, "declaration": { "commentStart": 772, "end": 0, "id": { "commentStart": 772, "end": 0, "name": "pipe", "start": 0, "type": "Identifier" }, "init": { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 800, "end": 0, "name": "axis", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 807, "end": 0, "raw": "'Y'", "start": 0, "type": "Literal", "type": "Literal", "value": "Y" } }, { "type": "LabeledArg", "label": { "commentStart": 812, "end": 0, "name": "angle", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 820, "end": 0, "name": "bendAngle", "start": 0, "type": "Identifier", "type": "Identifier" } } ], "callee": { "commentStart": 779, "end": 0, "name": "revolve", "start": 0, "type": "Identifier" }, "commentStart": 779, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": { "commentStart": 787, "end": 0, "name": "pipeProfile", "start": 0, "type": "Identifier", "type": "Identifier" } }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" } ], "commentStart": 0, "end": 0, "innerAttrs": [ { "commentStart": 0, "end": 0, "name": { "commentStart": 178, "end": 0, "name": "settings", "start": 0, "type": "Identifier" }, "preComments": [ "// Pipe with bend", "// A tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances that can flow.", "", "", "// Set units" ], "properties": [ { "commentStart": 187, "end": 0, "key": { "commentStart": 187, "end": 0, "name": "defaultLengthUnit", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "commentStart": 207, "end": 0, "name": "in", "start": 0, "type": "Identifier", "type": "Identifier" } } ], "start": 0, "type": "Annotation" } ], "nonCodeMeta": { "nonCodeNodes": {}, "startNodes": [ { "commentStart": 210, "end": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ] }, "start": 0 } }