Files
modeling-app/rust/kcl-lib/tests/kcl_samples/car-wheel-assembly/ast.snap
Josh Gomez 58e0c0e916 Improve KCL Samples (#5767)
* 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>
2025-03-13 23:38:51 -07:00

617 lines
17 KiB
Plaintext

---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing car-wheel-assembly.kcl
---
{
"Ok": {
"body": [
{
"end": 163,
"path": {
"type": "Kcl",
"filename": "car-wheel.kcl"
},
"selector": {
"type": "None",
"alias": {
"end": 163,
"name": "carWheel",
"start": 155,
"type": "Identifier"
}
},
"start": 129,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"end": 199,
"path": {
"type": "Kcl",
"filename": "car-rotor.kcl"
},
"selector": {
"type": "None",
"alias": {
"end": 199,
"name": "carRotor",
"start": 191,
"type": "Identifier"
}
},
"start": 165,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"end": 242,
"path": {
"type": "Kcl",
"filename": "brake-caliper.kcl"
},
"selector": {
"type": "None",
"alias": {
"end": 242,
"name": "brakeCaliper",
"start": 230,
"type": "Identifier"
}
},
"start": 200,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"end": 273,
"path": {
"type": "Kcl",
"filename": "lug-nut.kcl"
},
"selector": {
"type": "None",
"alias": {
"end": 273,
"name": "lugNut",
"start": 267,
"type": "Identifier"
}
},
"start": 243,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"end": 306,
"path": {
"type": "Kcl",
"filename": "car-tire.kcl"
},
"selector": {
"type": "None",
"alias": {
"end": 306,
"name": "carTire",
"start": 299,
"type": "Identifier"
}
},
"start": 274,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"end": 341,
"path": {
"type": "Kcl",
"filename": "globals.kcl"
},
"selector": {
"type": "List",
"items": [
{
"alias": null,
"end": 322,
"name": {
"end": 322,
"name": "lugCount",
"start": 314,
"type": "Identifier"
},
"start": 314,
"type": "ImportItem"
}
]
},
"start": 307,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"end": 391,
"expression": {
"body": [
{
"end": 351,
"name": "carRotor",
"start": 343,
"type": "Identifier",
"type": "Identifier"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 376,
"name": "translate",
"start": 367,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 381,
"raw": "0",
"start": 380,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 386,
"raw": "0.5",
"start": 383,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.5,
"suffix": "None"
}
},
{
"end": 389,
"raw": "0",
"start": 388,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 390,
"start": 379,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 366,
"name": "translate",
"start": 357,
"type": "Identifier"
},
"end": 391,
"start": 357,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 391,
"start": 343,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 343,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"end": 400,
"expression": {
"end": 400,
"name": "carWheel",
"start": 392,
"type": "Identifier",
"type": "Identifier"
},
"start": 392,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"end": 564,
"expression": {
"body": [
{
"end": 407,
"name": "lugNut",
"start": 401,
"type": "Identifier",
"type": "Identifier"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 447,
"name": "arcDegrees",
"start": 437,
"type": "Identifier"
},
"arg": {
"end": 453,
"raw": "360",
"start": 450,
"type": "Literal",
"type": "Literal",
"value": {
"value": 360.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"end": 464,
"name": "axis",
"start": 460,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 469,
"raw": "0",
"start": 468,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 472,
"raw": "1",
"start": 471,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
{
"end": 475,
"raw": "0",
"start": 474,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 476,
"start": 467,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 489,
"name": "center",
"start": 483,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 494,
"raw": "0",
"start": 493,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 497,
"raw": "0",
"start": 496,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 500,
"raw": "0",
"start": 499,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 501,
"start": 492,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 517,
"name": "instances",
"start": 508,
"type": "Identifier"
},
"arg": {
"end": 528,
"name": "lugCount",
"start": 520,
"type": "Identifier",
"type": "Identifier"
}
},
{
"type": "LabeledArg",
"label": {
"end": 551,
"name": "rotateDuplicates",
"start": 535,
"type": "Identifier"
},
"arg": {
"end": 559,
"raw": "false",
"start": 554,
"type": "Literal",
"type": "Literal",
"value": false
}
}
],
"callee": {
"end": 430,
"name": "patternCircular3d",
"start": 413,
"type": "Identifier"
},
"end": 564,
"start": 413,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 564,
"start": 401,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 401,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"end": 617,
"expression": {
"body": [
{
"end": 577,
"name": "brakeCaliper",
"start": 565,
"type": "Identifier",
"type": "Identifier"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 602,
"name": "translate",
"start": 593,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 607,
"raw": "0",
"start": 606,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 612,
"raw": "0.5",
"start": 609,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.5,
"suffix": "None"
}
},
{
"end": 615,
"raw": "0",
"start": 614,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 616,
"start": 605,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 592,
"name": "translate",
"start": 583,
"type": "Identifier"
},
"end": 617,
"start": 583,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 617,
"start": 565,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 565,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"end": 625,
"expression": {
"end": 625,
"name": "carTire",
"start": 618,
"type": "Identifier",
"type": "Identifier"
},
"start": 618,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
}
],
"end": 626,
"innerAttrs": [
{
"end": 127,
"name": {
"end": 103,
"name": "settings",
"start": 95,
"type": "Identifier"
},
"properties": [
{
"end": 126,
"key": {
"end": 121,
"name": "defaultLengthUnit",
"start": 104,
"type": "Identifier"
},
"start": 104,
"type": "ObjectProperty",
"value": {
"end": 126,
"name": "in",
"start": 124,
"type": "Identifier",
"type": "Identifier"
}
}
],
"start": 94,
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {
"5": [
{
"end": 343,
"start": 341,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"startNodes": [
{
"end": 21,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "Car Wheel Assembly",
"style": "line"
}
},
{
"end": 79,
"start": 22,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "A car wheel assembly with a rotor, tire, and lug nuts.",
"style": "line"
}
},
{
"end": 81,
"start": 79,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
},
{
"end": 93,
"start": 81,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "Set units",
"style": "line"
}
},
{
"end": 129,
"start": 127,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"start": 0
}
}