--- source: kcl-lib/src/simulation_tests.rs description: Result of parsing flange-with-patterns.kcl --- { "Ok": { "body": [ { "declaration": { "end": 377, "id": { "end": 370, "name": "mountingHoleDia", "start": 355, "type": "Identifier" }, "init": { "end": 377, "raw": ".625", "start": 373, "type": "Literal", "type": "Literal", "value": { "value": 0.625, "suffix": "None" } }, "start": 355, "type": "VariableDeclarator" }, "end": 377, "kind": "const", "start": 355, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 393, "id": { "end": 385, "name": "baseDia", "start": 378, "type": "Identifier" }, "init": { "end": 393, "raw": "4.625", "start": 388, "type": "Literal", "type": "Literal", "value": { "value": 4.625, "suffix": "None" } }, "start": 378, "type": "VariableDeclarator" }, "end": 393, "kind": "const", "start": 378, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 408, "id": { "end": 401, "name": "pipeDia", "start": 394, "type": "Identifier" }, "init": { "end": 408, "raw": "1.25", "start": 404, "type": "Literal", "type": "Literal", "value": { "value": 1.25, "suffix": "None" } }, "start": 394, "type": "VariableDeclarator" }, "end": 408, "kind": "const", "start": 394, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 425, "id": { "end": 418, "name": "thickness", "start": 409, "type": "Identifier" }, "init": { "end": 425, "raw": ".625", "start": 421, "type": "Literal", "type": "Literal", "value": { "value": 0.625, "suffix": "None" } }, "start": 409, "type": "VariableDeclarator" }, "end": 425, "kind": "const", "start": 409, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 448, "id": { "end": 440, "name": "totalThickness", "start": 426, "type": "Identifier" }, "init": { "end": 448, "raw": "0.813", "start": 443, "type": "Literal", "type": "Literal", "value": { "value": 0.813, "suffix": "None" } }, "start": 426, "type": "VariableDeclarator" }, "end": 448, "kind": "const", "start": 426, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 473, "id": { "end": 465, "name": "topTotalDiameter", "start": 449, "type": "Identifier" }, "init": { "end": 473, "raw": "2.313", "start": 468, "type": "Literal", "type": "Literal", "value": { "value": 2.313, "suffix": "None" } }, "start": 449, "type": "VariableDeclarator" }, "end": 473, "kind": "const", "start": 449, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 496, "id": { "end": 489, "name": "bottomThickness", "start": 474, "type": "Identifier" }, "init": { "end": 496, "raw": "0.06", "start": 492, "type": "Literal", "type": "Literal", "value": { "value": 0.06, "suffix": "None" } }, "start": 474, "type": "VariableDeclarator" }, "end": 496, "kind": "const", "start": 474, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 522, "id": { "end": 516, "name": "bottomTotalDiameter", "start": 497, "type": "Identifier" }, "init": { "end": 522, "raw": "2.5", "start": 519, "type": "Literal", "type": "Literal", "value": { "value": 2.5, "suffix": "None" } }, "start": 497, "type": "VariableDeclarator" }, "end": 522, "kind": "const", "start": 497, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 558, "id": { "end": 552, "name": "mountingHolePlacementDiameter", "start": 523, "type": "Identifier" }, "init": { "end": 558, "raw": "3.5", "start": 555, "type": "Literal", "type": "Literal", "value": { "value": 3.5, "suffix": "None" } }, "start": 523, "type": "VariableDeclarator" }, "end": 558, "kind": "const", "start": 523, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 579, "id": { "end": 572, "name": "baseThickness", "start": 559, "type": "Identifier" }, "init": { "end": 579, "raw": ".625", "start": 575, "type": "Literal", "type": "Literal", "value": { "value": 0.625, "suffix": "None" } }, "start": 559, "type": "VariableDeclarator" }, "end": 579, "kind": "const", "start": 559, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 649, "id": { "end": 597, "name": "topTotalThickness", "start": 580, "type": "Identifier" }, "init": { "end": 649, "left": { "end": 614, "name": "totalThickness", "start": 600, "type": "Identifier", "type": "Identifier" }, "operator": "-", "right": { "end": 649, "left": { "end": 633, "name": "bottomThickness", "start": 618, "type": "Identifier", "type": "Identifier" }, "operator": "+", "right": { "end": 649, "name": "baseThickness", "start": 636, "type": "Identifier", "type": "Identifier" }, "start": 618, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 600, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 580, "type": "VariableDeclarator" }, "end": 649, "kind": "const", "start": 580, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 676, "id": { "end": 662, "name": "holeLocator", "start": 651, "type": "Identifier" }, "init": { "end": 676, "left": { "end": 672, "name": "baseDia", "start": 665, "type": "Identifier", "type": "Identifier" }, "operator": "-", "right": { "end": 676, "raw": "8", "start": 675, "type": "Literal", "type": "Literal", "value": { "value": 8.0, "suffix": "None" } }, "start": 665, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 651, "type": "VariableDeclarator" }, "end": 676, "kind": "const", "start": 651, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 687, "id": { "end": 683, "name": "nHoles", "start": 677, "type": "Identifier" }, "init": { "end": 687, "raw": "4", "start": 686, "type": "Literal", "type": "Literal", "value": { "value": 4.0, "suffix": "None" } }, "start": 677, "type": "VariableDeclarator" }, "end": 687, "kind": "const", "start": 677, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "end": 803, "expression": { "arguments": [ { "end": 766, "name": "nHoles", "start": 760, "type": "Identifier", "type": "Identifier" }, { "end": 769, "raw": "1", "start": 768, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, { "end": 802, "raw": "\"nHoles must be greater than 1\"", "start": 771, "type": "Literal", "type": "Literal", "value": "nHoles must be greater than 1" } ], "callee": { "end": 759, "name": "assertGreaterThan", "start": 742, "type": "Identifier" }, "end": 803, "start": 742, "type": "CallExpression", "type": "CallExpression" }, "start": 742, "type": "ExpressionStatement", "type": "ExpressionStatement" }, { "declaration": { "end": 1199, "id": { "end": 866, "name": "circles", "start": 859, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "end": 887, "raw": "'XY'", "start": 883, "type": "Literal", "type": "Literal", "value": "XY" } ], "callee": { "end": 882, "name": "startSketchOn", "start": 869, "type": "Identifier" }, "end": 888, "start": 869, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 915, "name": "center", "start": 909, "type": "Identifier" }, "arg": { "elements": [ { "end": 952, "left": { "end": 948, "name": "mountingHolePlacementDiameter", "start": 919, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 952, "raw": "2", "start": 951, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 919, "type": "BinaryExpression", "type": "BinaryExpression" }, { "end": 955, "raw": "0", "start": 954, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 956, "start": 918, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 971, "name": "radius", "start": 965, "type": "Identifier" }, "arg": { "end": 993, "left": { "end": 989, "name": "mountingHoleDia", "start": 974, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 993, "raw": "2", "start": 992, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 974, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 900, "name": "circle", "start": 894, "type": "Identifier" }, "end": 1000, "start": 894, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 1042, "name": "arcDegrees", "start": 1032, "type": "Identifier" }, "arg": { "end": 1048, "raw": "360", "start": 1045, "type": "Literal", "type": "Literal", "value": { "value": 360.0, "suffix": "None" } } }, { "type": "LabeledArg", "label": { "end": 1063, "name": "center", "start": 1057, "type": "Identifier" }, "arg": { "elements": [ { "end": 1068, "raw": "0", "start": 1067, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 1071, "raw": "0", "start": 1070, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 1072, "start": 1066, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1090, "name": "instances", "start": 1081, "type": "Identifier" }, "arg": { "end": 1099, "name": "nHoles", "start": 1093, "type": "Identifier", "type": "Identifier" } }, { "type": "LabeledArg", "label": { "end": 1124, "name": "rotateDuplicates", "start": 1108, "type": "Identifier" }, "arg": { "end": 1131, "raw": "true", "start": 1127, "type": "Literal", "type": "Literal", "value": true } } ], "callee": { "end": 1023, "name": "patternCircular2d", "start": 1006, "type": "Identifier" }, "end": 1138, "start": 1006, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null } ], "end": 1199, "nonCodeMeta": { "nonCodeNodes": { "2": [ { "end": 1199, "start": 1138, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Create the base of the flange and add the mounting holes", "style": "line" } } ] }, "startNodes": [] }, "start": 869, "type": "PipeExpression", "type": "PipeExpression" }, "start": 859, "type": "VariableDeclarator" }, "end": 1199, "kind": "const", "start": 859, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 1467, "id": { "end": 1210, "name": "flangeBase", "start": 1200, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "end": 1231, "raw": "'XY'", "start": 1227, "type": "Literal", "type": "Literal", "value": "XY" } ], "callee": { "end": 1226, "name": "startSketchOn", "start": 1213, "type": "Identifier" }, "end": 1232, "start": 1213, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 1259, "name": "center", "start": 1253, "type": "Identifier" }, "arg": { "elements": [ { "end": 1264, "raw": "0", "start": 1263, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 1267, "raw": "0", "start": 1266, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 1268, "start": 1262, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1283, "name": "radius", "start": 1277, "type": "Identifier" }, "arg": { "end": 1297, "left": { "end": 1293, "name": "baseDia", "start": 1286, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1297, "raw": "2", "start": 1296, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1286, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 1244, "name": "circle", "start": 1238, "type": "Identifier" }, "end": 1304, "start": 1238, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "end": 1322, "name": "circles", "start": 1315, "type": "Identifier", "type": "Identifier" }, { "end": 1325, "start": 1324, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 1314, "name": "hole", "start": 1310, "type": "Identifier" }, "end": 1326, "start": 1310, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 1358, "name": "center", "start": 1352, "type": "Identifier" }, "arg": { "elements": [ { "end": 1363, "raw": "0", "start": 1362, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 1366, "raw": "0", "start": 1365, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 1367, "start": 1361, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1382, "name": "radius", "start": 1376, "type": "Identifier" }, "arg": { "end": 1396, "left": { "end": 1392, "name": "pipeDia", "start": 1385, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1396, "raw": "2", "start": 1395, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1385, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 1343, "name": "circle", "start": 1337, "type": "Identifier" }, "end": 1403, "start": 1337, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 1406, "start": 1405, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 1336, "name": "hole", "start": 1332, "type": "Identifier" }, "end": 1407, "start": 1332, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 1427, "name": "length", "start": 1421, "type": "Identifier" }, "arg": { "end": 1443, "name": "baseThickness", "start": 1430, "type": "Identifier", "type": "Identifier" } } ], "callee": { "end": 1420, "name": "extrude", "start": 1413, "type": "Identifier" }, "end": 1444, "start": 1413, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null } ], "end": 1467, "nonCodeMeta": { "nonCodeNodes": { "4": [ { "end": 1467, "start": 1444, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Plane for top face", "style": "line" } } ] }, "startNodes": [] }, "start": 1213, "type": "PipeExpression", "type": "PipeExpression" }, "start": 1200, "type": "VariableDeclarator" }, "end": 1467, "kind": "const", "start": 1200, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 1662, "id": { "end": 1480, "name": "topFacePlane", "start": 1468, "type": "Identifier" }, "init": { "end": 1662, "properties": [ { "end": 1660, "key": { "end": 1492, "name": "plane", "start": 1487, "type": "Identifier" }, "start": 1487, "type": "ObjectProperty", "value": { "end": 1660, "properties": [ { "end": 1545, "key": { "end": 1507, "name": "origin", "start": 1501, "type": "Identifier" }, "start": 1501, "type": "ObjectProperty", "value": { "end": 1545, "properties": [ { "end": 1517, "key": { "end": 1513, "name": "x", "start": 1512, "type": "Identifier" }, "start": 1512, "type": "ObjectProperty", "value": { "end": 1517, "raw": "0", "start": 1516, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1524, "key": { "end": 1520, "name": "y", "start": 1519, "type": "Identifier" }, "start": 1519, "type": "ObjectProperty", "value": { "end": 1524, "raw": "0", "start": 1523, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1543, "key": { "end": 1527, "name": "z", "start": 1526, "type": "Identifier" }, "start": 1526, "type": "ObjectProperty", "value": { "end": 1543, "name": "baseThickness", "start": 1530, "type": "Identifier", "type": "Identifier" } } ], "start": 1510, "type": "ObjectExpression", "type": "ObjectExpression" } }, { "end": 1582, "key": { "end": 1556, "name": "xAxis", "start": 1551, "type": "Identifier" }, "start": 1551, "type": "ObjectProperty", "value": { "end": 1582, "properties": [ { "end": 1566, "key": { "end": 1562, "name": "x", "start": 1561, "type": "Identifier" }, "start": 1561, "type": "ObjectProperty", "value": { "end": 1566, "raw": "1", "start": 1565, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } } }, { "end": 1573, "key": { "end": 1569, "name": "y", "start": 1568, "type": "Identifier" }, "start": 1568, "type": "ObjectProperty", "value": { "end": 1573, "raw": "0", "start": 1572, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1580, "key": { "end": 1576, "name": "z", "start": 1575, "type": "Identifier" }, "start": 1575, "type": "ObjectProperty", "value": { "end": 1580, "raw": "0", "start": 1579, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } } ], "start": 1559, "type": "ObjectExpression", "type": "ObjectExpression" } }, { "end": 1619, "key": { "end": 1593, "name": "yAxis", "start": 1588, "type": "Identifier" }, "start": 1588, "type": "ObjectProperty", "value": { "end": 1619, "properties": [ { "end": 1603, "key": { "end": 1599, "name": "x", "start": 1598, "type": "Identifier" }, "start": 1598, "type": "ObjectProperty", "value": { "end": 1603, "raw": "0", "start": 1602, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1610, "key": { "end": 1606, "name": "y", "start": 1605, "type": "Identifier" }, "start": 1605, "type": "ObjectProperty", "value": { "end": 1610, "raw": "1", "start": 1609, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } } }, { "end": 1617, "key": { "end": 1613, "name": "z", "start": 1612, "type": "Identifier" }, "start": 1612, "type": "ObjectProperty", "value": { "end": 1617, "raw": "0", "start": 1616, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } } ], "start": 1596, "type": "ObjectExpression", "type": "ObjectExpression" } }, { "end": 1656, "key": { "end": 1630, "name": "zAxis", "start": 1625, "type": "Identifier" }, "start": 1625, "type": "ObjectProperty", "value": { "end": 1656, "properties": [ { "end": 1640, "key": { "end": 1636, "name": "x", "start": 1635, "type": "Identifier" }, "start": 1635, "type": "ObjectProperty", "value": { "end": 1640, "raw": "0", "start": 1639, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1647, "key": { "end": 1643, "name": "y", "start": 1642, "type": "Identifier" }, "start": 1642, "type": "ObjectProperty", "value": { "end": 1647, "raw": "0", "start": 1646, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } }, { "end": 1654, "key": { "end": 1650, "name": "z", "start": 1649, "type": "Identifier" }, "start": 1649, "type": "ObjectProperty", "value": { "end": 1654, "raw": "1", "start": 1653, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } } } ], "start": 1633, "type": "ObjectExpression", "type": "ObjectExpression" } } ], "start": 1495, "type": "ObjectExpression", "type": "ObjectExpression" } } ], "start": 1483, "type": "ObjectExpression", "type": "ObjectExpression" }, "start": 1468, "type": "VariableDeclarator" }, "end": 1662, "kind": "const", "start": 1468, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 2021, "id": { "end": 1730, "name": "topExtrusion", "start": 1718, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "end": 1759, "name": "topFacePlane", "start": 1747, "type": "Identifier", "type": "Identifier" } ], "callee": { "end": 1746, "name": "startSketchOn", "start": 1733, "type": "Identifier" }, "end": 1760, "start": 1733, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 1787, "name": "center", "start": 1781, "type": "Identifier" }, "arg": { "elements": [ { "end": 1792, "raw": "0", "start": 1791, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 1795, "raw": "0", "start": 1794, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 1796, "start": 1790, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1811, "name": "radius", "start": 1805, "type": "Identifier" }, "arg": { "end": 1834, "left": { "end": 1830, "name": "topTotalDiameter", "start": 1814, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1834, "raw": "2", "start": 1833, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1814, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 1772, "name": "circle", "start": 1766, "type": "Identifier" }, "end": 1841, "start": 1766, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 1873, "name": "center", "start": 1867, "type": "Identifier" }, "arg": { "elements": [ { "end": 1878, "raw": "0", "start": 1877, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 1881, "raw": "0", "start": 1880, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 1882, "start": 1876, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 1897, "name": "radius", "start": 1891, "type": "Identifier" }, "arg": { "end": 1911, "left": { "end": 1907, "name": "pipeDia", "start": 1900, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 1911, "raw": "2", "start": 1910, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 1900, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 1858, "name": "circle", "start": 1852, "type": "Identifier" }, "end": 1918, "start": 1852, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 1921, "start": 1920, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 1851, "name": "hole", "start": 1847, "type": "Identifier" }, "end": 1922, "start": 1847, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 1942, "name": "length", "start": 1936, "type": "Identifier" }, "arg": { "end": 1962, "name": "topTotalThickness", "start": 1945, "type": "Identifier", "type": "Identifier" } } ], "callee": { "end": 1935, "name": "extrude", "start": 1928, "type": "Identifier" }, "end": 1963, "start": 1928, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null } ], "end": 2021, "nonCodeMeta": { "nonCodeNodes": { "3": [ { "end": 2021, "start": 1963, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Create the extrusion on the bottom of the flange base", "style": "line" } } ] }, "startNodes": [] }, "start": 1733, "type": "PipeExpression", "type": "PipeExpression" }, "start": 1718, "type": "VariableDeclarator" }, "end": 2021, "kind": "const", "start": 1718, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "declaration": { "end": 2264, "id": { "end": 2037, "name": "bottomExtrusion", "start": 2022, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "end": 2058, "raw": "\"XY\"", "start": 2054, "type": "Literal", "type": "Literal", "value": "XY" } ], "callee": { "end": 2053, "name": "startSketchOn", "start": 2040, "type": "Identifier" }, "end": 2059, "start": 2040, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 2086, "name": "center", "start": 2080, "type": "Identifier" }, "arg": { "elements": [ { "end": 2091, "raw": "0", "start": 2090, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 2094, "raw": "0", "start": 2093, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 2095, "start": 2089, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 2110, "name": "radius", "start": 2104, "type": "Identifier" }, "arg": { "end": 2136, "left": { "end": 2132, "name": "bottomTotalDiameter", "start": 2113, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 2136, "raw": "2", "start": 2135, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 2113, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 2071, "name": "circle", "start": 2065, "type": "Identifier" }, "end": 2143, "start": 2065, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "arguments": [ { "type": "LabeledArg", "label": { "end": 2175, "name": "center", "start": 2169, "type": "Identifier" }, "arg": { "elements": [ { "end": 2180, "raw": "0", "start": 2179, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "end": 2183, "raw": "0", "start": 2182, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 2184, "start": 2178, "type": "ArrayExpression", "type": "ArrayExpression" } }, { "type": "LabeledArg", "label": { "end": 2199, "name": "radius", "start": 2193, "type": "Identifier" }, "arg": { "end": 2213, "left": { "end": 2209, "name": "pipeDia", "start": 2202, "type": "Identifier", "type": "Identifier" }, "operator": "/", "right": { "end": 2213, "raw": "2", "start": 2212, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "start": 2202, "type": "BinaryExpression", "type": "BinaryExpression" } } ], "callee": { "end": 2160, "name": "circle", "start": 2154, "type": "Identifier" }, "end": 2220, "start": 2154, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "end": 2223, "start": 2222, "type": "PipeSubstitution", "type": "PipeSubstitution" } ], "callee": { "end": 2153, "name": "hole", "start": 2149, "type": "Identifier" }, "end": 2224, "start": 2149, "type": "CallExpression", "type": "CallExpression" }, { "arguments": [ { "type": "LabeledArg", "label": { "end": 2244, "name": "length", "start": 2238, "type": "Identifier" }, "arg": { "argument": { "end": 2263, "name": "bottomThickness", "start": 2248, "type": "Identifier", "type": "Identifier" }, "end": 2263, "operator": "-", "start": 2247, "type": "UnaryExpression", "type": "UnaryExpression" } } ], "callee": { "end": 2237, "name": "extrude", "start": 2230, "type": "Identifier" }, "end": 2264, "start": 2230, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null } ], "end": 2264, "start": 2040, "type": "PipeExpression", "type": "PipeExpression" }, "start": 2022, "type": "VariableDeclarator" }, "end": 2264, "kind": "const", "start": 2022, "type": "VariableDeclaration", "type": "VariableDeclaration" } ], "end": 2265, "innerAttrs": [ { "end": 333, "name": { "end": 309, "name": "settings", "start": 301, "type": "Identifier" }, "properties": [ { "end": 332, "key": { "end": 327, "name": "defaultLengthUnit", "start": 310, "type": "Identifier" }, "start": 310, "type": "ObjectProperty", "value": { "end": 332, "name": "in", "start": 330, "type": "Identifier", "type": "Identifier" } } ], "start": 300, "type": "Annotation" } ], "nonCodeMeta": { "nonCodeNodes": { "12": [ { "end": 741, "start": 687, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Add assertion so nHoles are always greater than 1", "style": "line" } } ], "13": [ { "end": 858, "start": 803, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Create the circular pattern for the mounting holes", "style": "line" } } ], "16": [ { "end": 1717, "start": 1662, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Create the extrusion on the top of the flange base", "style": "line" } } ] }, "startNodes": [ { "end": 9, "start": 0, "type": "NonCodeNode", "value": { "type": "blockComment", "value": "Flange", "style": "line" } }, { "end": 285, "start": 10, "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": 287, "start": 285, "type": "NonCodeNode", "value": { "type": "newLine" } }, { "end": 299, "start": 287, "type": "NonCodeNode", "value": { "type": "blockComment", "value": "Set units", "style": "line" } }, { "end": 335, "start": 333, "type": "NonCodeNode", "value": { "type": "newLine" } }, { "end": 354, "start": 335, "type": "NonCodeNode", "value": { "type": "blockComment", "value": "Define constants", "style": "line" } } ] }, "start": 0 } }