John Smith
john@example.com
---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing exhaust-manifold.kcl
{
"Ok": {
"body": [
"commentStart": 0,
"declaration": {
"end": 0,
"id": {
"name": "primaryTubeDiameter",
"start": 0,
"type": "Identifier"
},
"init": {
"raw": "1.625",
"type": "Literal",
"value": {
"value": 1.625,
"suffix": "None"
}
"type": "VariableDeclarator"
"kind": "const",
"preComments": [
"// Define parameters"
],
"type": "VariableDeclaration",
"type": "VariableDeclaration"
"name": "wallThickness",
"raw": "0.080",
"value": 0.08,
"name": "plateHeight",
"raw": "0.125",
"value": 0.125,
"name": "bendRadius",
"raw": "3",
"value": 3.0,
"name": "primaryTube",
"body": {
"name": "pos001",
"left": {
"abs_path": false,
"name": {
"name": "n",
"path": [],
"type": "Name",
"type": "Name"
"operator": "*",
"right": {
"raw": "2",
"value": 2.0,
"type": "BinaryExpression",
"type": "BinaryExpression"
"// Create an index for the function"
"name": "sweepPlane",
"properties": [
"key": {
"name": "origin",
"type": "ObjectProperty",
"elements": [
"raw": "0.0",
"value": 0.0,
"raw": "0",
"type": "ArrayExpression",
"type": "ArrayExpression"
"name": "xAxis",
"arguments": [
"argument": {
"name": "angle001",
"operator": "-",
"type": "UnaryExpression",
"type": "UnaryExpression"
"callee": {
"name": "sin",
"type": "CallExpression",
"type": "CallExpression"
"name": "cos",
"name": "yAxis",
"raw": "1.0",
"value": 1.0,
"name": "zAxis",
"type": "ObjectExpression",
"type": "ObjectExpression"
"",
"// Define a plane for each sweep path defined by an angle"
"name": "sweepPath",
"name": "startSketchOn",
"type": "LabeledArg",
"label": {
"name": "at",
"arg": {
"name": "startProfile",
"type": "CallExpressionKw",
"unlabeled": null
"name": "end",
"name": "length001",
"name": "line",
"name": "angle",
"raw": "80",
"value": 80.0,
"name": "radius",
"name": "tag",
"type": "TagDeclarator",
"value": "arc01"
"name": "tangentialArc",
"name": "arc01",
"name": "tangentToEnd",
"name": "length",
"name": "length002",
"name": "angledLine",
"raw": "85",
"value": 85.0,
"value": "arc02"
"name": "arc02",
"name": "length003",
"nonCodeMeta": {
"nonCodeNodes": {
"6": [
"type": "NonCodeNode",
"type": "newLineBlockComment",
"value": "Create the cross section of each tube and sweep them",
"style": "line"
]
"startNodes": []
"type": "PipeExpression",
"type": "PipeExpression"
"// Draw a path for each sweep"
"name": "sweepProfile",
"name": "XY",
"name": "center",
"operator": "/",
"name": "circle",
"name": "tool",
"name": "subtract2d",
"name": "path",
"name": "sweep",
"properties": [],
"type": "ReturnStatement",
"type": "ReturnStatement"
"3": [
"type": "newLine"
"start": 0
"params": [
"type": "Parameter",
"identifier": {
"type": "FunctionExpression",
"type": "FunctionExpression"
"kind": "fn",
"// Create a function to draw each primary tube with specified lengths and angles"
"expression": {
"raw": "6",
"value": 6.0,
"raw": "5",
"value": 5.0,
"// Draw a primary tube for each cylinder with specified lengths and angles"
"type": "ExpressionStatement",
"type": "ExpressionStatement"
"raw": "1",
"raw": "24.3",
"value": 24.3,
"raw": "25.2",
"value": 25.2,
"name": "flangeSketch",
"operator": "+",
"raw": "1.3",
"value": 1.3,
"raw": "1.25",
"value": 1.25,
"raw": "2.6",
"value": 2.6,
"value": "seg01"
"name": "xLine",
"raw": ".3",
"value": 0.3,
"raw": "40",
"value": 40.0,
"raw": ".9",
"value": 0.9,
"raw": "1.4",
"value": 1.4,
"value": "seg03"
"name": "seg01",
"name": "segLen",
"value": "seg04"
"name": "yLine",
"raw": "3.1",
"value": 3.1,
"value": "seg05"
"raw": "1.5",
"value": 1.5,
"name": "seg05",
"value": "seg07"
"name": "endAbsolute",
"type": "PipeSubstitution",
"type": "PipeSubstitution"
"name": "profileStartY",
"value": "seg08"
"name": "seg03",
"value": "seg09"
"name": "profileStartX",
"arguments": [],
"name": "close",
"raw": "4",
"value": 4.0,
"raw": ".6",
"value": 0.6,
"raw": "0.25",
"value": 0.25,
"name": "extrude",
"name": "tags",
"name": "seg04",
"name": "getNextAdjacentEdge",
"name": "seg07",
"name": "fillet",
"raw": ".25",
"name": "seg08",
"18": [
"value": "Create openings in the flange to accommodate each tube",
"22": [
"value": "Add mounting holes to the flange",
"26": [
"value": "Extrude the flange and fillet the edges",
"// Create the mounting flange for the header"
"innerAttrs": [
"name": "settings",
"// Exhaust Manifold",
"// A welded exhaust header for an inline 4-cylinder engine",
"// Set units"
"name": "defaultLengthUnit",
"name": "in",
"type": "Annotation"
"nonCodeNodes": {},
"startNodes": [