* 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>
2712 lines
88 KiB
Plaintext
2712 lines
88 KiB
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Result of parsing lego.kcl
|
|
---
|
|
{
|
|
"Ok": {
|
|
"body": [
|
|
{
|
|
"declaration": {
|
|
"end": 304,
|
|
"id": {
|
|
"end": 299,
|
|
"name": "lbumps",
|
|
"start": 293,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 304,
|
|
"raw": "10",
|
|
"start": 302,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 10.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 293,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 304,
|
|
"kind": "const",
|
|
"start": 293,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 339,
|
|
"id": {
|
|
"end": 335,
|
|
"name": "wbumps",
|
|
"start": 329,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 339,
|
|
"raw": "5",
|
|
"start": 338,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 5.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 329,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 339,
|
|
"kind": "const",
|
|
"start": 329,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 375,
|
|
"id": {
|
|
"end": 369,
|
|
"name": "pitch",
|
|
"start": 364,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 375,
|
|
"raw": "8.0",
|
|
"start": 372,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 8.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 364,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 375,
|
|
"kind": "const",
|
|
"start": 364,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 391,
|
|
"id": {
|
|
"end": 385,
|
|
"name": "clearance",
|
|
"start": 376,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 391,
|
|
"raw": "0.1",
|
|
"start": 388,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.1,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 376,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 391,
|
|
"kind": "const",
|
|
"start": 376,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 406,
|
|
"id": {
|
|
"end": 400,
|
|
"name": "bumpDiam",
|
|
"start": 392,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 406,
|
|
"raw": "4.8",
|
|
"start": 403,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 4.8,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 392,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 406,
|
|
"kind": "const",
|
|
"start": 392,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 423,
|
|
"id": {
|
|
"end": 417,
|
|
"name": "bumpHeight",
|
|
"start": 407,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 423,
|
|
"raw": "1.8",
|
|
"start": 420,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.8,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 407,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 423,
|
|
"kind": "const",
|
|
"start": 407,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 436,
|
|
"id": {
|
|
"end": 430,
|
|
"name": "height",
|
|
"start": 424,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 436,
|
|
"raw": "3.2",
|
|
"start": 433,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 3.2,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 424,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 436,
|
|
"kind": "const",
|
|
"start": 424,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 483,
|
|
"id": {
|
|
"end": 438,
|
|
"name": "t",
|
|
"start": 437,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 483,
|
|
"left": {
|
|
"end": 476,
|
|
"left": {
|
|
"end": 464,
|
|
"left": {
|
|
"end": 447,
|
|
"name": "pitch",
|
|
"start": 442,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 464,
|
|
"left": {
|
|
"end": 452,
|
|
"raw": "2",
|
|
"start": 451,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 464,
|
|
"name": "clearance",
|
|
"start": 455,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 451,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 442,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 476,
|
|
"name": "bumpDiam",
|
|
"start": 468,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 442,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 483,
|
|
"raw": "2.0",
|
|
"start": 480,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 442,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 437,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 483,
|
|
"kind": "const",
|
|
"start": 437,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 504,
|
|
"id": {
|
|
"end": 492,
|
|
"name": "postDiam",
|
|
"start": 484,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 504,
|
|
"left": {
|
|
"end": 500,
|
|
"name": "pitch",
|
|
"start": 495,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 504,
|
|
"name": "t",
|
|
"start": 503,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 495,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 484,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 504,
|
|
"kind": "const",
|
|
"start": 484,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 572,
|
|
"id": {
|
|
"end": 536,
|
|
"name": "totalLength",
|
|
"start": 525,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 572,
|
|
"left": {
|
|
"end": 553,
|
|
"left": {
|
|
"end": 545,
|
|
"name": "lbumps",
|
|
"start": 539,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 553,
|
|
"name": "pitch",
|
|
"start": 548,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 539,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 572,
|
|
"left": {
|
|
"end": 560,
|
|
"raw": "2.0",
|
|
"start": 557,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 572,
|
|
"name": "clearance",
|
|
"start": 563,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 557,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 539,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 525,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 572,
|
|
"kind": "const",
|
|
"start": 525,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 620,
|
|
"id": {
|
|
"end": 584,
|
|
"name": "totalWidth",
|
|
"start": 574,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 620,
|
|
"left": {
|
|
"end": 601,
|
|
"left": {
|
|
"end": 593,
|
|
"name": "wbumps",
|
|
"start": 587,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 601,
|
|
"name": "pitch",
|
|
"start": 596,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 587,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 620,
|
|
"left": {
|
|
"end": 608,
|
|
"raw": "2.0",
|
|
"start": 605,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 620,
|
|
"name": "clearance",
|
|
"start": 611,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 605,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 587,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 574,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 620,
|
|
"kind": "const",
|
|
"start": 574,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 715,
|
|
"id": {
|
|
"end": 692,
|
|
"name": "lSegments",
|
|
"start": 683,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 715,
|
|
"left": {
|
|
"end": 706,
|
|
"name": "totalLength",
|
|
"start": 695,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 715,
|
|
"name": "lbumps",
|
|
"start": 709,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 695,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 683,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 715,
|
|
"kind": "const",
|
|
"start": 683,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 747,
|
|
"id": {
|
|
"end": 725,
|
|
"name": "wSegments",
|
|
"start": 716,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"end": 747,
|
|
"left": {
|
|
"end": 738,
|
|
"name": "totalWidth",
|
|
"start": 728,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 747,
|
|
"name": "wbumps",
|
|
"start": 741,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 728,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 716,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 747,
|
|
"kind": "const",
|
|
"start": 716,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"end": 882,
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"end": 845,
|
|
"name": "lbumps",
|
|
"start": 839,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
{
|
|
"end": 848,
|
|
"raw": "1",
|
|
"start": 847,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 881,
|
|
"raw": "\"lbumps must be greater than 1\"",
|
|
"start": 850,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "lbumps must be greater than 1"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 838,
|
|
"name": "assertGreaterThan",
|
|
"start": 821,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 882,
|
|
"start": 821,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
"start": 821,
|
|
"type": "ExpressionStatement",
|
|
"type": "ExpressionStatement"
|
|
},
|
|
{
|
|
"end": 944,
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"end": 907,
|
|
"name": "wbumps",
|
|
"start": 901,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
{
|
|
"end": 910,
|
|
"raw": "1",
|
|
"start": 909,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 943,
|
|
"raw": "\"wbumps must be greater than 1\"",
|
|
"start": 912,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "wbumps must be greater than 1"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 900,
|
|
"name": "assertGreaterThan",
|
|
"start": 883,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 944,
|
|
"start": 883,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
"start": 883,
|
|
"type": "ExpressionStatement",
|
|
"type": "ExpressionStatement"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 1355,
|
|
"id": {
|
|
"end": 967,
|
|
"name": "base",
|
|
"start": 963,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 988,
|
|
"raw": "'XY'",
|
|
"start": 984,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "XY"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 983,
|
|
"name": "startSketchOn",
|
|
"start": 970,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 989,
|
|
"start": 970,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"elements": [
|
|
{
|
|
"end": 1026,
|
|
"left": {
|
|
"argument": {
|
|
"end": 1022,
|
|
"name": "totalWidth",
|
|
"start": 1012,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1022,
|
|
"operator": "-",
|
|
"start": 1011,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 1026,
|
|
"raw": "2",
|
|
"start": 1025,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 1011,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
{
|
|
"end": 1044,
|
|
"left": {
|
|
"argument": {
|
|
"end": 1040,
|
|
"name": "totalLength",
|
|
"start": 1029,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1040,
|
|
"operator": "-",
|
|
"start": 1028,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 1044,
|
|
"raw": "2",
|
|
"start": 1043,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 1028,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
}
|
|
],
|
|
"end": 1045,
|
|
"start": 1010,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
},
|
|
{
|
|
"end": 1048,
|
|
"start": 1047,
|
|
"type": "PipeSubstitution",
|
|
"type": "PipeSubstitution"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1009,
|
|
"name": "startProfileAt",
|
|
"start": 995,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1049,
|
|
"start": 995,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1063,
|
|
"name": "end",
|
|
"start": 1060,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 1077,
|
|
"name": "totalWidth",
|
|
"start": 1067,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
{
|
|
"end": 1080,
|
|
"raw": "0",
|
|
"start": 1079,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 1081,
|
|
"start": 1066,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1059,
|
|
"name": "line",
|
|
"start": 1055,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1082,
|
|
"start": 1055,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1096,
|
|
"name": "end",
|
|
"start": 1093,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 1101,
|
|
"raw": "0",
|
|
"start": 1100,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 1114,
|
|
"name": "totalLength",
|
|
"start": 1103,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
],
|
|
"end": 1115,
|
|
"start": 1099,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1092,
|
|
"name": "line",
|
|
"start": 1088,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1116,
|
|
"start": 1088,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1130,
|
|
"name": "end",
|
|
"start": 1127,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"argument": {
|
|
"end": 1145,
|
|
"name": "totalWidth",
|
|
"start": 1135,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1145,
|
|
"operator": "-",
|
|
"start": 1134,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
},
|
|
{
|
|
"end": 1148,
|
|
"raw": "0",
|
|
"start": 1147,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 1149,
|
|
"start": 1133,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1126,
|
|
"name": "line",
|
|
"start": 1122,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1150,
|
|
"start": 1122,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"callee": {
|
|
"end": 1161,
|
|
"name": "close",
|
|
"start": 1156,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1163,
|
|
"start": 1156,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1183,
|
|
"name": "length",
|
|
"start": 1177,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 1192,
|
|
"name": "height",
|
|
"start": 1186,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1176,
|
|
"name": "extrude",
|
|
"start": 1169,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1193,
|
|
"start": 1169,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
}
|
|
],
|
|
"end": 1355,
|
|
"nonCodeMeta": {
|
|
"nonCodeNodes": {
|
|
"6": [
|
|
{
|
|
"end": 1355,
|
|
"start": 1193,
|
|
"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": 970,
|
|
"type": "PipeExpression",
|
|
"type": "PipeExpression"
|
|
},
|
|
"start": 963,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 1355,
|
|
"kind": "const",
|
|
"start": 963,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 1718,
|
|
"id": {
|
|
"end": 1368,
|
|
"name": "shellExtrude",
|
|
"start": 1356,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 1389,
|
|
"name": "base",
|
|
"start": 1385,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
{
|
|
"end": 1398,
|
|
"raw": "\"start\"",
|
|
"start": 1391,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "start"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1384,
|
|
"name": "startSketchOn",
|
|
"start": 1371,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1399,
|
|
"start": 1371,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"elements": [
|
|
{
|
|
"argument": {
|
|
"end": 1449,
|
|
"left": {
|
|
"end": 1445,
|
|
"left": {
|
|
"end": 1441,
|
|
"name": "totalWidth",
|
|
"start": 1431,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 1445,
|
|
"raw": "2",
|
|
"start": 1444,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 1431,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 1449,
|
|
"name": "t",
|
|
"start": 1448,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 1431,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"end": 1449,
|
|
"operator": "-",
|
|
"start": 1429,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
},
|
|
{
|
|
"argument": {
|
|
"end": 1480,
|
|
"left": {
|
|
"end": 1476,
|
|
"left": {
|
|
"end": 1472,
|
|
"name": "totalLength",
|
|
"start": 1461,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 1476,
|
|
"raw": "2",
|
|
"start": 1475,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 1461,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 1480,
|
|
"name": "t",
|
|
"start": 1479,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 1461,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"end": 1480,
|
|
"operator": "-",
|
|
"start": 1459,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
}
|
|
],
|
|
"end": 1488,
|
|
"start": 1420,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
},
|
|
{
|
|
"end": 1491,
|
|
"start": 1490,
|
|
"type": "PipeSubstitution",
|
|
"type": "PipeSubstitution"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1419,
|
|
"name": "startProfileAt",
|
|
"start": 1405,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1492,
|
|
"start": 1405,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1506,
|
|
"name": "end",
|
|
"start": 1503,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 1529,
|
|
"left": {
|
|
"end": 1520,
|
|
"name": "totalWidth",
|
|
"start": 1510,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 1529,
|
|
"left": {
|
|
"end": 1525,
|
|
"raw": "2",
|
|
"start": 1524,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 1529,
|
|
"name": "t",
|
|
"start": 1528,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 1524,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 1510,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
{
|
|
"end": 1533,
|
|
"raw": "0",
|
|
"start": 1532,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 1534,
|
|
"start": 1509,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1502,
|
|
"name": "line",
|
|
"start": 1498,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1535,
|
|
"start": 1498,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1549,
|
|
"name": "end",
|
|
"start": 1546,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 1554,
|
|
"raw": "0",
|
|
"start": 1553,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 1576,
|
|
"left": {
|
|
"end": 1567,
|
|
"name": "totalLength",
|
|
"start": 1556,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 1576,
|
|
"left": {
|
|
"end": 1572,
|
|
"raw": "2",
|
|
"start": 1571,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 1576,
|
|
"name": "t",
|
|
"start": 1575,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 1571,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 1556,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
}
|
|
],
|
|
"end": 1578,
|
|
"start": 1552,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1545,
|
|
"name": "line",
|
|
"start": 1541,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1579,
|
|
"start": 1541,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1593,
|
|
"name": "end",
|
|
"start": 1590,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"argument": {
|
|
"end": 1618,
|
|
"left": {
|
|
"end": 1609,
|
|
"name": "totalWidth",
|
|
"start": 1599,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 1618,
|
|
"left": {
|
|
"end": 1614,
|
|
"raw": "2",
|
|
"start": 1613,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 1618,
|
|
"name": "t",
|
|
"start": 1617,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 1613,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 1599,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"end": 1618,
|
|
"operator": "-",
|
|
"start": 1597,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
},
|
|
{
|
|
"end": 1623,
|
|
"raw": "0",
|
|
"start": 1622,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 1624,
|
|
"start": 1596,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1589,
|
|
"name": "line",
|
|
"start": 1585,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1625,
|
|
"start": 1585,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"callee": {
|
|
"end": 1636,
|
|
"name": "close",
|
|
"start": 1631,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1638,
|
|
"start": 1631,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1658,
|
|
"name": "length",
|
|
"start": 1652,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"argument": {
|
|
"end": 1673,
|
|
"left": {
|
|
"end": 1669,
|
|
"name": "height",
|
|
"start": 1663,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 1673,
|
|
"name": "t",
|
|
"start": 1672,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"start": 1663,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"end": 1673,
|
|
"operator": "-",
|
|
"start": 1661,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1651,
|
|
"name": "extrude",
|
|
"start": 1644,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1675,
|
|
"start": 1644,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
}
|
|
],
|
|
"end": 1718,
|
|
"nonCodeMeta": {
|
|
"nonCodeNodes": {
|
|
"6": [
|
|
{
|
|
"end": 1718,
|
|
"start": 1675,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLineBlockComment",
|
|
"value": "Create the pegs on the top of the base",
|
|
"style": "line"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"startNodes": []
|
|
},
|
|
"start": 1371,
|
|
"type": "PipeExpression",
|
|
"type": "PipeExpression"
|
|
},
|
|
"start": 1356,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 1718,
|
|
"kind": "const",
|
|
"start": 1356,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 2187,
|
|
"id": {
|
|
"end": 1722,
|
|
"name": "peg",
|
|
"start": 1719,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 1743,
|
|
"name": "base",
|
|
"start": 1739,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
{
|
|
"end": 1750,
|
|
"raw": "'end'",
|
|
"start": 1745,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "end"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1738,
|
|
"name": "startSketchOn",
|
|
"start": 1725,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1751,
|
|
"start": 1725,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1778,
|
|
"name": "center",
|
|
"start": 1772,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"argument": {
|
|
"end": 1818,
|
|
"left": {
|
|
"end": 1813,
|
|
"left": {
|
|
"end": 1799,
|
|
"name": "pitch",
|
|
"start": 1794,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 1813,
|
|
"left": {
|
|
"end": 1809,
|
|
"name": "wbumps",
|
|
"start": 1803,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 1813,
|
|
"raw": "1",
|
|
"start": 1812,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 1803,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 1794,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 1818,
|
|
"raw": "2",
|
|
"start": 1817,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 1794,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"end": 1818,
|
|
"operator": "-",
|
|
"start": 1792,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
},
|
|
{
|
|
"argument": {
|
|
"end": 1856,
|
|
"left": {
|
|
"end": 1851,
|
|
"left": {
|
|
"end": 1837,
|
|
"name": "pitch",
|
|
"start": 1832,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 1851,
|
|
"left": {
|
|
"end": 1847,
|
|
"name": "lbumps",
|
|
"start": 1841,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 1851,
|
|
"raw": "1",
|
|
"start": 1850,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 1841,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 1832,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 1856,
|
|
"raw": "2",
|
|
"start": 1855,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 1832,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"end": 1856,
|
|
"operator": "-",
|
|
"start": 1830,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
}
|
|
],
|
|
"end": 1866,
|
|
"start": 1781,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1881,
|
|
"name": "radius",
|
|
"start": 1875,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 1896,
|
|
"left": {
|
|
"end": 1892,
|
|
"name": "bumpDiam",
|
|
"start": 1884,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 1896,
|
|
"raw": "2",
|
|
"start": 1895,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 1884,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1763,
|
|
"name": "circle",
|
|
"start": 1757,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 1903,
|
|
"start": 1757,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1937,
|
|
"name": "axis",
|
|
"start": 1933,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 1942,
|
|
"raw": "1",
|
|
"start": 1941,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 1945,
|
|
"raw": "0",
|
|
"start": 1944,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 1946,
|
|
"start": 1940,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1964,
|
|
"name": "instances",
|
|
"start": 1955,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 1973,
|
|
"name": "wbumps",
|
|
"start": 1967,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 1990,
|
|
"name": "distance",
|
|
"start": 1982,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 1998,
|
|
"name": "pitch",
|
|
"start": 1993,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 1924,
|
|
"name": "patternLinear2d",
|
|
"start": 1909,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 2005,
|
|
"start": 1909,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2039,
|
|
"name": "axis",
|
|
"start": 2035,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 2044,
|
|
"raw": "0",
|
|
"start": 2043,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 2047,
|
|
"raw": "1",
|
|
"start": 2046,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 2048,
|
|
"start": 2042,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2066,
|
|
"name": "instances",
|
|
"start": 2057,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 2075,
|
|
"name": "lbumps",
|
|
"start": 2069,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2092,
|
|
"name": "distance",
|
|
"start": 2084,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 2100,
|
|
"name": "pitch",
|
|
"start": 2095,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 2026,
|
|
"name": "patternLinear2d",
|
|
"start": 2011,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 2107,
|
|
"start": 2011,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2127,
|
|
"name": "length",
|
|
"start": 2121,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 2140,
|
|
"name": "bumpHeight",
|
|
"start": 2130,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 2120,
|
|
"name": "extrude",
|
|
"start": 2113,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 2141,
|
|
"start": 2113,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
}
|
|
],
|
|
"end": 2187,
|
|
"nonCodeMeta": {
|
|
"nonCodeNodes": {
|
|
"4": [
|
|
{
|
|
"end": 2187,
|
|
"start": 2141,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLineBlockComment",
|
|
"value": "Create the pegs on the bottom of the base",
|
|
"style": "line"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"startNodes": []
|
|
},
|
|
"start": 1725,
|
|
"type": "PipeExpression",
|
|
"type": "PipeExpression"
|
|
},
|
|
"start": 1719,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 2187,
|
|
"kind": "const",
|
|
"start": 1719,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 2664,
|
|
"id": {
|
|
"end": 2199,
|
|
"name": "tubePattern",
|
|
"start": 2188,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 2228,
|
|
"name": "shellExtrude",
|
|
"start": 2216,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
{
|
|
"end": 2237,
|
|
"raw": "'start'",
|
|
"start": 2230,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "start"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 2215,
|
|
"name": "startSketchOn",
|
|
"start": 2202,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 2238,
|
|
"start": 2202,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2265,
|
|
"name": "center",
|
|
"start": 2259,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"argument": {
|
|
"end": 2318,
|
|
"left": {
|
|
"end": 2305,
|
|
"left": {
|
|
"end": 2300,
|
|
"left": {
|
|
"end": 2286,
|
|
"name": "pitch",
|
|
"start": 2281,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 2300,
|
|
"left": {
|
|
"end": 2296,
|
|
"name": "wbumps",
|
|
"start": 2290,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 2300,
|
|
"raw": "1",
|
|
"start": 2299,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 2290,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 2281,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 2305,
|
|
"raw": "2",
|
|
"start": 2304,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 2281,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 2318,
|
|
"left": {
|
|
"end": 2314,
|
|
"name": "pitch",
|
|
"start": 2309,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 2318,
|
|
"raw": "2",
|
|
"start": 2317,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 2309,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 2281,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"end": 2318,
|
|
"operator": "-",
|
|
"start": 2279,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
},
|
|
{
|
|
"argument": {
|
|
"end": 2370,
|
|
"left": {
|
|
"end": 2357,
|
|
"left": {
|
|
"end": 2352,
|
|
"left": {
|
|
"end": 2338,
|
|
"name": "pitch",
|
|
"start": 2333,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "*",
|
|
"right": {
|
|
"end": 2352,
|
|
"left": {
|
|
"end": 2348,
|
|
"name": "lbumps",
|
|
"start": 2342,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 2352,
|
|
"raw": "1",
|
|
"start": 2351,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 2342,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 2333,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 2357,
|
|
"raw": "2",
|
|
"start": 2356,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 2333,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 2370,
|
|
"left": {
|
|
"end": 2366,
|
|
"name": "pitch",
|
|
"start": 2361,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 2370,
|
|
"raw": "2",
|
|
"start": 2369,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 2361,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"start": 2333,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
},
|
|
"end": 2370,
|
|
"operator": "-",
|
|
"start": 2331,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
}
|
|
],
|
|
"end": 2381,
|
|
"start": 2268,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2396,
|
|
"name": "radius",
|
|
"start": 2390,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 2411,
|
|
"left": {
|
|
"end": 2407,
|
|
"name": "bumpDiam",
|
|
"start": 2399,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "/",
|
|
"right": {
|
|
"end": 2411,
|
|
"raw": "2",
|
|
"start": 2410,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 2.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 2399,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 2250,
|
|
"name": "circle",
|
|
"start": 2244,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 2418,
|
|
"start": 2244,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2452,
|
|
"name": "axis",
|
|
"start": 2448,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 2457,
|
|
"raw": "1",
|
|
"start": 2456,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 2460,
|
|
"raw": "0",
|
|
"start": 2459,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 2461,
|
|
"start": 2455,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2479,
|
|
"name": "instances",
|
|
"start": 2470,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 2492,
|
|
"left": {
|
|
"end": 2488,
|
|
"name": "wbumps",
|
|
"start": 2482,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 2492,
|
|
"raw": "1",
|
|
"start": 2491,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 2482,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2509,
|
|
"name": "distance",
|
|
"start": 2501,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 2517,
|
|
"name": "pitch",
|
|
"start": 2512,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 2439,
|
|
"name": "patternLinear2d",
|
|
"start": 2424,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 2524,
|
|
"start": 2424,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2558,
|
|
"name": "axis",
|
|
"start": 2554,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 2563,
|
|
"raw": "0",
|
|
"start": 2562,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 2566,
|
|
"raw": "1",
|
|
"start": 2565,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 2567,
|
|
"start": 2561,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2585,
|
|
"name": "instances",
|
|
"start": 2576,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 2598,
|
|
"left": {
|
|
"end": 2594,
|
|
"name": "lbumps",
|
|
"start": 2588,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"operator": "-",
|
|
"right": {
|
|
"end": 2598,
|
|
"raw": "1",
|
|
"start": 2597,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 1.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
"start": 2588,
|
|
"type": "BinaryExpression",
|
|
"type": "BinaryExpression"
|
|
}
|
|
},
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2615,
|
|
"name": "distance",
|
|
"start": 2607,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 2623,
|
|
"name": "pitch",
|
|
"start": 2618,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 2545,
|
|
"name": "patternLinear2d",
|
|
"start": 2530,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 2630,
|
|
"start": 2530,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"end": 2650,
|
|
"name": "length",
|
|
"start": 2644,
|
|
"type": "Identifier"
|
|
},
|
|
"arg": {
|
|
"end": 2663,
|
|
"name": "bumpHeight",
|
|
"start": 2653,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 2643,
|
|
"name": "extrude",
|
|
"start": 2636,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 2664,
|
|
"start": 2636,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
}
|
|
],
|
|
"end": 2664,
|
|
"start": 2202,
|
|
"type": "PipeExpression",
|
|
"type": "PipeExpression"
|
|
},
|
|
"start": 2188,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 2664,
|
|
"kind": "const",
|
|
"start": 2188,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
}
|
|
],
|
|
"end": 2665,
|
|
"innerAttrs": [
|
|
{
|
|
"end": 271,
|
|
"name": {
|
|
"end": 247,
|
|
"name": "settings",
|
|
"start": 239,
|
|
"type": "Identifier"
|
|
},
|
|
"properties": [
|
|
{
|
|
"end": 270,
|
|
"key": {
|
|
"end": 265,
|
|
"name": "defaultLengthUnit",
|
|
"start": 248,
|
|
"type": "Identifier"
|
|
},
|
|
"start": 248,
|
|
"type": "ObjectProperty",
|
|
"value": {
|
|
"end": 270,
|
|
"name": "in",
|
|
"start": 268,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"start": 238,
|
|
"type": "Annotation"
|
|
}
|
|
],
|
|
"nonCodeMeta": {
|
|
"nonCodeNodes": {
|
|
"0": [
|
|
{
|
|
"end": 328,
|
|
"start": 304,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "inlineComment",
|
|
"value": "number of bumps long",
|
|
"style": "line"
|
|
}
|
|
}
|
|
],
|
|
"1": [
|
|
{
|
|
"end": 363,
|
|
"start": 339,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "inlineComment",
|
|
"value": "number of bumps wide",
|
|
"style": "line"
|
|
}
|
|
}
|
|
],
|
|
"8": [
|
|
{
|
|
"end": 524,
|
|
"start": 504,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "inlineComment",
|
|
"value": "works out to 6.5",
|
|
"style": "line"
|
|
}
|
|
}
|
|
],
|
|
"10": [
|
|
{
|
|
"end": 682,
|
|
"start": 621,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLineBlockComment",
|
|
"value": "Calculate the number of segments in the length and width",
|
|
"style": "line"
|
|
}
|
|
}
|
|
],
|
|
"12": [
|
|
{
|
|
"end": 820,
|
|
"start": 747,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLineBlockComment",
|
|
"value": "Add assertions to ensure that the number of bumps are greater than 1",
|
|
"style": "line"
|
|
}
|
|
}
|
|
],
|
|
"14": [
|
|
{
|
|
"end": 962,
|
|
"start": 944,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLineBlockComment",
|
|
"value": "Make the base",
|
|
"style": "line"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"startNodes": [
|
|
{
|
|
"end": 13,
|
|
"start": 0,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "blockComment",
|
|
"value": "Lego Brick",
|
|
"style": "line"
|
|
}
|
|
},
|
|
{
|
|
"end": 223,
|
|
"start": 14,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "blockComment",
|
|
"value": "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.",
|
|
"style": "line"
|
|
}
|
|
},
|
|
{
|
|
"end": 225,
|
|
"start": 223,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLine"
|
|
}
|
|
},
|
|
{
|
|
"end": 237,
|
|
"start": 225,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "blockComment",
|
|
"value": "Set Units",
|
|
"style": "line"
|
|
}
|
|
},
|
|
{
|
|
"end": 273,
|
|
"start": 271,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLine"
|
|
}
|
|
},
|
|
{
|
|
"end": 292,
|
|
"start": 273,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "blockComment",
|
|
"value": "Define constants",
|
|
"style": "line"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"start": 0
|
|
}
|
|
}
|