Files
modeling-app/rust/kcl-lib/tests/kcl_samples/lego/ast.snap
Nick Cameron dddcd5ff46 Support paths to names rather than just raw idents (#5778)
* Support paths to names rather than just raw idents

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-24 20:58:55 +13:00

3684 lines
122 KiB
Plaintext

---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing lego.kcl
---
{
"Ok": {
"body": [
{
"commentStart": 271,
"declaration": {
"commentStart": 293,
"end": 0,
"id": {
"commentStart": 293,
"end": 0,
"name": "lbumps",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 302,
"end": 0,
"raw": "4",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 4.0,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"preComments": [
"// Define constants"
],
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 303,
"declaration": {
"commentStart": 328,
"end": 0,
"id": {
"commentStart": 328,
"end": 0,
"name": "wbumps",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 337,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 338,
"declaration": {
"commentStart": 363,
"end": 0,
"id": {
"commentStart": 363,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 371,
"end": 0,
"raw": "8.0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 8.0,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 375,
"declaration": {
"commentStart": 375,
"end": 0,
"id": {
"commentStart": 375,
"end": 0,
"name": "clearance",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 387,
"end": 0,
"raw": "0.1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.1,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 391,
"declaration": {
"commentStart": 391,
"end": 0,
"id": {
"commentStart": 391,
"end": 0,
"name": "bumpDiam",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 402,
"end": 0,
"raw": "4.8",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 4.8,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 406,
"declaration": {
"commentStart": 406,
"end": 0,
"id": {
"commentStart": 406,
"end": 0,
"name": "bumpHeight",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 419,
"end": 0,
"raw": "1.8",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.8,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 423,
"declaration": {
"commentStart": 423,
"end": 0,
"id": {
"commentStart": 423,
"end": 0,
"name": "height",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 432,
"end": 0,
"raw": "3.2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.2,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 436,
"declaration": {
"commentStart": 436,
"end": 0,
"id": {
"commentStart": 436,
"end": 0,
"name": "t",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 441,
"end": 0,
"left": {
"commentStart": 441,
"end": 0,
"left": {
"commentStart": 441,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 441,
"end": 0,
"name": {
"commentStart": 441,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 450,
"end": 0,
"left": {
"commentStart": 450,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"operator": "*",
"right": {
"abs_path": false,
"commentStart": 454,
"end": 0,
"name": {
"commentStart": 454,
"end": 0,
"name": "clearance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 467,
"end": 0,
"name": {
"commentStart": 467,
"end": 0,
"name": "bumpDiam",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "/",
"right": {
"commentStart": 479,
"end": 0,
"raw": "2.0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 483,
"declaration": {
"commentStart": 483,
"end": 0,
"id": {
"commentStart": 483,
"end": 0,
"name": "postDiam",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 494,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 494,
"end": 0,
"name": {
"commentStart": 494,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 502,
"end": 0,
"name": {
"commentStart": 502,
"end": 0,
"name": "t",
"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": 503,
"declaration": {
"commentStart": 524,
"end": 0,
"id": {
"commentStart": 524,
"end": 0,
"name": "totalLength",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 538,
"end": 0,
"left": {
"commentStart": 538,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 538,
"end": 0,
"name": {
"commentStart": 538,
"end": 0,
"name": "lbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"abs_path": false,
"commentStart": 547,
"end": 0,
"name": {
"commentStart": 547,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"commentStart": 556,
"end": 0,
"left": {
"commentStart": 556,
"end": 0,
"raw": "2.0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"operator": "*",
"right": {
"abs_path": false,
"commentStart": 562,
"end": 0,
"name": {
"commentStart": 562,
"end": 0,
"name": "clearance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 573,
"declaration": {
"commentStart": 573,
"end": 0,
"id": {
"commentStart": 573,
"end": 0,
"name": "totalWidth",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 586,
"end": 0,
"left": {
"commentStart": 586,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 586,
"end": 0,
"name": {
"commentStart": 586,
"end": 0,
"name": "wbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"abs_path": false,
"commentStart": 595,
"end": 0,
"name": {
"commentStart": 595,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"commentStart": 604,
"end": 0,
"left": {
"commentStart": 604,
"end": 0,
"raw": "2.0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"operator": "*",
"right": {
"abs_path": false,
"commentStart": 610,
"end": 0,
"name": {
"commentStart": 610,
"end": 0,
"name": "clearance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 620,
"declaration": {
"commentStart": 682,
"end": 0,
"id": {
"commentStart": 682,
"end": 0,
"name": "lSegments",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 694,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 694,
"end": 0,
"name": {
"commentStart": 694,
"end": 0,
"name": "totalLength",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"abs_path": false,
"commentStart": 708,
"end": 0,
"name": {
"commentStart": 708,
"end": 0,
"name": "lbumps",
"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",
"preComments": [
"",
"",
"// Calculate the number of segments in the length and width"
],
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 715,
"declaration": {
"commentStart": 715,
"end": 0,
"id": {
"commentStart": 715,
"end": 0,
"name": "wSegments",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 727,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 727,
"end": 0,
"name": {
"commentStart": 727,
"end": 0,
"name": "totalWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"abs_path": false,
"commentStart": 740,
"end": 0,
"name": {
"commentStart": 740,
"end": 0,
"name": "wbumps",
"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": 746,
"end": 0,
"expression": {
"arguments": [
{
"abs_path": false,
"commentStart": 838,
"end": 0,
"name": {
"commentStart": 838,
"end": 0,
"name": "lbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 846,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
{
"commentStart": 849,
"end": 0,
"raw": "\"lbumps must be greater than 1\"",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "lbumps must be greater than 1"
}
],
"callee": {
"abs_path": false,
"commentStart": 820,
"end": 0,
"name": {
"commentStart": 820,
"end": 0,
"name": "assertGreaterThan",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 820,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
"preComments": [
"",
"",
"// Add assertions to ensure that the number of bumps are greater than 1"
],
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 882,
"end": 0,
"expression": {
"arguments": [
{
"abs_path": false,
"commentStart": 900,
"end": 0,
"name": {
"commentStart": 900,
"end": 0,
"name": "wbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 908,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
{
"commentStart": 911,
"end": 0,
"raw": "\"wbumps must be greater than 1\"",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "wbumps must be greater than 1"
}
],
"callee": {
"abs_path": false,
"commentStart": 882,
"end": 0,
"name": {
"commentStart": 882,
"end": 0,
"name": "assertGreaterThan",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 882,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 943,
"declaration": {
"commentStart": 962,
"end": 0,
"id": {
"commentStart": 962,
"end": 0,
"name": "base",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"commentStart": 983,
"end": 0,
"raw": "'XY'",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "XY"
}
],
"callee": {
"abs_path": false,
"commentStart": 969,
"end": 0,
"name": {
"commentStart": 969,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 969,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"commentStart": 1009,
"elements": [
{
"commentStart": 1010,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 1011,
"end": 0,
"name": {
"commentStart": 1011,
"end": 0,
"name": "totalWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1010,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 1024,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 1027,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 1028,
"end": 0,
"name": {
"commentStart": 1028,
"end": 0,
"name": "totalLength",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1027,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 1042,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 1046,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 994,
"end": 0,
"name": {
"commentStart": 994,
"end": 0,
"name": "startProfileAt",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 994,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1059,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1065,
"elements": [
{
"abs_path": false,
"commentStart": 1066,
"end": 0,
"name": {
"commentStart": 1066,
"end": 0,
"name": "totalWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 1078,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1054,
"end": 0,
"name": {
"commentStart": 1054,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1054,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1092,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1098,
"elements": [
{
"commentStart": 1099,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"abs_path": false,
"commentStart": 1102,
"end": 0,
"name": {
"commentStart": 1102,
"end": 0,
"name": "totalLength",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1087,
"end": 0,
"name": {
"commentStart": 1087,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1087,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1126,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1132,
"elements": [
{
"argument": {
"abs_path": false,
"commentStart": 1134,
"end": 0,
"name": {
"commentStart": 1134,
"end": 0,
"name": "totalWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1133,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"commentStart": 1146,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1121,
"end": 0,
"name": {
"commentStart": 1121,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1121,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1155,
"end": 0,
"name": {
"commentStart": 1155,
"end": 0,
"name": "close",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1155,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1176,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1185,
"end": 0,
"name": {
"commentStart": 1185,
"end": 0,
"name": "height",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1168,
"end": 0,
"name": {
"commentStart": 1168,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1168,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 969,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"6": [
{
"commentStart": 1192,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Sketch and extrude a rectangular shape to create the shell underneath the lego. Will replace with shell function when able to call a face created from shell.",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"preComments": [
"",
"",
"// Make the base"
],
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 1355,
"declaration": {
"commentStart": 1355,
"end": 0,
"id": {
"commentStart": 1355,
"end": 0,
"name": "shellExtrude",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 1384,
"end": 0,
"name": {
"commentStart": 1384,
"end": 0,
"name": "base",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 1390,
"end": 0,
"raw": "\"start\"",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "start"
}
],
"callee": {
"abs_path": false,
"commentStart": 1370,
"end": 0,
"name": {
"commentStart": 1370,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1370,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"commentStart": 1419,
"elements": [
{
"argument": {
"commentStart": 1430,
"end": 0,
"left": {
"commentStart": 1430,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1430,
"end": 0,
"name": {
"commentStart": 1430,
"end": 0,
"name": "totalWidth",
"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"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 1447,
"end": 0,
"name": {
"commentStart": 1447,
"end": 0,
"name": "t",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1428,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"argument": {
"commentStart": 1460,
"end": 0,
"left": {
"commentStart": 1460,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1460,
"end": 0,
"name": {
"commentStart": 1460,
"end": 0,
"name": "totalLength",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1474,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 1478,
"end": 0,
"name": {
"commentStart": 1478,
"end": 0,
"name": "t",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1458,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 1489,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 1404,
"end": 0,
"name": {
"commentStart": 1404,
"end": 0,
"name": "startProfileAt",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1404,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1502,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1508,
"elements": [
{
"commentStart": 1509,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1509,
"end": 0,
"name": {
"commentStart": 1509,
"end": 0,
"name": "totalWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 1523,
"end": 0,
"left": {
"commentStart": 1523,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"operator": "*",
"right": {
"abs_path": false,
"commentStart": 1527,
"end": 0,
"name": {
"commentStart": 1527,
"end": 0,
"name": "t",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 1531,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1497,
"end": 0,
"name": {
"commentStart": 1497,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1497,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1545,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1551,
"elements": [
{
"commentStart": 1552,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 1555,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1555,
"end": 0,
"name": {
"commentStart": 1555,
"end": 0,
"name": "totalLength",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 1570,
"end": 0,
"left": {
"commentStart": 1570,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"operator": "*",
"right": {
"abs_path": false,
"commentStart": 1574,
"end": 0,
"name": {
"commentStart": 1574,
"end": 0,
"name": "t",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1540,
"end": 0,
"name": {
"commentStart": 1540,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1540,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1589,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1595,
"elements": [
{
"argument": {
"commentStart": 1598,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1598,
"end": 0,
"name": {
"commentStart": 1598,
"end": 0,
"name": "totalWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 1612,
"end": 0,
"left": {
"commentStart": 1612,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"operator": "*",
"right": {
"abs_path": false,
"commentStart": 1616,
"end": 0,
"name": {
"commentStart": 1616,
"end": 0,
"name": "t",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1596,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"commentStart": 1621,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1584,
"end": 0,
"name": {
"commentStart": 1584,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1584,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1630,
"end": 0,
"name": {
"commentStart": 1630,
"end": 0,
"name": "close",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1630,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1651,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1662,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1662,
"end": 0,
"name": {
"commentStart": 1662,
"end": 0,
"name": "height",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 1671,
"end": 0,
"name": {
"commentStart": 1671,
"end": 0,
"name": "t",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1660,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1643,
"end": 0,
"name": {
"commentStart": 1643,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1643,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1370,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"6": [
{
"commentStart": 1674,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Create the pegs on the top of the base",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 1718,
"declaration": {
"commentStart": 1718,
"end": 0,
"id": {
"commentStart": 1718,
"end": 0,
"name": "peg",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 1738,
"end": 0,
"name": {
"commentStart": 1738,
"end": 0,
"name": "base",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 1744,
"end": 0,
"raw": "'end'",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "end"
}
],
"callee": {
"abs_path": false,
"commentStart": 1724,
"end": 0,
"name": {
"commentStart": 1724,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1724,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1771,
"end": 0,
"name": "center",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1780,
"elements": [
{
"argument": {
"commentStart": 1793,
"end": 0,
"left": {
"commentStart": 1793,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1793,
"end": 0,
"name": {
"commentStart": 1793,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 1802,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1802,
"end": 0,
"name": {
"commentStart": 1802,
"end": 0,
"name": "wbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 1811,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "/",
"right": {
"commentStart": 1816,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1791,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"argument": {
"commentStart": 1831,
"end": 0,
"left": {
"commentStart": 1831,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1831,
"end": 0,
"name": {
"commentStart": 1831,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 1840,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1840,
"end": 0,
"name": {
"commentStart": 1840,
"end": 0,
"name": "lbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 1849,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "/",
"right": {
"commentStart": 1854,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1829,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1874,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1883,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1883,
"end": 0,
"name": {
"commentStart": 1883,
"end": 0,
"name": "bumpDiam",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1894,
"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": 1756,
"end": 0,
"name": {
"commentStart": 1756,
"end": 0,
"name": "circle",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1756,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1932,
"end": 0,
"name": "axis",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1939,
"elements": [
{
"commentStart": 1940,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
{
"commentStart": 1943,
"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": 1954,
"end": 0,
"name": "instances",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1966,
"end": 0,
"name": {
"commentStart": 1966,
"end": 0,
"name": "wbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1981,
"end": 0,
"name": "distance",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1992,
"end": 0,
"name": {
"commentStart": 1992,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1908,
"end": 0,
"name": {
"commentStart": 1908,
"end": 0,
"name": "patternLinear2d",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1908,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 2034,
"end": 0,
"name": "axis",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 2041,
"elements": [
{
"commentStart": 2042,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 2045,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 2056,
"end": 0,
"name": "instances",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 2068,
"end": 0,
"name": {
"commentStart": 2068,
"end": 0,
"name": "lbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 2083,
"end": 0,
"name": "distance",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 2094,
"end": 0,
"name": {
"commentStart": 2094,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 2010,
"end": 0,
"name": {
"commentStart": 2010,
"end": 0,
"name": "patternLinear2d",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2010,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 2120,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 2129,
"end": 0,
"name": {
"commentStart": 2129,
"end": 0,
"name": "bumpHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 2112,
"end": 0,
"name": {
"commentStart": 2112,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2112,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1724,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"4": [
{
"commentStart": 2140,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Create the pegs on the bottom of the base",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 2187,
"declaration": {
"commentStart": 2187,
"end": 0,
"id": {
"commentStart": 2187,
"end": 0,
"name": "tubePattern",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 2215,
"end": 0,
"name": {
"commentStart": 2215,
"end": 0,
"name": "shellExtrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 2229,
"end": 0,
"raw": "'start'",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "start"
}
],
"callee": {
"abs_path": false,
"commentStart": 2201,
"end": 0,
"name": {
"commentStart": 2201,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2201,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 2258,
"end": 0,
"name": "center",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 2267,
"elements": [
{
"argument": {
"commentStart": 2280,
"end": 0,
"left": {
"commentStart": 2280,
"end": 0,
"left": {
"commentStart": 2280,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2280,
"end": 0,
"name": {
"commentStart": 2280,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 2289,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2289,
"end": 0,
"name": {
"commentStart": 2289,
"end": 0,
"name": "wbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 2298,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "/",
"right": {
"commentStart": 2303,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"commentStart": 2308,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2308,
"end": 0,
"name": {
"commentStart": 2308,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 2316,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 2278,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"argument": {
"commentStart": 2332,
"end": 0,
"left": {
"commentStart": 2332,
"end": 0,
"left": {
"commentStart": 2332,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2332,
"end": 0,
"name": {
"commentStart": 2332,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 2341,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2341,
"end": 0,
"name": {
"commentStart": 2341,
"end": 0,
"name": "lbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 2350,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "/",
"right": {
"commentStart": 2355,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"commentStart": 2360,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2360,
"end": 0,
"name": {
"commentStart": 2360,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 2368,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 2330,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 2389,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 2398,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2398,
"end": 0,
"name": {
"commentStart": 2398,
"end": 0,
"name": "bumpDiam",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 2409,
"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": 2243,
"end": 0,
"name": {
"commentStart": 2243,
"end": 0,
"name": "circle",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2243,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 2447,
"end": 0,
"name": "axis",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 2454,
"elements": [
{
"commentStart": 2455,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
{
"commentStart": 2458,
"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": 2469,
"end": 0,
"name": "instances",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 2481,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2481,
"end": 0,
"name": {
"commentStart": 2481,
"end": 0,
"name": "wbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 2490,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 2500,
"end": 0,
"name": "distance",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 2511,
"end": 0,
"name": {
"commentStart": 2511,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 2423,
"end": 0,
"name": {
"commentStart": 2423,
"end": 0,
"name": "patternLinear2d",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2423,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 2553,
"end": 0,
"name": "axis",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 2560,
"elements": [
{
"commentStart": 2561,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 2564,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 2575,
"end": 0,
"name": "instances",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 2587,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2587,
"end": 0,
"name": {
"commentStart": 2587,
"end": 0,
"name": "lbumps",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 2596,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 2606,
"end": 0,
"name": "distance",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 2617,
"end": 0,
"name": {
"commentStart": 2617,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 2529,
"end": 0,
"name": {
"commentStart": 2529,
"end": 0,
"name": "patternLinear2d",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2529,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 2643,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 2652,
"end": 0,
"name": {
"commentStart": 2652,
"end": 0,
"name": "bumpHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 2635,
"end": 0,
"name": {
"commentStart": 2635,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2635,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 2201,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 0,
"innerAttrs": [
{
"commentStart": 0,
"end": 0,
"name": {
"commentStart": 239,
"end": 0,
"name": "settings",
"start": 0,
"type": "Identifier"
},
"preComments": [
"// Lego Brick",
"// A standard Lego brick. This is a small, plastic construction block toy that can be interlocked with other blocks to build various structures, models, and figures. There are a lot of hacks used in this code.",
"",
"",
"// Set Units"
],
"properties": [
{
"commentStart": 248,
"end": 0,
"key": {
"commentStart": 248,
"end": 0,
"name": "defaultLengthUnit",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ObjectProperty",
"value": {
"abs_path": false,
"commentStart": 268,
"end": 0,
"name": {
"commentStart": 268,
"end": 0,
"name": "in",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"start": 0,
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {
"0": [
{
"commentStart": 303,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "inlineComment",
"value": "number of bumps long",
"style": "line"
}
}
],
"1": [
{
"commentStart": 338,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "inlineComment",
"value": "number of bumps wide",
"style": "line"
}
}
],
"8": [
{
"commentStart": 503,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "inlineComment",
"value": "works out to 6.5",
"style": "line"
}
}
]
},
"startNodes": [
{
"commentStart": 271,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"start": 0
}
}