2025-03-06 18:01:24 -05:00
---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing washer.kcl
---
{
"Ok": {
"body": [
{
2025-03-20 16:23:20 +13:00
"commentStart": 518,
2025-03-06 18:01:24 -05:00
"declaration": {
2025-04-04 11:03:13 -07:00
"commentStart": 541,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"id": {
2025-04-04 11:03:13 -07:00
"commentStart": 541,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"name": "innerDiameter",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Identifier"
},
"init": {
2025-04-04 11:03:13 -07:00
"commentStart": 557,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"raw": "0.203",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.203,
"suffix": "None"
}
},
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclarator"
},
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"kind": "const",
2025-03-20 16:23:20 +13:00
"preComments": [
2025-04-04 11:03:13 -07:00
"// Define parameters"
2025-03-20 16:23:20 +13:00
],
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
2025-04-04 11:03:13 -07:00
"commentStart": 563,
2025-03-06 18:01:24 -05:00
"declaration": {
2025-04-04 11:03:13 -07:00
"commentStart": 563,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"id": {
2025-04-04 11:03:13 -07:00
"commentStart": 563,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"name": "outerDiameter",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Identifier"
},
"init": {
2025-04-04 11:03:13 -07:00
"commentStart": 579,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"raw": "0.438",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.438,
"suffix": "None"
}
},
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclarator"
},
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"kind": "const",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
2025-04-04 11:03:13 -07:00
"commentStart": 585,
2025-03-06 18:01:24 -05:00
"declaration": {
2025-04-04 11:03:13 -07:00
"commentStart": 585,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"id": {
2025-04-04 11:03:13 -07:00
"commentStart": 585,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"name": "thicknessMax",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Identifier"
},
"init": {
2025-04-04 11:03:13 -07:00
"commentStart": 600,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"raw": "0.038",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.038,
"suffix": "None"
}
},
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclarator"
},
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"kind": "const",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
2025-04-04 11:03:13 -07:00
"commentStart": 606,
2025-03-06 18:01:24 -05:00
"declaration": {
2025-04-04 11:03:13 -07:00
"commentStart": 606,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"id": {
2025-04-04 11:03:13 -07:00
"commentStart": 606,
"end": 0,
"name": "thicknessNom",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 621,
"end": 0,
"raw": "0.032",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.032,
"suffix": "None"
}
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"commentStart": 627,
"declaration": {
"commentStart": 627,
"end": 0,
"id": {
"commentStart": 627,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"name": "thicknessMin",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Identifier"
},
"init": {
2025-04-04 11:03:13 -07:00
"commentStart": 642,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"raw": "0.024",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.024,
"suffix": "None"
}
},
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclarator"
},
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"kind": "const",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
2025-04-04 11:03:13 -07:00
"commentStart": 647,
2025-03-06 18:01:24 -05:00
"declaration": {
2025-04-04 11:03:13 -07:00
"commentStart": 684,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"id": {
2025-04-04 11:03:13 -07:00
"commentStart": 684,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"name": "washerSketch",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Identifier"
},
"init": {
2025-04-04 11:03:13 -07:00
"body": [
{
"arguments": [
{
"abs_path": false,
"commentStart": 713,
"end": 0,
"name": {
"commentStart": 713,
"end": 0,
"name": "XY",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
],
"callee": {
"abs_path": false,
"commentStart": 699,
"end": 0,
"name": {
"commentStart": 699,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"name": "startSketchOn",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 699,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 729,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"name": "center",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Identifier"
},
2025-04-04 11:03:13 -07:00
"arg": {
"commentStart": 738,
"elements": [
2025-03-06 18:01:24 -05:00
{
2025-04-04 11:03:13 -07:00
"commentStart": 739,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"raw": "0",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
2025-03-06 18:01:24 -05:00
},
{
2025-04-04 11:03:13 -07:00
"commentStart": 742,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"raw": "0",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 746,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 755,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 755,
"end": 0,
"name": {
"commentStart": 755,
"end": 0,
"name": "outerDiameter",
"start": 0,
"type": "Identifier"
2025-03-06 18:01:24 -05:00
},
2025-04-04 11:03:13 -07:00
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 771,
"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": 722,
"end": 0,
"name": {
"commentStart": 722,
"end": 0,
"name": "circle",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 722,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 791,
"end": 0,
"name": "center",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 800,
"elements": [
2025-03-06 18:01:24 -05:00
{
2025-04-04 11:03:13 -07:00
"commentStart": 801,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"raw": "0",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
2025-03-06 18:01:24 -05:00
},
{
2025-04-04 11:03:13 -07:00
"commentStart": 804,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"raw": "0",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
2025-03-06 18:01:24 -05:00
}
],
2025-03-20 11:06:27 +13:00
"end": 0,
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "ArrayExpression",
"type": "ArrayExpression"
2025-03-06 18:01:24 -05:00
}
2025-04-04 11:03:13 -07:00
},
{
"type": "LabeledArg",
"label": {
"commentStart": 808,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 817,
"end": 0,
"left": {
2025-03-24 20:58:55 +13:00
"abs_path": false,
2025-04-04 11:03:13 -07:00
"commentStart": 817,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-24 20:58:55 +13:00
"name": {
2025-04-04 11:03:13 -07:00
"commentStart": 817,
2025-03-24 20:58:55 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"name": "innerDiameter",
2025-03-24 20:58:55 +13:00
"start": 0,
"type": "Identifier"
},
"path": [],
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-24 20:58:55 +13:00
"type": "Name",
"type": "Name"
2025-04-04 11:03:13 -07:00
},
"operator": "/",
"right": {
"commentStart": 833,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
2025-03-06 18:01:24 -05:00
}
2025-04-04 11:03:13 -07:00
}
],
"callee": {
"abs_path": false,
"commentStart": 784,
"end": 0,
"name": {
"commentStart": 784,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"name": "circle",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "Identifier"
2025-03-06 18:01:24 -05:00
},
2025-04-04 11:03:13 -07:00
"path": [],
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "Name"
2025-03-06 18:01:24 -05:00
},
2025-04-04 11:03:13 -07:00
"commentStart": 784,
"end": 0,
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
2025-03-06 18:01:24 -05:00
},
2025-04-04 11:03:13 -07:00
{
"commentStart": 837,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"abs_path": false,
"commentStart": 779,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"name": {
"commentStart": 779,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"name": "hole",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "Identifier"
2025-03-06 18:01:24 -05:00
},
2025-04-04 11:03:13 -07:00
"path": [],
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "Name"
2025-03-06 18:01:24 -05:00
},
2025-04-04 11:03:13 -07:00
"commentStart": 779,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
2025-03-06 18:01:24 -05:00
}
],
2025-04-04 11:03:13 -07:00
"commentStart": 699,
"end": 0,
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "PipeExpression",
"type": "PipeExpression"
2025-03-06 18:01:24 -05:00
},
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclarator"
},
2025-03-20 11:06:27 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"kind": "const",
2025-03-20 16:23:20 +13:00
"preComments": [
"",
"",
2025-04-04 11:03:13 -07:00
"// Define the sketch of the washer"
2025-03-20 16:23:20 +13:00
],
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
2025-04-04 11:03:13 -07:00
"commentStart": 839,
"declaration": {
"commentStart": 841,
"end": 0,
"id": {
"commentStart": 841,
"end": 0,
"name": "washer",
"start": 0,
"type": "Identifier"
},
"init": {
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 872,
"end": 0,
"name": "length",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 881,
"end": 0,
"name": {
"commentStart": 881,
"end": 0,
"name": "thicknessNom",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
2025-03-24 20:58:55 +13:00
"abs_path": false,
2025-04-04 11:03:13 -07:00
"commentStart": 850,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-24 20:58:55 +13:00
"name": {
2025-04-04 11:03:13 -07:00
"commentStart": 850,
2025-03-24 20:58:55 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"name": "extrude",
2025-03-24 20:58:55 +13:00
"start": 0,
"type": "Identifier"
},
"path": [],
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-24 20:58:55 +13:00
"type": "Name"
2025-03-06 18:01:24 -05:00
},
2025-04-04 11:03:13 -07:00
"commentStart": 850,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
2025-03-24 20:58:55 +13:00
"abs_path": false,
2025-04-04 11:03:13 -07:00
"commentStart": 858,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-24 20:58:55 +13:00
"name": {
2025-04-04 11:03:13 -07:00
"commentStart": 858,
2025-03-24 20:58:55 +13:00
"end": 0,
2025-04-04 11:03:13 -07:00
"name": "washerSketch",
2025-03-24 20:58:55 +13:00
"start": 0,
"type": "Identifier"
},
"path": [],
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-24 20:58:55 +13:00
"type": "Name",
"type": "Name"
2025-03-06 18:01:24 -05:00
}
},
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "VariableDeclarator"
2025-03-06 18:01:24 -05:00
},
2025-04-04 11:03:13 -07:00
"end": 0,
"kind": "const",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-04-04 11:03:13 -07:00
"type": "VariableDeclaration",
"type": "VariableDeclaration"
2025-03-06 18:01:24 -05:00
}
],
2025-03-20 16:23:20 +13:00
"commentStart": 0,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"innerAttrs": [
{
2025-03-20 16:23:20 +13:00
"commentStart": 0,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"name": {
2025-03-20 16:23:20 +13:00
"commentStart": 486,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"name": "settings",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Identifier"
},
2025-03-20 16:23:20 +13:00
"preComments": [
"// Washer",
"// A small, typically disk-shaped component with a hole in the middle, used in a wide range of applications, primarily in conjunction with fasteners like bolts and screws. Washers distribute the load of a fastener across a broader area. This is especially important when the fastening surface is soft or uneven, as it helps to prevent damage to the surface and ensures the load is evenly distributed, reducing the risk of the fastener becoming loose over time.",
"",
"",
"// Set units"
],
2025-03-06 18:01:24 -05:00
"properties": [
{
2025-03-20 16:23:20 +13:00
"commentStart": 495,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"key": {
2025-03-20 16:23:20 +13:00
"commentStart": 495,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-06 18:01:24 -05:00
"name": "defaultLengthUnit",
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Identifier"
},
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "ObjectProperty",
"value": {
2025-03-24 20:58:55 +13:00
"abs_path": false,
2025-03-20 16:23:20 +13:00
"commentStart": 515,
2025-03-20 11:06:27 +13:00
"end": 0,
2025-03-24 20:58:55 +13:00
"name": {
"commentStart": 515,
"end": 0,
"name": "in",
"start": 0,
"type": "Identifier"
},
"path": [],
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-24 20:58:55 +13:00
"type": "Name",
"type": "Name"
2025-03-06 18:01:24 -05:00
}
}
],
2025-03-20 11:06:27 +13:00
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {
2025-04-04 11:03:13 -07:00
"5": [
2025-03-06 18:01:24 -05:00
{
2025-04-04 11:03:13 -07:00
"commentStart": 839,
2025-03-20 11:06:27 +13:00
"end": 0,
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"startNodes": [
{
2025-03-20 16:23:20 +13:00
"commentStart": 518,
2025-03-20 11:06:27 +13:00
"end": 0,
"start": 0,
2025-03-06 18:01:24 -05:00
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"start": 0
}
}