--- source: kcl-lib/src/simulation_tests.rs description: Result of parsing flange-xy.kcl --- { "Ok": { "body": [ { "declaration": { "end": 397, "id": { "end": 390, "name": "mountingHoleDia", "start": 375, "type": "Identifier" }, "init": { "end": 397, "raw": ".625", "start": 393, "type": "Literal", "type": "Literal", "value": { "value": 0.625, "suffix": "None" } }, "start": 375, "type": "VariableDeclarator" }, "end": 397, "kind": "const", "start": 375, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 413, "id": { "end": 405, "name": "baseDia", "start": 398, "type": "Identifier" }, "init": { "end": 413, "raw": "4.625", "start": 408, "type": "Literal", "type": "Literal", "value": { "value": 4.625, "suffix": "None" } }, "start": 398, "type": "VariableDeclarator" }, "end": 413, "kind": "const", "start": 398, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 428, "id": { "end": 421, "name": "pipeDia", "start": 414, "type": "Identifier" }, "init": { "end": 428, "raw": "1.25", "start": 424, "type": "Literal", "type": "Literal", "value": { "value": 1.25, "suffix": "None" } }, "start": 414, "type": "VariableDeclarator" }, "end": 428, "kind": "const", "start": 414, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 445, "id": { "end": 438, "name": "thickness", "start": 429, "type": "Identifier" }, "init": { "end": 445, "raw": ".625", "start": 441, "type": "Literal", "type": "Literal", "value": { "value": 0.625, "suffix": "None" } }, "start": 429, "type": "VariableDeclarator" }, "end": 445, "kind": "const", "start": 429, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 468, "id": { "end": 460, "name": "totalThickness", "start": 446, "type": "Identifier" }, "init": { "end": 468, "raw": "0.813", "start": 463, "type": "Literal", "type": "Literal", "value": { "value": 0.813, "suffix": "None" } }, "start": 446, "type": "VariableDeclarator" }, "end": 468, "kind": "const", "start": 446, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 493, "id": { "end": 485, "name": "topTotalDiameter", "start": 469, "type": "Identifier" }, "init": { "end": 493, "raw": "2.313", "start": 488, "type": "Literal", "type": "Literal", "value": { "value": 2.313, "suffix": "None" } }, "start": 469, "type": "VariableDeclarator" }, "end": 493, "kind": "const", "start": 469, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 516, "id": { "end": 509, "name": "bottomThickness", "start": 494, "type": "Identifier" }, "init": { "end": 516, "raw": "0.06", "start": 512, "type": "Literal", "type": "Literal", "value": { "value": 0.06, "suffix": "None" } }, "start": 494, "type": "VariableDeclarator" }, "end": 516, "kind": "const", "start": 494, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 542, "id": { "end": 536, "name": "bottomTotalDiameter", "start": 517, "type": "Identifier" }, "init": { "end": 542, "raw": "2.5", "start": 539, "type": "Literal", "type": "Literal", "value": { "value": 2.5, "suffix": "None" } }, "start": 517, "type": "VariableDeclarator" }, "end": 542, "kind": "const", "start": 517, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 578, "id": { "end": 572, "name": "mountingHolePlacementDiameter", "start": 543, "type": "Identifier" }, "init": { "end": 578, "raw": "3.5", "start": 575, "type": "Literal", "type": "Literal", "value": { "value": 3.5, "suffix": "None" } }, "start": 543, "type": "VariableDeclarator" }, "end": 578, "kind": "const", "start": 543, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 599, "id": { "end": 592, "name": "baseThickness", "start": 579, "type": "Identifier" }, "init": { "end": 599, "raw": ".625", "start": 595, "type": "Literal", "type": "Literal", "value": { "value": 0.625, "suffix": "None" } }, "start": 579, "type": "VariableDeclarator" }, "end": 599, "kind": "const", "start": 579, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 669, "id": { "end": 617, "name": "topTotalThickness", "start": 600, "type": "Identifier" }, "init": { "end": 669, "left": { "end": 634, "name": "totalThickness", "start": 620, "type": "Identifier", "type": "Identifier" }, "operator": "-", "right": { "end": 669, "left": { "end": 653, "name": "bottomThickness", "start": 638, "type": "Identifier", "type": "Identifier" }, "operator": "+", "right": { "end": 669, "name": "baseThickness", "start": 656, "type": "Identifier", "type": "Identifier" }, "start": 638, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 620, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 600, "type": "VariableDeclarator" }, "end": 669, "kind": "const", "start": 600, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 696, "id": { "end": 682, "name": "holeLocator", "start": 671, "type": "Identifier" }, "init": { "end": 696, "left": { "end": 692, "name": "baseDia", "start": 685, "type": "Identifier", "type": "Identifier" }, "operator": "-", "right": { "end": 696, "raw": "8", "start": 695, "type": "Literal", "type": "Literal", "value": { "value": 8.0, "suffix": "None" } }, "start": 685, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 671, "type": "VariableDeclarator" }, "end": 696, "kind": "const", "start": 671, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 707, "id": { "end": 703, "name": "nHoles", "start": 697, "type": "Identifier" }, "init": { "end": 707, "raw": "4", "start": 706, "type": "Literal", "type": "Literal", "value": { "value": 4.0, "suffix": "None" } }, "start": 697, "type": "VariableDeclarator" }, "end": 707, "kind": "const", "start": 697, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "end": 823, "expression": { "arguments": [ { "end": 786, "name": "nHoles", "start": 780, "type": "Identifier", "type": "Identifier" }, { "end": 789, "raw": "1", "start": 788, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, { "end": 822, "raw": "\"nHoles must be greater than 1\"", "start": 791, "type": "Literal", "type": "Literal", "value": "nHoles must be greater than 1" } ], "callee": { "end": 779, "name": "assertGreaterThan", "start": 762, "type": "Identifier" }, "end": 823, "start": 762, "type": "CallExpression", "type": "CallExpression" }, "start": 762, "type": "ExpressionStatement", "type": "ExpressionStatement" }, { "declaration": { "end": 1609, "id": { "end": 888, "name": "flangeBase", "start": 878, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "end": 909, "raw": "'XY'", "start": 905, "type": "Literal", "type": "Literal", "value": "XY" } ], "callee": { "end": 904, "name": "startSketchOn", "start": 891, "type": "Identifier" }, "end": 910, "start": 891, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 937, "name": "center", "start": 931, "type": "Identifier" }, "arg": { "elements": [ { "end": 942, "raw": "0", "start": 941, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 945, "raw": "0", "start": 944, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 946, "start": 940, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 961, "name": "radius", "start": 955, "type": "Identifier" }, "arg": { "end": 975, "left": { "end": 971, "name": "baseDia", "start": 964, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 975, "raw": "2", "start": 974, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 964, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 922, "name": "circle", "start": 916, "type": "Identifier" }, "end": 982, "start": 916, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 1014, "name": "center", "start": 1008, "type": "Identifier" }, "arg": { "elements": [ { "end": 1051, "left": { "end": 1047, "name": "mountingHolePlacementDiameter", "start": 1018, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1051, "raw": "2", "start": 1050, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1018, "type": "BinaryExpression", "type": "BinaryExpression" }, { "end": 1054, "raw": "0", "start": 1053, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 1055, "start": 1017, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1070, "name": "radius", "start": 1064, "type": "Identifier" }, "arg": { "end": 1092, "left": { "end": 1088, "name": "mountingHoleDia", "start": 1073, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1092, "raw": "2", "start": 1091, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1073, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 999, "name": "circle", "start": 993, "type": "Identifier" }, "end": 1099, "start": 993, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 1102, "start": 1101, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 992, "name": "hole", "start": 988, "type": "Identifier" }, "end": 1103, "start": 988, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 1135, "name": "center", "start": 1129, "type": "Identifier" }, "arg": { "elements": [ { "end": 1140, "raw": "0", "start": 1139, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 1175, "left": { "end": 1171, "name": "mountingHolePlacementDiameter", "start": 1142, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1175, "raw": "2", "start": 1174, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1142, "type": "BinaryExpression", "type": "BinaryExpression" } ], "end": 1176, "start": 1138, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1191, "name": "radius", "start": 1185, "type": "Identifier" }, "arg": { "end": 1213, "left": { "end": 1209, "name": "mountingHoleDia", "start": 1194, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1213, "raw": "2", "start": 1212, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1194, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 1120, "name": "circle", "start": 1114, "type": "Identifier" }, "end": 1220, "start": 1114, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 1223, "start": 1222, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 1113, "name": "hole", "start": 1109, "type": "Identifier" }, "end": 1224, "start": 1109, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 1256, "name": "center", "start": 1250, "type": "Identifier" }, "arg": { "elements": [ { "end": 1294, "left": { "argument": { "end": 1290, "name": "mountingHolePlacementDiameter", "start": 1261, "type": "Identifier", "type": "Identifier" }, "end": 1290, "operator": "-", "start": 1260, "type": "UnaryExpression", "type": "UnaryExpression" }, "operator": "/", "right": { "end": 1294, "raw": "2", "start": 1293, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1260, "type": "BinaryExpression", "type": "BinaryExpression" }, { "end": 1297, "raw": "0", "start": 1296, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 1298, "start": 1259, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1313, "name": "radius", "start": 1307, "type": "Identifier" }, "arg": { "end": 1335, "left": { "end": 1331, "name": "mountingHoleDia", "start": 1316, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1335, "raw": "2", "start": 1334, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1316, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 1241, "name": "circle", "start": 1235, "type": "Identifier" }, "end": 1342, "start": 1235, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 1345, "start": 1344, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 1234, "name": "hole", "start": 1230, "type": "Identifier" }, "end": 1346, "start": 1230, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 1378, "name": "center", "start": 1372, "type": "Identifier" }, "arg": { "elements": [ { "end": 1383, "raw": "0", "start": 1382, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 1419, "left": { "argument": { "end": 1415, "name": "mountingHolePlacementDiameter", "start": 1386, "type": "Identifier", "type": "Identifier" }, "end": 1415, "operator": "-", "start": 1385, "type": "UnaryExpression", "type": "UnaryExpression" }, "operator": "/", "right": { "end": 1419, "raw": "2", "start": 1418, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1385, "type": "BinaryExpression", "type": "BinaryExpression" } ], "end": 1420, "start": 1381, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1435, "name": "radius", "start": 1429, "type": "Identifier" }, "arg": { "end": 1457, "left": { "end": 1453, "name": "mountingHoleDia", "start": 1438, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1457, "raw": "2", "start": 1456, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1438, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 1363, "name": "circle", "start": 1357, "type": "Identifier" }, "end": 1464, "start": 1357, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 1467, "start": 1466, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 1356, "name": "hole", "start": 1352, "type": "Identifier" }, "end": 1468, "start": 1352, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 1500, "name": "center", "start": 1494, "type": "Identifier" }, "arg": { "elements": [ { "end": 1505, "raw": "0", "start": 1504, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 1508, "raw": "0", "start": 1507, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 1509, "start": 1503, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1524, "name": "radius", "start": 1518, "type": "Identifier" }, "arg": { "end": 1538, "left": { "end": 1534, "name": "pipeDia", "start": 1527, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1538, "raw": "2", "start": 1537, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1527, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 1485, "name": "circle", "start": 1479, "type": "Identifier" }, "end": 1545, "start": 1479, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 1548, "start": 1547, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 1478, "name": "hole", "start": 1474, "type": "Identifier" }, "end": 1549, "start": 1474, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 1569, "name": "length", "start": 1563, "type": "Identifier" }, "arg": { "end": 1585, "name": "baseThickness", "start": 1572, "type": "Identifier", "type": "Identifier" } } ], "callee": { "end": 1562, "name": "extrude", "start": 1555, "type": "Identifier" }, "end": 1586, "start": 1555, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null } ], "end": 1609, "nonCodeMeta": { "nonCodeNodes": { "7": [ { "end": 1609, "start": 1586, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Plane for top face", "style": "line" } } ] }, "startNodes": [] }, "start": 891, "type": "PipeExpression", "type": "PipeExpression" }, "start": 878, "type": "VariableDeclarator" }, "end": 1609, "kind": "const", "start": 878, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 1804, "id": { "end": 1622, "name": "topFacePlane", "start": 1610, "type": "Identifier" }, "init": { "end": 1804, "properties": [ { "end": 1802, "key": { "end": 1634, "name": "plane", "start": 1629, "type": "Identifier" }, "start": 1629, "type": "ObjectProperty", "value": { "end": 1802, "properties": [ { "end": 1687, "key": { "end": 1649, "name": "origin", "start": 1643, "type": "Identifier" }, "start": 1643, "type": "ObjectProperty", "value": { "end": 1687, "properties": [ { "end": 1659, "key": { "end": 1655, "name": "x", "start": 1654, "type": "Identifier" }, "start": 1654, "type": "ObjectProperty", "value": { "end": 1659, "raw": "0", "start": 1658, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1666, "key": { "end": 1662, "name": "y", "start": 1661, "type": "Identifier" }, "start": 1661, "type": "ObjectProperty", "value": { "end": 1666, "raw": "0", "start": 1665, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1685, "key": { "end": 1669, "name": "z", "start": 1668, "type": "Identifier" }, "start": 1668, "type": "ObjectProperty", "value": { "end": 1685, "name": "baseThickness", "start": 1672, "type": "Identifier", "type": "Identifier" } } ], "start": 1652, "type": "ObjectExpression", "type": "ObjectExpression" } }, { "end": 1724, "key": { "end": 1698, "name": "xAxis", "start": 1693, "type": "Identifier" }, "start": 1693, "type": "ObjectProperty", "value": { "end": 1724, "properties": [ { "end": 1708, "key": { "end": 1704, "name": "x", "start": 1703, "type": "Identifier" }, "start": 1703, "type": "ObjectProperty", "value": { "end": 1708, "raw": "1", "start": 1707, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } } }, { "end": 1715, "key": { "end": 1711, "name": "y", "start": 1710, "type": "Identifier" }, "start": 1710, "type": "ObjectProperty", "value": { "end": 1715, "raw": "0", "start": 1714, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1722, "key": { "end": 1718, "name": "z", "start": 1717, "type": "Identifier" }, "start": 1717, "type": "ObjectProperty", "value": { "end": 1722, "raw": "0", "start": 1721, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } } ], "start": 1701, "type": "ObjectExpression", "type": "ObjectExpression" } }, { "end": 1761, "key": { "end": 1735, "name": "yAxis", "start": 1730, "type": "Identifier" }, "start": 1730, "type": "ObjectProperty", "value": { "end": 1761, "properties": [ { "end": 1745, "key": { "end": 1741, "name": "x", "start": 1740, "type": "Identifier" }, "start": 1740, "type": "ObjectProperty", "value": { "end": 1745, "raw": "0", "start": 1744, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1752, "key": { "end": 1748, "name": "y", "start": 1747, "type": "Identifier" }, "start": 1747, "type": "ObjectProperty", "value": { "end": 1752, "raw": "1", "start": 1751, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } } }, { "end": 1759, "key": { "end": 1755, "name": "z", "start": 1754, "type": "Identifier" }, "start": 1754, "type": "ObjectProperty", "value": { "end": 1759, "raw": "0", "start": 1758, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } } ], "start": 1738, "type": "ObjectExpression", "type": "ObjectExpression" } }, { "end": 1798, "key": { "end": 1772, "name": "zAxis", "start": 1767, "type": "Identifier" }, "start": 1767, "type": "ObjectProperty", "value": { "end": 1798, "properties": [ { "end": 1782, "key": { "end": 1778, "name": "x", "start": 1777, "type": "Identifier" }, "start": 1777, "type": "ObjectProperty", "value": { "end": 1782, "raw": "0", "start": 1781, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1789, "key": { "end": 1785, "name": "y", "start": 1784, "type": "Identifier" }, "start": 1784, "type": "ObjectProperty", "value": { "end": 1789, "raw": "0", "start": 1788, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1796, "key": { "end": 1792, "name": "z", "start": 1791, "type": "Identifier" }, "start": 1791, "type": "ObjectProperty", "value": { "end": 1796, "raw": "1", "start": 1795, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } } } ], "start": 1775, "type": "ObjectExpression", "type": "ObjectExpression" } } ], "start": 1637, "type": "ObjectExpression", "type": "ObjectExpression" } } ], "start": 1625, "type": "ObjectExpression", "type": "ObjectExpression" }, "start": 1610, "type": "VariableDeclarator" }, "end": 1804, "kind": "const", "start": 1610, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 2170, "id": { "end": 1872, "name": "topExtrusion", "start": 1860, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "end": 1901, "name": "topFacePlane", "start": 1889, "type": "Identifier", "type": "Identifier" }, { "end": 1908, "raw": "'end'", "start": 1903, "type": "Literal", "type": "Literal", "value": "end" } ], "callee": { "end": 1888, "name": "startSketchOn", "start": 1875, "type": "Identifier" }, "end": 1909, "start": 1875, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 1936, "name": "center", "start": 1930, "type": "Identifier" }, "arg": { "elements": [ { "end": 1941, "raw": "0", "start": 1940, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 1944, "raw": "0", "start": 1943, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 1945, "start": 1939, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1960, "name": "radius", "start": 1954, "type": "Identifier" }, "arg": { "end": 1983, "left": { "end": 1979, "name": "topTotalDiameter", "start": 1963, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1983, "raw": "2", "start": 1982, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1963, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 1921, "name": "circle", "start": 1915, "type": "Identifier" }, "end": 1990, "start": 1915, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 2022, "name": "center", "start": 2016, "type": "Identifier" }, "arg": { "elements": [ { "end": 2027, "raw": "0", "start": 2026, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 2030, "raw": "0", "start": 2029, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 2031, "start": 2025, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 2046, "name": "radius", "start": 2040, "type": "Identifier" }, "arg": { "end": 2060, "left": { "end": 2056, "name": "pipeDia", "start": 2049, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 2060, "raw": "2", "start": 2059, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 2049, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 2007, "name": "circle", "start": 2001, "type": "Identifier" }, "end": 2067, "start": 2001, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 2070, "start": 2069, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 2000, "name": "hole", "start": 1996, "type": "Identifier" }, "end": 2071, "start": 1996, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 2091, "name": "length", "start": 2085, "type": "Identifier" }, "arg": { "end": 2111, "name": "topTotalThickness", "start": 2094, "type": "Identifier", "type": "Identifier" } } ], "callee": { "end": 2084, "name": "extrude", "start": 2077, "type": "Identifier" }, "end": 2112, "start": 2077, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null } ], "end": 2170, "nonCodeMeta": { "nonCodeNodes": { "3": [ { "end": 2170, "start": 2112, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Create the extrusion on the bottom of the flange base", "style": "line" } } ] }, "startNodes": [] }, "start": 1875, "type": "PipeExpression", "type": "PipeExpression" }, "start": 1860, "type": "VariableDeclarator" }, "end": 2170, "kind": "const", "start": 1860, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 2453, "id": { "end": 2186, "name": "bottomExtrusion", "start": 2171, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "end": 2207, "raw": "\"XY\"", "start": 2203, "type": "Literal", "type": "Literal", "value": "XY" } ], "callee": { "end": 2202, "name": "startSketchOn", "start": 2189, "type": "Identifier" }, "end": 2208, "start": 2189, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 2235, "name": "center", "start": 2229, "type": "Identifier" }, "arg": { "elements": [ { "end": 2240, "raw": "0", "start": 2239, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 2243, "raw": "0", "start": 2242, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 2244, "start": 2238, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 2259, "name": "radius", "start": 2253, "type": "Identifier" }, "arg": { "end": 2285, "left": { "end": 2281, "name": "bottomTotalDiameter", "start": 2262, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 2285, "raw": "2", "start": 2284, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 2262, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 2220, "name": "circle", "start": 2214, "type": "Identifier" }, "end": 2292, "start": 2214, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 2324, "name": "center", "start": 2318, "type": "Identifier" }, "arg": { "elements": [ { "end": 2329, "raw": "0", "start": 2328, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 2332, "raw": "0", "start": 2331, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 2333, "start": 2327, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 2348, "name": "radius", "start": 2342, "type": "Identifier" }, "arg": { "end": 2362, "left": { "end": 2358, "name": "pipeDia", "start": 2351, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 2362, "raw": "2", "start": 2361, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 2351, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 2309, "name": "circle", "start": 2303, "type": "Identifier" }, "end": 2369, "start": 2303, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 2372, "start": 2371, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 2302, "name": "hole", "start": 2298, "type": "Identifier" }, "end": 2373, "start": 2298, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 2393, "name": "length", "start": 2387, "type": "Identifier" }, "arg": { "argument": { "end": 2412, "name": "bottomThickness", "start": 2397, "type": "Identifier", "type": "Identifier" }, "end": 2412, "operator": "-", "start": 2396, "type": "UnaryExpression", "type": "UnaryExpression" } } ], "callee": { "end": 2386, "name": "extrude", "start": 2379, "type": "Identifier" }, "end": 2413, "start": 2379, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null } ], "end": 2453, "nonCodeMeta": { "nonCodeNodes": { "3": [ { "end": 2453, "start": 2413, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "https://www.mcmaster.com/44685K193/", "style": "line" } } ] }, "startNodes": [] }, "start": 2189, "type": "PipeExpression", "type": "PipeExpression" }, "start": 2171, "type": "VariableDeclarator" }, "end": 2453, "kind": "const", "start": 2171, "type": "VariableDeclaration", "type": "VariableDeclaration" } ], "end": 2454, "innerAttrs": [ { "end": 353, "name": { "end": 329, "name": "settings", "start": 321, "type": "Identifier" }, "properties": [ { "end": 352, "key": { "end": 347, "name": "defaultLengthUnit", "start": 330, "type": "Identifier" }, "start": 330, "type": "ObjectProperty", "value": { "end": 352, "name": "in", "start": 350, "type": "Identifier", "type": "Identifier" } } ], "start": 320, "type": "Annotation" } ], "nonCodeMeta": { "nonCodeNodes": { "12": [ { "end": 761, "start": 707, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Add assertion so nHoles are always greater than 1", "style": "line" } } ], "13": [ { "end": 877, "start": 823, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Create the flange base and the six mounting holes", "style": "line" } } ], "15": [ { "end": 1859, "start": 1804, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Create the extrusion on the top of the flange base", "style": "line" } } ] }, "startNodes": [ { "end": 29, "start": 0, "type": "NonCodeNode", "value": { "type": "blockComment", "value": "Flange with XY coordinates", "style": "line" } }, { "end": 305, "start": 30, "type": "NonCodeNode", "value": { "type": "blockComment", "value": "A flange is a flat rim, collar, or rib, typically forged or cast, that is used to strengthen an object, guide it, or attach it to another object. Flanges are known for their use in various applications, including piping, plumbing, and mechanical engineering, among others.", "style": "line" } }, { "end": 307, "start": 305, "type": "NonCodeNode", "value": { "type": "newLine" } }, { "end": 319, "start": 307, "type": "NonCodeNode", "value": { "type": "blockComment", "value": "Set units", "style": "line" } }, { "end": 355, "start": 353, "type": "NonCodeNode", "value": { "type": "newLine" } }, { "end": 374, "start": 355, "type": "NonCodeNode", "value": { "type": "blockComment", "value": "Define constants", "style": "line" } } ] }, "start": 0 } }