--- source: kcl-lib/src/simulation_tests.rs description: Result of parsing cycloidal-gear.kcl --- { "Ok": { "body": [ { "commentStart": 203, "declaration": { "commentStart": 208, "end": 0, "id": { "commentStart": 208, "end": 0, "name": "cycloidalGear", "start": 0, "type": "Identifier" }, "init": { "body": { "body": [ { "commentStart": 272, "declaration": { "commentStart": 437, "end": 0, "id": { "commentStart": 437, "end": 0, "name": "gearSketch", "start": 0, "type": "Identifier" }, "init": { "body": { "body": [ { "commentStart": 463, "declaration": { "commentStart": 463, "end": 0, "id": { "commentStart": 463, "end": 0, "name": "helixAngleP", "start": 0, "type": "Identifier" }, "init": { "commentStart": 477, "end": 0, "left": { "commentStart": 477, "end": 0, "left": { "abs_path": false, "commentStart": 477, "end": 0, "name": { "commentStart": 477, "end": 0, "name": "helixAngle", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "*", "right": { "abs_path": false, "commentStart": 490, "end": 0, "name": { "commentStart": 490, "end": 0, "name": "gHeight", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "operator": "/", "right": { "abs_path": false, "commentStart": 500, "end": 0, "name": { "commentStart": 500, "end": 0, "name": "gearHeight", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 515, "declaration": { "commentStart": 515, "end": 0, "id": { "commentStart": 515, "end": 0, "name": "gearProfile", "start": 0, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 559, "end": 0, "name": "offset", "start": 0, "type": "Identifier" }, "arg": { "abs_path": false, "commentStart": 568, "end": 0, "name": { "commentStart": 568, "end": 0, "name": "gHeight", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "callee": { "abs_path": false, "commentStart": 543, "end": 0, "name": { "commentStart": 543, "end": 0, "name": "offsetPlane", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 543, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": { "abs_path": false, "commentStart": 555, "end": 0, "name": { "commentStart": 555, "end": 0, "name": "XY", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "callee": { "abs_path": false, "commentStart": 529, "end": 0, "name": { "commentStart": 529, "end": 0, "name": "startSketchOn", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 529, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 602, "elements": [ { "commentStart": 615, "end": 0, "left": { "commentStart": 615, "end": 0, "left": { "commentStart": 615, "end": 0, "left": { "abs_path": false, "commentStart": 615, "end": 0, "name": { "commentStart": 615, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "*", "right": { "commentStart": 627, "end": 0, "raw": "1.55", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.55, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "operator": "*", "right": { "arguments": [ { "arguments": [ { "abs_path": false, "commentStart": 648, "end": 0, "name": { "commentStart": 648, "end": 0, "name": "helixAngleP", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } ], "callee": { "abs_path": false, "commentStart": 638, "end": 0, "name": { "commentStart": 638, "end": 0, "name": "toRadians", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 638, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" } ], "callee": { "abs_path": false, "commentStart": 634, "end": 0, "name": { "commentStart": 634, "end": 0, "name": "cos", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 634, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "operator": "+", "right": { "commentStart": 664, "end": 0, "left": { "abs_path": false, "commentStart": 664, "end": 0, "name": { "commentStart": 664, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "*", "right": { "arguments": [ { "arguments": [ { "argument": { "abs_path": false, "commentStart": 691, "end": 0, "name": { "commentStart": 691, "end": 0, "name": "helixAngleP", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "commentStart": 690, "end": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" } ], "callee": { "abs_path": false, "commentStart": 680, "end": 0, "name": { "commentStart": 680, "end": 0, "name": "toRadians", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 680, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" } ], "callee": { "abs_path": false, "commentStart": 676, "end": 0, "name": { "commentStart": 676, "end": 0, "name": "sin", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 676, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, { "commentStart": 717, "end": 0, "left": { "commentStart": 717, "end": 0, "left": { "commentStart": 717, "end": 0, "left": { "abs_path": false, "commentStart": 717, "end": 0, "name": { "commentStart": 717, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "*", "right": { "commentStart": 729, "end": 0, "raw": "1.55", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.55, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "operator": "*", "right": { "arguments": [ { "arguments": [ { "abs_path": false, "commentStart": 750, "end": 0, "name": { "commentStart": 750, "end": 0, "name": "helixAngleP", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } ], "callee": { "abs_path": false, "commentStart": 740, "end": 0, "name": { "commentStart": 740, "end": 0, "name": "toRadians", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 740, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" } ], "callee": { "abs_path": false, "commentStart": 736, "end": 0, "name": { "commentStart": 736, "end": 0, "name": "sin", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 736, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "operator": "+", "right": { "commentStart": 766, "end": 0, "left": { "abs_path": false, "commentStart": 766, "end": 0, "name": { "commentStart": 766, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "*", "right": { "arguments": [ { "arguments": [ { "argument": { "abs_path": false, "commentStart": 793, "end": 0, "name": { "commentStart": 793, "end": 0, "name": "helixAngleP", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "commentStart": 792, "end": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" } ], "callee": { "abs_path": false, "commentStart": 782, "end": 0, "name": { "commentStart": 782, "end": 0, "name": "toRadians", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 782, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" } ], "callee": { "abs_path": false, "commentStart": 778, "end": 0, "name": { "commentStart": 778, "end": 0, "name": "cos", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 778, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } ], "end": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" }, { "commentStart": 819, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 587, "end": 0, "name": { "commentStart": 587, "end": 0, "name": "startProfileAt", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 587, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 835, "end": 0, "properties": [ { "commentStart": 848, "end": 0, "key": { "commentStart": 848, "end": 0, "name": "angleStart", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "commentStart": 861, "end": 0, "left": { "commentStart": 861, "end": 0, "raw": "90", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, "suffix": "None" } }, "operator": "+", "right": { "abs_path": false, "commentStart": 866, "end": 0, "name": { "commentStart": 866, "end": 0, "name": "helixAngleP", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } }, { "commentStart": 890, "end": 0, "key": { "commentStart": 890, "end": 0, "name": "angleEnd", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "commentStart": 901, "end": 0, "left": { "argument": { "commentStart": 902, "end": 0, "raw": "90", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 90.0, "suffix": "None" } }, "commentStart": 901, "end": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" }, "operator": "+", "right": { "abs_path": false, "commentStart": 907, "end": 0, "name": { "commentStart": 907, "end": 0, "name": "helixAngleP", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } }, { "commentStart": 931, "end": 0, "key": { "commentStart": 931, "end": 0, "name": "radius", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "abs_path": false, "commentStart": 940, "end": 0, "name": { "commentStart": 940, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "start": 0, "type": "ObjectExpression", "type": "ObjectExpression" }, { "commentStart": 962, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 831, "end": 0, "name": { "commentStart": 831, "end": 0, "name": "arc", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 831, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 988, "end": 0, "properties": [ { "commentStart": 1001, "end": 0, "key": { "commentStart": 1001, "end": 0, "name": "radius", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "commentStart": 1010, "end": 0, "left": { "abs_path": false, "commentStart": 1010, "end": 0, "name": { "commentStart": 1010, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "*", "right": { "commentStart": 1022, "end": 0, "raw": "1.67", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.67, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } }, { "commentStart": 1039, "end": 0, "key": { "commentStart": 1039, "end": 0, "name": "offset", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "commentStart": 1048, "end": 0, "raw": "60", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, "suffix": "None" } } } ], "start": 0, "type": "ObjectExpression", "type": "ObjectExpression" }, { "commentStart": 1063, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 974, "end": 0, "name": { "commentStart": 974, "end": 0, "name": "tangentialArc", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 974, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 1089, "end": 0, "properties": [ { "commentStart": 1091, "end": 0, "key": { "commentStart": 1091, "end": 0, "name": "radius", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "abs_path": false, "commentStart": 1100, "end": 0, "name": { "commentStart": 1100, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } }, { "commentStart": 1111, "end": 0, "key": { "commentStart": 1111, "end": 0, "name": "offset", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "argument": { "commentStart": 1121, "end": 0, "raw": "180", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, "suffix": "None" } }, "commentStart": 1120, "end": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" } } ], "start": 0, "type": "ObjectExpression", "type": "ObjectExpression" }, { "commentStart": 1128, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 1075, "end": 0, "name": { "commentStart": 1075, "end": 0, "name": "tangentialArc", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1075, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 1154, "end": 0, "properties": [ { "commentStart": 1167, "end": 0, "key": { "commentStart": 1167, "end": 0, "name": "radius", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "commentStart": 1176, "end": 0, "left": { "abs_path": false, "commentStart": 1176, "end": 0, "name": { "commentStart": 1176, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "*", "right": { "commentStart": 1188, "end": 0, "raw": "1.67", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.67, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" } }, { "commentStart": 1205, "end": 0, "key": { "commentStart": 1205, "end": 0, "name": "offset", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "commentStart": 1214, "end": 0, "raw": "60", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 60.0, "suffix": "None" } } } ], "start": 0, "type": "ObjectExpression", "type": "ObjectExpression" }, { "commentStart": 1229, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 1140, "end": 0, "name": { "commentStart": 1140, "end": 0, "name": "tangentialArc", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1140, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 1255, "end": 0, "properties": [ { "commentStart": 1257, "end": 0, "key": { "commentStart": 1257, "end": 0, "name": "radius", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "abs_path": false, "commentStart": 1266, "end": 0, "name": { "commentStart": 1266, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } }, { "commentStart": 1277, "end": 0, "key": { "commentStart": 1277, "end": 0, "name": "offset", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "argument": { "commentStart": 1287, "end": 0, "raw": "180", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 180.0, "suffix": "None" } }, "commentStart": 1286, "end": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" } } ], "start": 0, "type": "ObjectExpression", "type": "ObjectExpression" }, { "commentStart": 1294, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 1241, "end": 0, "name": { "commentStart": 1241, "end": 0, "name": "tangentialArc", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1241, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 1322, "elements": [ { "arguments": [ { "commentStart": 1337, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 1323, "end": 0, "name": { "commentStart": 1323, "end": 0, "name": "profileStartX", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1323, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 1355, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 1341, "end": 0, "name": { "commentStart": 1341, "end": 0, "name": "profileStartY", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1341, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" } ], "end": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" }, { "commentStart": 1360, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 1306, "end": 0, "name": { "commentStart": 1306, "end": 0, "name": "tangentialArcTo", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1306, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 1378, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 1372, "end": 0, "name": { "commentStart": 1372, "end": 0, "name": "close", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1372, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 1402, "end": 0, "name": "center", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 1411, "elements": [ { "commentStart": 1412, "end": 0, "raw": "0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "commentStart": 1415, "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": 1419, "end": 0, "name": "radius", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 1428, "end": 0, "left": { "abs_path": false, "commentStart": 1428, "end": 0, "name": { "commentStart": 1428, "end": 0, "name": "holeDiameter", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "/", "right": { "commentStart": 1443, "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": 1395, "end": 0, "name": { "commentStart": 1395, "end": 0, "name": "circle", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1395, "end": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "commentStart": 1447, "end": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "abs_path": false, "commentStart": 1390, "end": 0, "name": { "commentStart": 1390, "end": 0, "name": "hole", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1390, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" } ], "commentStart": 529, "end": 0, "start": 0, "type": "PipeExpression", "type": "PipeExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "argument": { "abs_path": false, "commentStart": 1461, "end": 0, "name": { "commentStart": 1461, "end": 0, "name": "gearProfile", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "commentStart": 1454, "end": 0, "start": 0, "type": "ReturnStatement", "type": "ReturnStatement" } ], "commentStart": 457, "end": 0, "start": 0 }, "commentStart": 447, "end": 0, "params": [ { "type": "Parameter", "identifier": { "commentStart": 448, "end": 0, "name": "gHeight", "start": 0, "type": "Identifier" } } ], "start": 0, "type": "FunctionExpression", "type": "FunctionExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "fn", "preComments": [ "// Create a function to draw the gear profile as a sketch. Rotate each profile about the gear's axis by an helix angle proportional to the total gear height" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 1478, "declaration": { "commentStart": 1564, "end": 0, "id": { "commentStart": 1564, "end": 0, "name": "gearLoft", "start": 0, "type": "Identifier" }, "init": { "arguments": [ { "commentStart": 1580, "elements": [ { "arguments": [ { "commentStart": 1597, "end": 0, "raw": "0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "callee": { "abs_path": false, "commentStart": 1586, "end": 0, "name": { "commentStart": 1586, "end": 0, "name": "gearSketch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1586, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "commentStart": 1616, "end": 0, "left": { "abs_path": false, "commentStart": 1616, "end": 0, "name": { "commentStart": 1616, "end": 0, "name": "gearHeight", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "operator": "/", "right": { "commentStart": 1629, "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": 1605, "end": 0, "name": { "commentStart": 1605, "end": 0, "name": "gearSketch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1605, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "abs_path": false, "commentStart": 1648, "end": 0, "name": { "commentStart": 1648, "end": 0, "name": "gearHeight", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } ], "callee": { "abs_path": false, "commentStart": 1637, "end": 0, "name": { "commentStart": 1637, "end": 0, "name": "gearSketch", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1637, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" } ], "end": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" } ], "callee": { "abs_path": false, "commentStart": 1575, "end": 0, "name": { "commentStart": 1575, "end": 0, "name": "loft", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1575, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "preComments": [ "", "", "// Draw sketches of the gear profile along the gear height and loft them together" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "argument": { "abs_path": false, "commentStart": 1675, "end": 0, "name": { "commentStart": 1675, "end": 0, "name": "gearLoft", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "commentStart": 1664, "end": 0, "start": 0, "type": "ReturnStatement", "type": "ReturnStatement" } ], "commentStart": 272, "end": 0, "nonCodeMeta": { "nonCodeNodes": { "1": [ { "commentStart": 1664, "end": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ] }, "startNodes": [] }, "start": 0 }, "commentStart": 221, "end": 0, "params": [ { "type": "Parameter", "identifier": { "commentStart": 222, "end": 0, "name": "gearPitch", "start": 0, "type": "Identifier" } }, { "type": "Parameter", "identifier": { "commentStart": 233, "end": 0, "name": "gearHeight", "start": 0, "type": "Identifier" } }, { "type": "Parameter", "identifier": { "commentStart": 245, "end": 0, "name": "holeDiameter", "start": 0, "type": "Identifier" } }, { "type": "Parameter", "identifier": { "commentStart": 259, "end": 0, "name": "helixAngle", "start": 0, "type": "Identifier" } } ], "start": 0, "type": "FunctionExpression", "type": "FunctionExpression" }, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "fn", "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 1685, "end": 0, "expression": { "arguments": [ { "commentStart": 1701, "end": 0, "raw": ".3", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.3, "suffix": "None" } }, { "commentStart": 1705, "end": 0, "raw": "1.5", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.5, "suffix": "None" } }, { "commentStart": 1710, "end": 0, "raw": "0.297", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.297, "suffix": "None" } }, { "argument": { "commentStart": 1718, "end": 0, "raw": "80", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 80.0, "suffix": "None" } }, "commentStart": 1717, "end": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" } ], "callee": { "abs_path": false, "commentStart": 1687, "end": 0, "name": { "commentStart": 1687, "end": 0, "name": "cycloidalGear", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 1687, "end": 0, "start": 0, "type": "CallExpression", "type": "CallExpression" }, "start": 0, "type": "ExpressionStatement", "type": "ExpressionStatement" } ], "commentStart": 0, "end": 0, "innerAttrs": [ { "commentStart": 0, "end": 0, "name": { "commentStart": 171, "end": 0, "name": "settings", "start": 0, "type": "Identifier" }, "preComments": [ "// Cycloidal Gear", "// A cycloidal gear is a gear with a continuous, curved tooth profile. They are used in watchmaking and high precision robotics actuation", "", "", "// Set Units" ], "properties": [ { "commentStart": 180, "end": 0, "key": { "commentStart": 180, "end": 0, "name": "defaultLengthUnit", "start": 0, "type": "Identifier" }, "start": 0, "type": "ObjectProperty", "value": { "abs_path": false, "commentStart": 200, "end": 0, "name": { "commentStart": 200, "end": 0, "name": "in", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "start": 0, "type": "Annotation" } ], "nonCodeMeta": { "nonCodeNodes": { "0": [ { "commentStart": 1685, "end": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ] }, "startNodes": [ { "commentStart": 203, "end": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ] }, "start": 0 } }