Files
modeling-app/rust/kcl-lib/tests/kcl_samples/a-parametric-bearing-pillow-block/ast.snap
Josh Gomez 58e0c0e916 Improve KCL Samples (#5767)
* improve KCL Samples & .gitignore

* update block and car wheel assembly

* update flange and lego, delete flange xy

* artifacts

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* scale

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
2025-03-13 23:38:51 -07:00

2006 lines
66 KiB
Plaintext

---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing a-parametric-bearing-pillow-block.kcl
---
{
"Ok": {
"body": [
{
"declaration": {
"end": 741,
"id": {
"end": 737,
"name": "length",
"start": 731,
"type": "Identifier"
},
"init": {
"end": 741,
"raw": "6",
"start": 740,
"type": "Literal",
"type": "Literal",
"value": {
"value": 6.0,
"suffix": "None"
}
},
"start": 731,
"type": "VariableDeclarator"
},
"end": 741,
"kind": "const",
"start": 731,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 751,
"id": {
"end": 747,
"name": "width",
"start": 742,
"type": "Identifier"
},
"init": {
"end": 751,
"raw": "4",
"start": 750,
"type": "Literal",
"type": "Literal",
"value": {
"value": 4.0,
"suffix": "None"
}
},
"start": 742,
"type": "VariableDeclarator"
},
"end": 751,
"kind": "const",
"start": 742,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 762,
"id": {
"end": 758,
"name": "height",
"start": 752,
"type": "Identifier"
},
"init": {
"end": 762,
"raw": "1",
"start": 761,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 752,
"type": "VariableDeclarator"
},
"end": 762,
"kind": "const",
"start": 752,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 776,
"id": {
"end": 770,
"name": "cbDepth",
"start": 763,
"type": "Identifier"
},
"init": {
"end": 776,
"raw": ".25",
"start": 773,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.25,
"suffix": "None"
}
},
"start": 763,
"type": "VariableDeclarator"
},
"end": 776,
"kind": "const",
"start": 763,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 787,
"id": {
"end": 782,
"name": "cbDia",
"start": 777,
"type": "Identifier"
},
"init": {
"end": 787,
"raw": ".7",
"start": 785,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.7,
"suffix": "None"
}
},
"start": 777,
"type": "VariableDeclarator"
},
"end": 787,
"kind": "const",
"start": 777,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 802,
"id": {
"end": 795,
"name": "holeDia",
"start": 788,
"type": "Identifier"
},
"init": {
"end": 802,
"raw": ".375",
"start": 798,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.375,
"suffix": "None"
}
},
"start": 788,
"type": "VariableDeclarator"
},
"end": 802,
"kind": "const",
"start": 788,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 816,
"id": {
"end": 810,
"name": "padding",
"start": 803,
"type": "Identifier"
},
"init": {
"end": 816,
"raw": "1.5",
"start": 813,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.5,
"suffix": "None"
}
},
"start": 803,
"type": "VariableDeclarator"
},
"end": 816,
"kind": "const",
"start": 803,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 831,
"id": {
"end": 827,
"name": "bearingDia",
"start": 817,
"type": "Identifier"
},
"init": {
"end": 831,
"raw": "3",
"start": 830,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.0,
"suffix": "None"
}
},
"start": 817,
"type": "VariableDeclarator"
},
"end": 831,
"kind": "const",
"start": 817,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 1207,
"id": {
"end": 943,
"name": "extrude001",
"start": 933,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"end": 964,
"raw": "'XY'",
"start": 960,
"type": "Literal",
"type": "Literal",
"value": "XY"
}
],
"callee": {
"end": 959,
"name": "startSketchOn",
"start": 946,
"type": "Identifier"
},
"end": 965,
"start": 946,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"elements": [
{
"end": 997,
"left": {
"argument": {
"end": 993,
"name": "width",
"start": 988,
"type": "Identifier",
"type": "Identifier"
},
"end": 993,
"operator": "-",
"start": 987,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"end": 997,
"raw": "2",
"start": 996,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 987,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 1010,
"left": {
"argument": {
"end": 1006,
"name": "length",
"start": 1000,
"type": "Identifier",
"type": "Identifier"
},
"end": 1006,
"operator": "-",
"start": 999,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"end": 1010,
"raw": "2",
"start": 1009,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 999,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 1011,
"start": 986,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"end": 1014,
"start": 1013,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 985,
"name": "startProfileAt",
"start": 971,
"type": "Identifier"
},
"end": 1015,
"start": 971,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1037,
"name": "endAbsolute",
"start": 1026,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1050,
"left": {
"end": 1046,
"name": "width",
"start": 1041,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1050,
"raw": "2",
"start": 1049,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1041,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 1063,
"left": {
"argument": {
"end": 1059,
"name": "length",
"start": 1053,
"type": "Identifier",
"type": "Identifier"
},
"end": 1059,
"operator": "-",
"start": 1052,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"end": 1063,
"raw": "2",
"start": 1062,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1052,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 1064,
"start": 1040,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 1025,
"name": "line",
"start": 1021,
"type": "Identifier"
},
"end": 1065,
"start": 1021,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1087,
"name": "endAbsolute",
"start": 1076,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1100,
"left": {
"end": 1096,
"name": "width",
"start": 1091,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1100,
"raw": "2",
"start": 1099,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1091,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 1112,
"left": {
"end": 1108,
"name": "length",
"start": 1102,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1112,
"raw": "2",
"start": 1111,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1102,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 1113,
"start": 1090,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 1075,
"name": "line",
"start": 1071,
"type": "Identifier"
},
"end": 1114,
"start": 1071,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1136,
"name": "endAbsolute",
"start": 1125,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1150,
"left": {
"argument": {
"end": 1146,
"name": "width",
"start": 1141,
"type": "Identifier",
"type": "Identifier"
},
"end": 1146,
"operator": "-",
"start": 1140,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"end": 1150,
"raw": "2",
"start": 1149,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1140,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 1162,
"left": {
"end": 1158,
"name": "length",
"start": 1152,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1162,
"raw": "2",
"start": 1161,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1152,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 1163,
"start": 1139,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 1124,
"name": "line",
"start": 1120,
"type": "Identifier"
},
"end": 1164,
"start": 1120,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [],
"callee": {
"end": 1175,
"name": "close",
"start": 1170,
"type": "Identifier"
},
"end": 1177,
"start": 1170,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1197,
"name": "length",
"start": 1191,
"type": "Identifier"
},
"arg": {
"end": 1206,
"name": "height",
"start": 1200,
"type": "Identifier",
"type": "Identifier"
}
}
],
"callee": {
"end": 1190,
"name": "extrude",
"start": 1183,
"type": "Identifier"
},
"end": 1207,
"start": 1183,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 1207,
"start": 946,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 933,
"type": "VariableDeclarator"
},
"end": 1207,
"kind": "const",
"start": 933,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 1651,
"id": {
"end": 1221,
"name": "extrude002",
"start": 1211,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"end": 1248,
"name": "extrude001",
"start": 1238,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 1255,
"raw": "'end'",
"start": 1250,
"type": "Literal",
"type": "Literal",
"value": "end"
}
],
"callee": {
"end": 1237,
"name": "startSketchOn",
"start": 1224,
"type": "Identifier"
},
"end": 1256,
"start": 1224,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1282,
"name": "center",
"start": 1276,
"type": "Identifier"
},
"arg": {
"elements": [
{
"argument": {
"end": 1322,
"left": {
"end": 1307,
"left": {
"end": 1303,
"name": "width",
"start": 1298,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1307,
"raw": "2",
"start": 1306,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1298,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"end": 1322,
"left": {
"end": 1318,
"name": "padding",
"start": 1311,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1322,
"raw": "2",
"start": 1321,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1311,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 1298,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 1322,
"operator": "-",
"start": 1296,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"argument": {
"end": 1362,
"left": {
"end": 1347,
"left": {
"end": 1343,
"name": "length",
"start": 1337,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1347,
"raw": "2",
"start": 1346,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1337,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"end": 1362,
"left": {
"end": 1358,
"name": "padding",
"start": 1351,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1362,
"raw": "2",
"start": 1361,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1351,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 1337,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 1362,
"operator": "-",
"start": 1335,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 1372,
"start": 1285,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1386,
"name": "radius",
"start": 1380,
"type": "Identifier"
},
"arg": {
"end": 1398,
"left": {
"end": 1394,
"name": "cbDia",
"start": 1389,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1398,
"raw": "2",
"start": 1397,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1389,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
}
],
"callee": {
"end": 1268,
"name": "circle",
"start": 1262,
"type": "Identifier"
},
"end": 1406,
"start": 1262,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1444,
"name": "instances",
"start": 1435,
"type": "Identifier"
},
"arg": {
"end": 1448,
"raw": "2",
"start": 1447,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"end": 1464,
"name": "distance",
"start": 1456,
"type": "Identifier"
},
"arg": {
"end": 1483,
"left": {
"end": 1473,
"name": "length",
"start": 1467,
"type": "Identifier",
"type": "Identifier"
},
"operator": "-",
"right": {
"end": 1483,
"name": "padding",
"start": 1476,
"type": "Identifier",
"type": "Identifier"
},
"start": 1467,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1495,
"name": "axis",
"start": 1491,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1500,
"raw": "0",
"start": 1499,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 1503,
"raw": "1",
"start": 1502,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
}
],
"end": 1504,
"start": 1498,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 1427,
"name": "patternLinear2d",
"start": 1412,
"type": "Identifier"
},
"end": 1512,
"start": 1412,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1550,
"name": "instances",
"start": 1541,
"type": "Identifier"
},
"arg": {
"end": 1554,
"raw": "2",
"start": 1553,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"end": 1570,
"name": "distance",
"start": 1562,
"type": "Identifier"
},
"arg": {
"end": 1588,
"left": {
"end": 1578,
"name": "width",
"start": 1573,
"type": "Identifier",
"type": "Identifier"
},
"operator": "-",
"right": {
"end": 1588,
"name": "padding",
"start": 1581,
"type": "Identifier",
"type": "Identifier"
},
"start": 1573,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1600,
"name": "axis",
"start": 1596,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1605,
"raw": "1",
"start": 1604,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
{
"end": 1608,
"raw": "0",
"start": 1607,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 1609,
"start": 1603,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 1533,
"name": "patternLinear2d",
"start": 1518,
"type": "Identifier"
},
"end": 1616,
"start": 1518,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1639,
"name": "length",
"start": 1633,
"type": "Identifier"
},
"arg": {
"argument": {
"end": 1650,
"name": "cbDepth",
"start": 1643,
"type": "Identifier",
"type": "Identifier"
},
"end": 1650,
"operator": "-",
"start": 1642,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
}
],
"callee": {
"end": 1629,
"name": "extrude",
"start": 1622,
"type": "Identifier"
},
"end": 1651,
"start": 1622,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
"end": 1631,
"start": 1630,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
}
],
"end": 1651,
"start": 1224,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 1211,
"type": "VariableDeclarator"
},
"end": 1651,
"kind": "const",
"start": 1211,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 2112,
"id": {
"end": 1663,
"name": "extrude003",
"start": 1653,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"end": 1690,
"name": "extrude001",
"start": 1680,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 1699,
"raw": "'start'",
"start": 1692,
"type": "Literal",
"type": "Literal",
"value": "start"
}
],
"callee": {
"end": 1679,
"name": "startSketchOn",
"start": 1666,
"type": "Identifier"
},
"end": 1700,
"start": 1666,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1728,
"name": "center",
"start": 1722,
"type": "Identifier"
},
"arg": {
"elements": [
{
"argument": {
"end": 1770,
"left": {
"end": 1755,
"left": {
"end": 1751,
"name": "width",
"start": 1746,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1755,
"raw": "2",
"start": 1754,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1746,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"end": 1770,
"left": {
"end": 1766,
"name": "padding",
"start": 1759,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1770,
"raw": "2",
"start": 1769,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1759,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 1746,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 1770,
"operator": "-",
"start": 1744,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"argument": {
"end": 1812,
"left": {
"end": 1797,
"left": {
"end": 1793,
"name": "length",
"start": 1787,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1797,
"raw": "2",
"start": 1796,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1787,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"end": 1812,
"left": {
"end": 1808,
"name": "padding",
"start": 1801,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1812,
"raw": "2",
"start": 1811,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1801,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 1787,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 1812,
"operator": "-",
"start": 1785,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 1824,
"start": 1731,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1840,
"name": "radius",
"start": 1834,
"type": "Identifier"
},
"arg": {
"end": 1854,
"left": {
"end": 1850,
"name": "holeDia",
"start": 1843,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1854,
"raw": "2",
"start": 1853,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1843,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
}
],
"callee": {
"end": 1712,
"name": "circle",
"start": 1706,
"type": "Identifier"
},
"end": 1862,
"start": 1706,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1900,
"name": "instances",
"start": 1891,
"type": "Identifier"
},
"arg": {
"end": 1904,
"raw": "2",
"start": 1903,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"end": 1920,
"name": "distance",
"start": 1912,
"type": "Identifier"
},
"arg": {
"end": 1939,
"left": {
"end": 1929,
"name": "length",
"start": 1923,
"type": "Identifier",
"type": "Identifier"
},
"operator": "-",
"right": {
"end": 1939,
"name": "padding",
"start": 1932,
"type": "Identifier",
"type": "Identifier"
},
"start": 1923,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1951,
"name": "axis",
"start": 1947,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1956,
"raw": "0",
"start": 1955,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 1959,
"raw": "1",
"start": 1958,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
}
],
"end": 1960,
"start": 1954,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 1883,
"name": "patternLinear2d",
"start": 1868,
"type": "Identifier"
},
"end": 1967,
"start": 1868,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 2005,
"name": "instances",
"start": 1996,
"type": "Identifier"
},
"arg": {
"end": 2009,
"raw": "2",
"start": 2008,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"end": 2025,
"name": "distance",
"start": 2017,
"type": "Identifier"
},
"arg": {
"end": 2043,
"left": {
"end": 2033,
"name": "width",
"start": 2028,
"type": "Identifier",
"type": "Identifier"
},
"operator": "-",
"right": {
"end": 2043,
"name": "padding",
"start": 2036,
"type": "Identifier",
"type": "Identifier"
},
"start": 2028,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 2055,
"name": "axis",
"start": 2051,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 2060,
"raw": "1",
"start": 2059,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
{
"end": 2063,
"raw": "0",
"start": 2062,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 2064,
"start": 2058,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 1988,
"name": "patternLinear2d",
"start": 1973,
"type": "Identifier"
},
"end": 2071,
"start": 1973,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 2091,
"name": "length",
"start": 2085,
"type": "Identifier"
},
"arg": {
"end": 2111,
"left": {
"argument": {
"end": 2101,
"name": "height",
"start": 2095,
"type": "Identifier",
"type": "Identifier"
},
"end": 2101,
"operator": "-",
"start": 2094,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "+",
"right": {
"end": 2111,
"name": "cbDepth",
"start": 2104,
"type": "Identifier",
"type": "Identifier"
},
"start": 2094,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
}
],
"callee": {
"end": 2084,
"name": "extrude",
"start": 2077,
"type": "Identifier"
},
"end": 2112,
"start": 2077,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 2112,
"start": 1666,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 1653,
"type": "VariableDeclarator"
},
"end": 2112,
"kind": "const",
"start": 1653,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 2261,
"id": {
"end": 2124,
"name": "extrude004",
"start": 2114,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"end": 2151,
"name": "extrude001",
"start": 2141,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 2158,
"raw": "'end'",
"start": 2153,
"type": "Literal",
"type": "Literal",
"value": "end"
}
],
"callee": {
"end": 2140,
"name": "startSketchOn",
"start": 2127,
"type": "Identifier"
},
"end": 2159,
"start": 2127,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 2185,
"name": "center",
"start": 2179,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 2190,
"raw": "0",
"start": 2189,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 2193,
"raw": "0",
"start": 2192,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 2194,
"start": 2188,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 2208,
"name": "radius",
"start": 2202,
"type": "Identifier"
},
"arg": {
"end": 2223,
"left": {
"end": 2221,
"name": "bearingDia",
"start": 2211,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 2223,
"raw": "2",
"start": 2222,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 2211,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
}
],
"callee": {
"end": 2171,
"name": "circle",
"start": 2165,
"type": "Identifier"
},
"end": 2230,
"start": 2165,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 2250,
"name": "length",
"start": 2244,
"type": "Identifier"
},
"arg": {
"argument": {
"end": 2260,
"name": "height",
"start": 2254,
"type": "Identifier",
"type": "Identifier"
},
"end": 2260,
"operator": "-",
"start": 2253,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
}
],
"callee": {
"end": 2243,
"name": "extrude",
"start": 2236,
"type": "Identifier"
},
"end": 2261,
"start": 2236,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 2261,
"start": 2127,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 2114,
"type": "VariableDeclarator"
},
"end": 2261,
"kind": "const",
"start": 2114,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"end": 2261,
"innerAttrs": [
{
"end": 595,
"name": {
"end": 571,
"name": "settings",
"start": 563,
"type": "Identifier"
},
"properties": [
{
"end": 594,
"key": {
"end": 589,
"name": "defaultLengthUnit",
"start": 572,
"type": "Identifier"
},
"start": 572,
"type": "ObjectProperty",
"value": {
"end": 594,
"name": "in",
"start": 592,
"type": "Identifier",
"type": "Identifier"
}
}
],
"start": 562,
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {
"7": [
{
"end": 932,
"start": 831,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "(Needs to be updated). Sketch the block and extrude up to where the counterbore diameter starts.",
"style": "line"
}
}
],
"9": [
{
"end": 1653,
"start": 1651,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
],
"10": [
{
"end": 2114,
"start": 2112,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"startNodes": [
{
"end": 36,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "A Parametric Bearing Pillow Block",
"style": "line"
}
},
{
"end": 547,
"start": 37,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "A bearing pillow block, also known as a plummer block or pillow block bearing, is a pedestal used to provide support for a rotating shaft with the help of compatible bearings and various accessories. Housing a bearing, the pillow block provides a secure and stable foundation that allows the shaft to rotate smoothly within its machinery setup. These components are essential in a wide range of mechanical systems and machinery, playing a key role in reducing friction and supporting radial and axial loads.",
"style": "line"
}
},
{
"end": 549,
"start": 547,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
},
{
"end": 561,
"start": 549,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "Set units",
"style": "line"
}
},
{
"end": 597,
"start": 595,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
},
{
"end": 730,
"start": 597,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "Define constants such as length, width, height, counter-bore depth and diameter, bearing diameter, hole location padding, and more",
"style": "line"
}
}
]
},
"start": 0
}
}