Files
modeling-app/rust/kcl-lib/tests/kcl_samples/gear-rack/ast.snap
Josh Gomez 656eb0abec Update all KCL-Samples to be more ME friendly (#6132)
* update all kcl-samples

* updates

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

* fixes

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>

* Update kcl-samples simulation test output

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-04 11:03:13 -07:00

2745 lines
96 KiB
Plaintext

---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing gear-rack.kcl
---
{
"Ok": {
"body": [
{
"commentStart": 423,
"declaration": {
"commentStart": 446,
"end": 0,
"id": {
"commentStart": 446,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 455,
"end": 0,
"raw": "100",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 100.0,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"preComments": [
"// Define parameters"
],
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 459,
"declaration": {
"commentStart": 459,
"end": 0,
"id": {
"commentStart": 459,
"end": 0,
"name": "pitchHeight",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 473,
"end": 0,
"raw": "11.5",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 11.5,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 478,
"declaration": {
"commentStart": 478,
"end": 0,
"id": {
"commentStart": 478,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 486,
"end": 0,
"raw": "5",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 5.0,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 488,
"declaration": {
"commentStart": 488,
"end": 0,
"id": {
"commentStart": 488,
"end": 0,
"name": "height",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 497,
"end": 0,
"raw": "12",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 12.0,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 500,
"declaration": {
"commentStart": 500,
"end": 0,
"id": {
"commentStart": 500,
"end": 0,
"name": "minHeight",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 512,
"end": 0,
"raw": "10.875",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 10.875,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 518,
"declaration": {
"commentStart": 551,
"end": 0,
"id": {
"commentStart": 551,
"end": 0,
"name": "rackBody",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 576,
"end": 0,
"name": {
"commentStart": 576,
"end": 0,
"name": "XY",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"callee": {
"abs_path": false,
"commentStart": 562,
"end": 0,
"name": {
"commentStart": 562,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 562,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"commentStart": 600,
"elements": [
{
"commentStart": 601,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 602,
"end": 0,
"name": {
"commentStart": 602,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 601,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 611,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 614,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 618,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 585,
"end": 0,
"name": {
"commentStart": 585,
"end": 0,
"name": "startProfileAt",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 585,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 631,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 637,
"elements": [
{
"abs_path": false,
"commentStart": 638,
"end": 0,
"name": {
"commentStart": 638,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 646,
"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": 626,
"end": 0,
"name": {
"commentStart": 626,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 626,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 660,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 666,
"elements": [
{
"commentStart": 667,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"abs_path": false,
"commentStart": 670,
"end": 0,
"name": {
"commentStart": 670,
"end": 0,
"name": "minHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 655,
"end": 0,
"name": {
"commentStart": 655,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 655,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 692,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 698,
"elements": [
{
"argument": {
"abs_path": false,
"commentStart": 700,
"end": 0,
"name": {
"commentStart": 700,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 699,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"commentStart": 708,
"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": 687,
"end": 0,
"name": {
"commentStart": 687,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 687,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 717,
"end": 0,
"name": {
"commentStart": 717,
"end": 0,
"name": "close",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 717,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 738,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 747,
"end": 0,
"name": {
"commentStart": 747,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 730,
"end": 0,
"name": {
"commentStart": 730,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 730,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 562,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"6": [
{
"commentStart": 753,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Create a function for sketch of a single tooth",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"preComments": [
"",
"",
"// Create the body of the rack"
],
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 805,
"declaration": {
"commentStart": 808,
"end": 0,
"id": {
"commentStart": 808,
"end": 0,
"name": "tooth",
"start": 0,
"type": "Identifier"
},
"init": {
"body": {
"body": [
{
"commentStart": 820,
"declaration": {
"commentStart": 820,
"end": 0,
"id": {
"commentStart": 820,
"end": 0,
"name": "toothSketch",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 848,
"end": 0,
"name": {
"commentStart": 848,
"end": 0,
"name": "XY",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"callee": {
"abs_path": false,
"commentStart": 834,
"end": 0,
"name": {
"commentStart": 834,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 834,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"commentStart": 874,
"elements": [
{
"commentStart": 875,
"end": 0,
"left": {
"commentStart": 875,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 876,
"end": 0,
"name": {
"commentStart": 876,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 875,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 885,
"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": 889,
"end": 0,
"raw": "0.567672",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.567672,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"abs_path": false,
"commentStart": 899,
"end": 0,
"name": {
"commentStart": 899,
"end": 0,
"name": "minHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 911,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 859,
"end": 0,
"name": {
"commentStart": 859,
"end": 0,
"name": "startProfileAt",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 859,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"commentStart": 945,
"elements": [
{
"commentStart": 946,
"end": 0,
"raw": "0.157636",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.157636,
"suffix": "None"
}
},
{
"commentStart": 956,
"end": 0,
"raw": "0.110378",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.110378,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 967,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 921,
"end": 0,
"name": {
"commentStart": 921,
"end": 0,
"name": "tangentialArcToRelative",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 921,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 982,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 988,
"elements": [
{
"commentStart": 989,
"end": 0,
"raw": "0.329118",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.329118,
"suffix": "None"
}
},
{
"commentStart": 999,
"end": 0,
"raw": "0.904244",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.904244,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 977,
"end": 0,
"name": {
"commentStart": 977,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 977,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"commentStart": 1041,
"elements": [
{
"commentStart": 1042,
"end": 0,
"raw": "0.157636",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.157636,
"suffix": "None"
}
},
{
"commentStart": 1052,
"end": 0,
"raw": "0.110378",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.110378,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 1063,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 1017,
"end": 0,
"name": {
"commentStart": 1017,
"end": 0,
"name": "tangentialArcToRelative",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1017,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1078,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1084,
"elements": [
{
"commentStart": 1085,
"end": 0,
"raw": "0.186505",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.186505,
"suffix": "None"
}
},
{
"commentStart": 1095,
"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": 1073,
"end": 0,
"name": {
"commentStart": 1073,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1073,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"commentStart": 1130,
"elements": [
{
"commentStart": 1131,
"end": 0,
"raw": "0.157636",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.157636,
"suffix": "None"
}
},
{
"argument": {
"commentStart": 1142,
"end": 0,
"raw": "0.110378",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.110378,
"suffix": "None"
}
},
"commentStart": 1141,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 1153,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 1106,
"end": 0,
"name": {
"commentStart": 1106,
"end": 0,
"name": "tangentialArcToRelative",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1106,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1168,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1174,
"elements": [
{
"commentStart": 1175,
"end": 0,
"raw": "0.329118",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.329118,
"suffix": "None"
}
},
{
"argument": {
"commentStart": 1186,
"end": 0,
"raw": "0.904244",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.904244,
"suffix": "None"
}
},
"commentStart": 1185,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1163,
"end": 0,
"name": {
"commentStart": 1163,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1163,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"commentStart": 1228,
"elements": [
{
"commentStart": 1229,
"end": 0,
"raw": "0.157636",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.157636,
"suffix": "None"
}
},
{
"argument": {
"commentStart": 1240,
"end": 0,
"raw": "0.110378",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.110378,
"suffix": "None"
}
},
"commentStart": 1239,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 1251,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 1204,
"end": 0,
"name": {
"commentStart": 1204,
"end": 0,
"name": "tangentialArcToRelative",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1204,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1261,
"end": 0,
"name": {
"commentStart": 1261,
"end": 0,
"name": "close",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1261,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1284,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1293,
"end": 0,
"name": {
"commentStart": 1293,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1276,
"end": 0,
"name": {
"commentStart": 1276,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1276,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 834,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"argument": {
"abs_path": false,
"commentStart": 1309,
"end": 0,
"name": {
"commentStart": 1309,
"end": 0,
"name": "toothSketch",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1302,
"end": 0,
"start": 0,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"commentStart": 816,
"end": 0,
"start": 0
},
"commentStart": 813,
"end": 0,
"params": [],
"start": 0,
"type": "FunctionExpression",
"type": "FunctionExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "fn",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 1322,
"declaration": {
"commentStart": 1385,
"end": 0,
"id": {
"commentStart": 1385,
"end": 0,
"name": "teeth",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1393,
"end": 0,
"name": {
"commentStart": 1393,
"end": 0,
"name": "tooth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1393,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1422,
"end": 0,
"name": "axis",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1429,
"elements": [
{
"commentStart": 1430,
"end": 0,
"raw": "10",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 10.0,
"suffix": "None"
}
},
{
"commentStart": 1434,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 1437,
"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": 1441,
"end": 0,
"name": "distance",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1452,
"end": 0,
"raw": "1.570796",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.570796,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1462,
"end": 0,
"name": "instances",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1474,
"end": 0,
"raw": "63",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 63.0,
"suffix": "None"
}
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1406,
"end": 0,
"name": {
"commentStart": 1406,
"end": 0,
"name": "patternLinear3d",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1406,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1393,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 1477,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Sketch and extrude the first end cap. This is a partial tooth",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"preComments": [
"",
"",
"// Pattern the single tooth over the length of the rack body"
],
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 1544,
"declaration": {
"commentStart": 1544,
"end": 0,
"id": {
"commentStart": 1544,
"end": 0,
"name": "endCapTooth",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 1572,
"end": 0,
"name": {
"commentStart": 1572,
"end": 0,
"name": "XY",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"callee": {
"abs_path": false,
"commentStart": 1558,
"end": 0,
"name": {
"commentStart": 1558,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1558,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"commentStart": 1596,
"elements": [
{
"commentStart": 1597,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 1598,
"end": 0,
"name": {
"commentStart": 1598,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1597,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 1607,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 1610,
"end": 0,
"raw": "11.849525",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 11.849525,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 1622,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 1581,
"end": 0,
"name": {
"commentStart": 1581,
"end": 0,
"name": "startProfileAt",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1581,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1635,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1641,
"elements": [
{
"commentStart": 1642,
"end": 0,
"raw": "0.314524",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.314524,
"suffix": "None"
}
},
{
"argument": {
"commentStart": 1653,
"end": 0,
"raw": "0.864147",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.864147,
"suffix": "None"
}
},
"commentStart": 1652,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1630,
"end": 0,
"name": {
"commentStart": 1630,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1630,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"commentStart": 1693,
"elements": [
{
"commentStart": 1694,
"end": 0,
"raw": "0.157636",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.157636,
"suffix": "None"
}
},
{
"argument": {
"commentStart": 1705,
"end": 0,
"raw": "0.110378",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.110378,
"suffix": "None"
}
},
"commentStart": 1704,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 1716,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 1669,
"end": 0,
"name": {
"commentStart": 1669,
"end": 0,
"name": "tangentialArcToRelative",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1669,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1729,
"end": 0,
"name": "endAbsolute",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1743,
"elements": [
{
"commentStart": 1744,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 1745,
"end": 0,
"name": {
"commentStart": 1745,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1744,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 1754,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"abs_path": false,
"commentStart": 1757,
"end": 0,
"name": {
"commentStart": 1757,
"end": 0,
"name": "minHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1724,
"end": 0,
"name": {
"commentStart": 1724,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1724,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1774,
"end": 0,
"name": {
"commentStart": 1774,
"end": 0,
"name": "close",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1774,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1795,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1804,
"end": 0,
"name": {
"commentStart": 1804,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1787,
"end": 0,
"name": {
"commentStart": 1787,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1787,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1558,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"6": [
{
"commentStart": 1810,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Sketch and extrude the second end cap. This is a partial tooth",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 1878,
"declaration": {
"commentStart": 1878,
"end": 0,
"id": {
"commentStart": 1878,
"end": 0,
"name": "endCapTooth2",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 1907,
"end": 0,
"name": {
"commentStart": 1907,
"end": 0,
"name": "XY",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"callee": {
"abs_path": false,
"commentStart": 1893,
"end": 0,
"name": {
"commentStart": 1893,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1893,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"commentStart": 1931,
"elements": [
{
"commentStart": 1932,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1932,
"end": 0,
"name": {
"commentStart": 1932,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1941,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 1944,
"end": 0,
"raw": "11.849525",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 11.849525,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 1956,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 1916,
"end": 0,
"name": {
"commentStart": 1916,
"end": 0,
"name": "startProfileAt",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1916,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1969,
"end": 0,
"name": "end",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1975,
"elements": [
{
"argument": {
"commentStart": 1977,
"end": 0,
"raw": "0.314524",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.314524,
"suffix": "None"
}
},
"commentStart": 1976,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"argument": {
"commentStart": 1988,
"end": 0,
"raw": "0.864147",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.864147,
"suffix": "None"
}
},
"commentStart": 1987,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1964,
"end": 0,
"name": {
"commentStart": 1964,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1964,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"commentStart": 2028,
"elements": [
{
"argument": {
"commentStart": 2030,
"end": 0,
"raw": "0.157636",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.157636,
"suffix": "None"
}
},
"commentStart": 2029,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"argument": {
"commentStart": 2041,
"end": 0,
"raw": "0.110378",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.110378,
"suffix": "None"
}
},
"commentStart": 2040,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 2052,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 2004,
"end": 0,
"name": {
"commentStart": 2004,
"end": 0,
"name": "tangentialArcToRelative",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2004,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 2065,
"end": 0,
"name": "endAbsolute",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 2079,
"elements": [
{
"commentStart": 2080,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 2080,
"end": 0,
"name": {
"commentStart": 2080,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 2089,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"abs_path": false,
"commentStart": 2092,
"end": 0,
"name": {
"commentStart": 2092,
"end": 0,
"name": "minHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 2060,
"end": 0,
"name": {
"commentStart": 2060,
"end": 0,
"name": "line",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2060,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 2109,
"end": 0,
"name": {
"commentStart": 2109,
"end": 0,
"name": "close",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2109,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 2130,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 2139,
"end": 0,
"name": {
"commentStart": 2139,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 2122,
"end": 0,
"name": {
"commentStart": 2122,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 2122,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1893,
"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": 391,
"end": 0,
"name": "settings",
"start": 0,
"type": "Identifier"
},
"preComments": [
"// 100mm Gear Rack",
"// A flat bar or rail that is engraved with teeth along its length. These teeth are designed to mesh with the teeth of a gear, known as a pinion. When the pinion, a small cylindrical gear, rotates, its teeth engage with the teeth on the rack, causing the rack to move linearly. Conversely, linear motion applied to the rack will cause the pinion to rotate.",
"",
"",
"// Set units"
],
"properties": [
{
"commentStart": 400,
"end": 0,
"key": {
"commentStart": 400,
"end": 0,
"name": "defaultLengthUnit",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ObjectProperty",
"value": {
"abs_path": false,
"commentStart": 420,
"end": 0,
"name": {
"commentStart": 420,
"end": 0,
"name": "mm",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"start": 0,
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {},
"startNodes": [
{
"commentStart": 423,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"start": 0
}
}