Files
modeling-app/rust/kcl-lib/tests/kcl_samples/flange/ast.snap

2068 lines
63 KiB
Plaintext
Raw Normal View History

---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing flange.kcl
---
{
"Ok": {
"body": [
{
"commentStart": 333,
"declaration": {
"commentStart": 356,
"end": 0,
"id": {
"commentStart": 356,
"end": 0,
"name": "mountingHoleDia",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 374,
"end": 0,
"raw": ".625",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.625,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"preComments": [
"// Define parameters"
],
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 379,
"declaration": {
"commentStart": 379,
"end": 0,
"id": {
"commentStart": 379,
"end": 0,
"name": "baseDia",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 389,
"end": 0,
"raw": "4.625",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 4.625,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 395,
"declaration": {
"commentStart": 395,
"end": 0,
"id": {
"commentStart": 395,
"end": 0,
"name": "pipeDia",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 405,
"end": 0,
"raw": "1.25",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.25,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 410,
"declaration": {
"commentStart": 410,
"end": 0,
"id": {
"commentStart": 410,
"end": 0,
"name": "totalThickness",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 427,
"end": 0,
"raw": "0.813",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.813,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 433,
"declaration": {
"commentStart": 433,
"end": 0,
"id": {
"commentStart": 433,
"end": 0,
"name": "topTotalDiameter",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 452,
"end": 0,
"raw": "2.313",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.313,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 458,
"declaration": {
"commentStart": 458,
"end": 0,
"id": {
"commentStart": 458,
"end": 0,
"name": "bottomThickness",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 476,
"end": 0,
"raw": "0.06",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.06,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 481,
"declaration": {
"commentStart": 481,
"end": 0,
"id": {
"commentStart": 481,
"end": 0,
"name": "bottomTotalDiameter",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 503,
"end": 0,
"raw": "2.5",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.5,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 507,
"declaration": {
"commentStart": 507,
"end": 0,
"id": {
"commentStart": 507,
"end": 0,
"name": "mountingHolePlacementDiameter",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 539,
"end": 0,
"raw": "3.5",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.5,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 543,
"declaration": {
"commentStart": 543,
"end": 0,
"id": {
"commentStart": 543,
"end": 0,
"name": "baseThickness",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 559,
"end": 0,
"raw": ".625",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.625,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 564,
"declaration": {
"commentStart": 564,
"end": 0,
"id": {
"commentStart": 564,
"end": 0,
"name": "topTotalThickness",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 584,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 584,
"end": 0,
"name": {
"commentStart": 584,
"end": 0,
"name": "totalThickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 602,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 602,
"end": 0,
"name": {
"commentStart": 602,
"end": 0,
"name": "bottomThickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "+",
"right": {
"abs_path": false,
"commentStart": 620,
"end": 0,
"name": {
"commentStart": 620,
"end": 0,
"name": "baseThickness",
"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": 635,
"declaration": {
"commentStart": 635,
"end": 0,
"id": {
"commentStart": 635,
"end": 0,
"name": "nHoles",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 644,
"end": 0,
"raw": "4",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 4.0,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 645,
"end": 0,
"expression": {
"arguments": [
{
"abs_path": false,
"commentStart": 718,
"end": 0,
"name": {
"commentStart": 718,
"end": 0,
"name": "nHoles",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 726,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
{
"commentStart": 729,
"end": 0,
"raw": "\"nHoles must be greater than 1\"",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "nHoles must be greater than 1"
}
],
"callee": {
"abs_path": false,
"commentStart": 700,
"end": 0,
"name": {
"commentStart": 700,
"end": 0,
"name": "assertGreaterThan",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 700,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
"preComments": [
"",
"",
"// Add assertion so nHoles are always greater than 1"
],
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 761,
"declaration": {
"commentStart": 817,
"end": 0,
"id": {
"commentStart": 817,
"end": 0,
"name": "circles",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 841,
"end": 0,
"name": {
"commentStart": 841,
"end": 0,
"name": "XY",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"callee": {
"abs_path": false,
"commentStart": 827,
"end": 0,
"name": {
"commentStart": 827,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 827,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 857,
"end": 0,
"name": "center",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 866,
"elements": [
{
"commentStart": 867,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 867,
"end": 0,
"name": {
"commentStart": 867,
"end": 0,
"name": "mountingHolePlacementDiameter",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 899,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 902,
"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": 906,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 915,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 915,
"end": 0,
"name": {
"commentStart": 915,
"end": 0,
"name": "mountingHoleDia",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 933,
"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": 850,
"end": 0,
"name": {
"commentStart": 850,
"end": 0,
"name": "circle",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 850,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 967,
"end": 0,
"name": "arcDegrees",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 980,
"end": 0,
"raw": "360",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 360.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 992,
"end": 0,
"name": "center",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1001,
"elements": [
{
"commentStart": 1002,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 1005,
"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": 1016,
"end": 0,
"name": "instances",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1028,
"end": 0,
"name": {
"commentStart": 1028,
"end": 0,
"name": "nHoles",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1043,
"end": 0,
"name": "rotateDuplicates",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1062,
"end": 0,
"raw": "true",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": true
}
}
],
"callee": {
"abs_path": false,
"commentStart": 941,
"end": 0,
"name": {
"commentStart": 941,
"end": 0,
"name": "patternCircular2d",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 941,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 827,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"2": [
{
"commentStart": 1074,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Create the base of the flange and add the mounting holes",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"preComments": [
"",
"",
"// Create the circular pattern for the mounting holes"
],
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 1136,
"declaration": {
"commentStart": 1136,
"end": 0,
"id": {
"commentStart": 1136,
"end": 0,
"name": "flangeBase",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 1163,
"end": 0,
"name": {
"commentStart": 1163,
"end": 0,
"name": "XY",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"callee": {
"abs_path": false,
"commentStart": 1149,
"end": 0,
"name": {
"commentStart": 1149,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1149,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1179,
"end": 0,
"name": "center",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1188,
"elements": [
{
"commentStart": 1189,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 1192,
"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": 1196,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1205,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1205,
"end": 0,
"name": {
"commentStart": 1205,
"end": 0,
"name": "baseDia",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1215,
"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": 1172,
"end": 0,
"name": {
"commentStart": 1172,
"end": 0,
"name": "circle",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1172,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"abs_path": false,
"commentStart": 1228,
"end": 0,
"name": {
"commentStart": 1228,
"end": 0,
"name": "circles",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 1237,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 1223,
"end": 0,
"name": {
"commentStart": 1223,
"end": 0,
"name": "hole",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1223,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1253,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1262,
"end": 0,
"name": {
"commentStart": 1262,
"end": 0,
"name": "baseThickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1245,
"end": 0,
"name": {
"commentStart": 1245,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1245,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1149,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"3": [
{
"commentStart": 1276,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Create the extrusion on the top of the flange 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": 1332,
"declaration": {
"commentStart": 1332,
"end": 0,
"id": {
"commentStart": 1332,
"end": 0,
"name": "topExtrusion",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 1361,
"end": 0,
"name": {
"commentStart": 1361,
"end": 0,
"name": "flangeBase",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 1373,
"end": 0,
"raw": "'end'",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "end"
}
],
"callee": {
"abs_path": false,
"commentStart": 1347,
"end": 0,
"name": {
"commentStart": 1347,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1347,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1392,
"end": 0,
"name": "center",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1401,
"elements": [
{
"commentStart": 1402,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 1405,
"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": 1409,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1418,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1418,
"end": 0,
"name": {
"commentStart": 1418,
"end": 0,
"name": "topTotalDiameter",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1437,
"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": 1385,
"end": 0,
"name": {
"commentStart": 1385,
"end": 0,
"name": "circle",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1385,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1453,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1462,
"end": 0,
"name": {
"commentStart": 1462,
"end": 0,
"name": "topTotalThickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1445,
"end": 0,
"name": {
"commentStart": 1445,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1445,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1347,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"2": [
{
"commentStart": 1480,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Create the extrusion on the bottom of the flange 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": 1539,
"declaration": {
"commentStart": 1539,
"end": 0,
"id": {
"commentStart": 1539,
"end": 0,
"name": "bottomExtrusion",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 1571,
"end": 0,
"name": {
"commentStart": 1571,
"end": 0,
"name": "flangeBase",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 1583,
"end": 0,
"raw": "'start'",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "start"
}
],
"callee": {
"abs_path": false,
"commentStart": 1557,
"end": 0,
"name": {
"commentStart": 1557,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1557,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1604,
"end": 0,
"name": "center",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1613,
"elements": [
{
"commentStart": 1614,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 1617,
"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": 1621,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1630,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1630,
"end": 0,
"name": {
"commentStart": 1630,
"end": 0,
"name": "bottomTotalDiameter",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1652,
"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": 1597,
"end": 0,
"name": {
"commentStart": 1597,
"end": 0,
"name": "circle",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1597,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1668,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1677,
"end": 0,
"name": {
"commentStart": 1677,
"end": 0,
"name": "bottomThickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1660,
"end": 0,
"name": {
"commentStart": 1660,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1660,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1557,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"2": [
{
"commentStart": 1693,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Cut a hole through the entire body",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 1733,
"declaration": {
"commentStart": 1733,
"end": 0,
"id": {
"commentStart": 1733,
"end": 0,
"name": "pipeHole",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 1758,
"end": 0,
"name": {
"commentStart": 1758,
"end": 0,
"name": "topExtrusion",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"commentStart": 1772,
"end": 0,
"raw": "'end'",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "end"
}
],
"callee": {
"abs_path": false,
"commentStart": 1744,
"end": 0,
"name": {
"commentStart": 1744,
"end": 0,
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1744,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1791,
"end": 0,
"name": "center",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1800,
"elements": [
{
"commentStart": 1801,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 1804,
"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": 1808,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1817,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1817,
"end": 0,
"name": {
"commentStart": 1817,
"end": 0,
"name": "pipeDia",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1827,
"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": 1784,
"end": 0,
"name": {
"commentStart": 1784,
"end": 0,
"name": "circle",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1784,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1846,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1857,
"end": 0,
"left": {
"commentStart": 1857,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1857,
"end": 0,
"name": {
"commentStart": 1857,
"end": 0,
"name": "topTotalThickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "+",
"right": {
"abs_path": false,
"commentStart": 1877,
"end": 0,
"name": {
"commentStart": 1877,
"end": 0,
"name": "baseThickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"abs_path": false,
"commentStart": 1893,
"end": 0,
"name": {
"commentStart": 1893,
"end": 0,
"name": "bottomThickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1855,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1835,
"end": 0,
"name": {
"commentStart": 1835,
"end": 0,
"name": "extrude",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1835,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
"commentStart": 1843,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
}
],
"commentStart": 1744,
"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": 301,
"end": 0,
"name": "settings",
"start": 0,
"type": "Identifier"
},
"preComments": [
"// Flange",
"// A flange is a flat rim, collar, or rib, typically forged or cast, that is used to strengthen an object, guide it, or attach it to another object. Flanges are known for their use in various applications, including piping, plumbing, and mechanical engineering, among others.",
"",
"",
"// Set units"
],
"properties": [
{
"commentStart": 310,
"end": 0,
"key": {
"commentStart": 310,
"end": 0,
"name": "defaultLengthUnit",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ObjectProperty",
"value": {
"abs_path": false,
"commentStart": 330,
"end": 0,
"name": {
"commentStart": 330,
"end": 0,
"name": "in",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"start": 0,
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {},
"startNodes": [
{
"commentStart": 333,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"start": 0
}
}