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

2212 lines
86 KiB
Plaintext
Raw Normal View History

test: Vendor kcl-samples and add simulation tests for them (#5460) * Change to unzip * Download kcl-samples as zip to public dir * Fix fetch:samples, e2e electron still not working * Change error message to be clearer * Refactor so that input and output directories of sim tests can be different * Add kcl samples test implementation * Update output since adding kcl_samples tests * Update kcl-samples branch * Fix git-ignore pattern to only apply to the root * Fix yarn install and yarn fetch:samples to work the first time * Remove unneeded exists check * Change to use kcl-samples in public directory * Add kcl-samples * Update output since updating kcl-samples * Update output files * Change to not fetch samples during yarn install * Update output after merge * Ignore kcl-samples in codespell * WIP: Don't run e2e if only kcl-samples changed * Conditionally run cargo tests * Fix to round floating point values in program memory arrays * Update output since merge and rounding numbers in memory * Fix memory redaction for floating point to find more values * Fix float redaction pattern * Update output since rounding floating point numbers * Add center to floating point pattern * Fix trigger to use picomatch syntax * Update output since rounding center * Remove kcl-samples github workflows * Enable Rust backtrace * Update output after re-running * Update output after changing order of post-extrude commands * Fix to have deterministic order of commands * Update output after reverting ordering changes * Update kcl-samples * Update output after updating samples * Fix error messages to show the names of all samples that failed * Change cargo test command to match current one * Update kcl-samples * Update output since updating kcl-samples * Add generate manifest workflow and yarn script * Fix error check to actually work * Change util function to be what we actually need * Move new files after merge * Fix paths since directory move * Add dependabot updates for kcl-samples * Add GitHub workflow to make PR to kcl-samples repo * Add GitHub workflow to check kcl-samples header comments * Fix worfklow to change to the right directory * Add auto-commit simulation test output changes * Add permissions to workflows * Fix to run git commit step * Install just if needed * Fix directory of justfile * Add installation of cargo-insta * Fix to use underscore * Fix to allow just command failure * Change to always install CLI tools and cache them * Trying to fix overwrite failing * Combine commands * Change reviewer * Change to PR targeting the next branch * Change git commands to not do unnecessary fetch * Comment out trigger for creating a PR * Update kcl-samples from next branch * Update outputs after kcl-samples change * Fix to use bash pipefail * Add rust backtrace * Print full env from sim tests * Change command to use long option name * Fix to use ci profile even when calling through just * Add INSTA_UPDATE=always * Fix git push by using an app token on checkout * Add comments * Fix to use bash options * Change to echo when no changes are found * Fix so that kcl-samples updates don't trigger full run * Fix paths to reflect new crate location * Fix path detection * Fix e2e job to ignore kcl_samples simulation test output * Fix the fetch logic for the KCL samples after vendoring (#5661) Fixes the last 2 E2E tests for #5460. --------- Co-authored-by: Pierre Jacquier <pierre@zoo.dev> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2025-03-06 18:01:24 -05:00
---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing mounting-plate.kcl
---
{
"Ok": {
"body": [
{
"declaration": {
"end": 278,
"id": {
"end": 273,
"name": "plateLength",
"start": 262,
"type": "Identifier"
},
"init": {
"end": 278,
"raw": "10",
"start": 276,
"type": "Literal",
"type": "Literal",
"value": {
"value": 10.0,
"suffix": "None"
}
},
"start": 262,
"type": "VariableDeclarator"
},
"end": 278,
"kind": "const",
"start": 262,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 293,
"id": {
"end": 289,
"name": "plateWidth",
"start": 279,
"type": "Identifier"
},
"init": {
"end": 293,
"raw": "6",
"start": 292,
"type": "Literal",
"type": "Literal",
"value": {
"value": 6.0,
"suffix": "None"
}
},
"start": 279,
"type": "VariableDeclarator"
},
"end": 293,
"kind": "const",
"start": 279,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 312,
"id": {
"end": 306,
"name": "filletRadius",
"start": 294,
"type": "Identifier"
},
"init": {
"end": 312,
"raw": "0.5",
"start": 309,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.5,
"suffix": "None"
}
},
"start": 294,
"type": "VariableDeclarator"
},
"end": 312,
"kind": "const",
"start": 294,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 332,
"id": {
"end": 327,
"name": "plateThickness",
"start": 313,
"type": "Identifier"
},
"init": {
"end": 332,
"raw": ".5",
"start": 330,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.5,
"suffix": "None"
}
},
"start": 313,
"type": "VariableDeclarator"
},
"end": 332,
"kind": "const",
"start": 313,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 355,
"id": {
"end": 351,
"name": "centerHoleDiameter",
"start": 333,
"type": "Identifier"
},
"init": {
"end": 355,
"raw": "2",
"start": 354,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 333,
"type": "VariableDeclarator"
},
"end": 355,
"kind": "const",
"start": 333,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 889,
"id": {
"end": 519,
"name": "rectShape",
"start": 510,
"type": "Identifier"
},
"init": {
"body": {
"body": [
{
"declaration": {
"end": 875,
"id": {
"end": 537,
"name": "rr",
"start": 535,
"type": "Identifier"
},
"init": {
"body": [
{
"arguments": [
{
"end": 558,
"raw": "'XY'",
"start": 554,
"type": "Literal",
"type": "Literal",
"value": "XY"
}
],
"callee": {
"end": 553,
"name": "startSketchOn",
"start": 540,
"type": "Identifier"
},
"end": 559,
"start": 540,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"elements": [
{
"end": 598,
"left": {
"computed": false,
"end": 589,
"object": {
"end": 586,
"name": "pos",
"start": 583,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 588,
"raw": "0",
"start": 587,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
"start": 583,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "-",
"right": {
"end": 598,
"left": {
"end": 594,
"name": "w",
"start": 593,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 598,
"raw": "2",
"start": 597,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 593,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 583,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 616,
"left": {
"computed": false,
"end": 607,
"object": {
"end": 604,
"name": "pos",
"start": 601,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 606,
"raw": "1",
"start": 605,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 601,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "-",
"right": {
"end": 616,
"left": {
"end": 612,
"name": "l",
"start": 611,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 616,
"raw": "2",
"start": 615,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 611,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 601,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 618,
"start": 582,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"end": 621,
"start": 620,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 581,
"name": "startProfileAt",
"start": 567,
"type": "Identifier"
},
"end": 622,
"start": 567,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 646,
"name": "endAbsolute",
"start": 635,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 664,
"left": {
"computed": false,
"end": 656,
"object": {
"end": 653,
"name": "pos",
"start": 650,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 655,
"raw": "0",
"start": 654,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
"start": 650,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "+",
"right": {
"end": 664,
"left": {
"end": 660,
"name": "w",
"start": 659,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 664,
"raw": "2",
"start": 663,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 659,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 650,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 681,
"left": {
"computed": false,
"end": 672,
"object": {
"end": 669,
"name": "pos",
"start": 666,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 671,
"raw": "1",
"start": 670,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 666,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "-",
"right": {
"end": 681,
"left": {
"end": 677,
"name": "l",
"start": 676,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 681,
"raw": "2",
"start": 680,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 676,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 666,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 683,
"start": 649,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 688,
"name": "tag",
"start": 685,
"type": "Identifier"
},
"arg": {
"end": 697,
"start": 691,
"type": "TagDeclarator",
"type": "TagDeclarator",
"value": "edge1"
}
}
],
"callee": {
"end": 634,
"name": "line",
"start": 630,
"type": "Identifier"
},
"end": 698,
"start": 630,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 722,
"name": "endAbsolute",
"start": 711,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 740,
"left": {
"computed": false,
"end": 732,
"object": {
"end": 729,
"name": "pos",
"start": 726,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 731,
"raw": "0",
"start": 730,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
"start": 726,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "+",
"right": {
"end": 740,
"left": {
"end": 736,
"name": "w",
"start": 735,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 740,
"raw": "2",
"start": 739,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 735,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 726,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 756,
"left": {
"computed": false,
"end": 748,
"object": {
"end": 745,
"name": "pos",
"start": 742,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 747,
"raw": "1",
"start": 746,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 742,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "+",
"right": {
"end": 756,
"left": {
"end": 752,
"name": "l",
"start": 751,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 756,
"raw": "2",
"start": 755,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 751,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 742,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 757,
"start": 725,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 762,
"name": "tag",
"start": 759,
"type": "Identifier"
},
"arg": {
"end": 771,
"start": 765,
"type": "TagDeclarator",
"type": "TagDeclarator",
"value": "edge2"
}
}
],
"callee": {
"end": 710,
"name": "line",
"start": 706,
"type": "Identifier"
},
"end": 772,
"start": 706,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 796,
"name": "endAbsolute",
"start": 785,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 815,
"left": {
"computed": false,
"end": 806,
"object": {
"end": 803,
"name": "pos",
"start": 800,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 805,
"raw": "0",
"start": 804,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
"start": 800,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "-",
"right": {
"end": 815,
"left": {
"end": 811,
"name": "w",
"start": 810,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 815,
"raw": "2",
"start": 814,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 810,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 800,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 832,
"left": {
"computed": false,
"end": 824,
"object": {
"end": 821,
"name": "pos",
"start": 818,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 823,
"raw": "1",
"start": 822,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 818,
"type": "MemberExpression",
"type": "MemberExpression"
},
"operator": "+",
"right": {
"end": 832,
"left": {
"end": 828,
"name": "l",
"start": 827,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 832,
"raw": "2",
"start": 831,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 827,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 818,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 833,
"start": 799,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 838,
"name": "tag",
"start": 835,
"type": "Identifier"
},
"arg": {
"end": 847,
"start": 841,
"type": "TagDeclarator",
"type": "TagDeclarator",
"value": "edge3"
}
}
],
"callee": {
"end": 784,
"name": "line",
"start": 780,
"type": "Identifier"
},
"end": 848,
"start": 780,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 865,
"name": "tag",
"start": 862,
"type": "Identifier"
},
"arg": {
"end": 874,
"start": 868,
"type": "TagDeclarator",
"type": "TagDeclarator",
"value": "edge4"
}
}
],
"callee": {
"end": 861,
"name": "close",
"start": 856,
"type": "Identifier"
},
"end": 875,
"start": 856,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 875,
"start": 540,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 535,
"type": "VariableDeclarator"
},
"end": 875,
"kind": "const",
"start": 535,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"argument": {
"end": 887,
"name": "rr",
"start": 885,
"type": "Identifier",
"type": "Identifier"
},
"end": 887,
"start": 878,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 889,
"start": 531
},
"end": 889,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 523,
"name": "pos",
"start": 520,
"type": "Identifier"
}
},
{
"type": "Parameter",
"identifier": {
"end": 526,
"name": "w",
"start": 525,
"type": "Identifier"
}
},
{
"type": "Parameter",
"identifier": {
"end": 529,
"name": "l",
"start": 528,
"type": "Identifier"
}
}
],
"start": 519,
"type": "FunctionExpression",
"type": "FunctionExpression"
},
"start": 510,
"type": "VariableDeclarator"
},
"end": 889,
"kind": "fn",
"start": 507,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 961,
"id": {
"end": 955,
"name": "holeRadius",
"start": 945,
"type": "Identifier"
},
"init": {
"end": 961,
"raw": ".25",
"start": 958,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.25,
"suffix": "None"
}
},
"start": 945,
"type": "VariableDeclarator"
},
"end": 961,
"kind": "const",
"start": 945,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 977,
"id": {
"end": 971,
"name": "holeIndex",
"start": 962,
"type": "Identifier"
},
"init": {
"end": 977,
"raw": ".75",
"start": 974,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.75,
"suffix": "None"
}
},
"start": 962,
"type": "VariableDeclarator"
},
"end": 977,
"kind": "const",
"start": 962,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 1085,
"id": {
"end": 1040,
"name": "rs",
"start": 1038,
"type": "Identifier"
},
"init": {
"arguments": [
{
"elements": [
{
"end": 1055,
"raw": "0",
"start": 1054,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 1058,
"raw": "0",
"start": 1057,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 1059,
"start": 1053,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"end": 1071,
"name": "plateWidth",
"start": 1061,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 1084,
"name": "plateLength",
"start": 1073,
"type": "Identifier",
"type": "Identifier"
}
],
"callee": {
"end": 1052,
"name": "rectShape",
"start": 1043,
"type": "Identifier"
},
"end": 1085,
"start": 1043,
"type": "CallExpression",
"type": "CallExpression"
},
"start": 1038,
"type": "VariableDeclarator"
},
"end": 1085,
"kind": "const",
"start": 1038,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 2127,
"id": {
"end": 1090,
"name": "part",
"start": 1086,
"type": "Identifier"
},
"init": {
"body": [
{
"end": 1095,
"name": "rs",
"start": 1093,
"type": "Identifier",
"type": "Identifier"
},
{
"arguments": [
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1127,
"name": "center",
"start": 1121,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1168,
"left": {
"end": 1156,
"left": {
"argument": {
"end": 1152,
"name": "plateWidth",
"start": 1142,
"type": "Identifier",
"type": "Identifier"
},
"end": 1152,
"operator": "-",
"start": 1141,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"end": 1156,
"raw": "2",
"start": 1155,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1141,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"end": 1168,
"name": "holeIndex",
"start": 1159,
"type": "Identifier",
"type": "Identifier"
},
"start": 1141,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 1206,
"left": {
"end": 1194,
"left": {
"end": 1190,
"name": "plateLength",
"start": 1179,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1194,
"raw": "2",
"start": 1193,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1179,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"end": 1206,
"name": "holeIndex",
"start": 1197,
"type": "Identifier",
"type": "Identifier"
},
"start": 1179,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 1215,
"start": 1130,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1230,
"name": "radius",
"start": 1224,
"type": "Identifier"
},
"arg": {
"end": 1243,
"name": "holeRadius",
"start": 1233,
"type": "Identifier",
"type": "Identifier"
}
}
],
"callee": {
"end": 1112,
"name": "circle",
"start": 1106,
"type": "Identifier"
},
"end": 1250,
"start": 1106,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"end": 1253,
"start": 1252,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 1105,
"name": "hole",
"start": 1101,
"type": "Identifier"
},
"end": 1254,
"start": 1101,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1286,
"name": "center",
"start": 1280,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1326,
"left": {
"end": 1314,
"left": {
"end": 1310,
"name": "plateWidth",
"start": 1300,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1314,
"raw": "2",
"start": 1313,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1300,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"end": 1326,
"name": "holeIndex",
"start": 1317,
"type": "Identifier",
"type": "Identifier"
},
"start": 1300,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 1364,
"left": {
"end": 1352,
"left": {
"end": 1348,
"name": "plateLength",
"start": 1337,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1352,
"raw": "2",
"start": 1351,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1337,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"end": 1364,
"name": "holeIndex",
"start": 1355,
"type": "Identifier",
"type": "Identifier"
},
"start": 1337,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 1373,
"start": 1289,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1388,
"name": "radius",
"start": 1382,
"type": "Identifier"
},
"arg": {
"end": 1401,
"name": "holeRadius",
"start": 1391,
"type": "Identifier",
"type": "Identifier"
}
}
],
"callee": {
"end": 1271,
"name": "circle",
"start": 1265,
"type": "Identifier"
},
"end": 1408,
"start": 1265,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"end": 1411,
"start": 1410,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 1264,
"name": "hole",
"start": 1260,
"type": "Identifier"
},
"end": 1412,
"start": 1260,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1444,
"name": "center",
"start": 1438,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1485,
"left": {
"end": 1473,
"left": {
"argument": {
"end": 1469,
"name": "plateWidth",
"start": 1459,
"type": "Identifier",
"type": "Identifier"
},
"end": 1469,
"operator": "-",
"start": 1458,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"end": 1473,
"raw": "2",
"start": 1472,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1458,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"end": 1485,
"name": "holeIndex",
"start": 1476,
"type": "Identifier",
"type": "Identifier"
},
"start": 1458,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 1524,
"left": {
"end": 1512,
"left": {
"argument": {
"end": 1508,
"name": "plateLength",
"start": 1497,
"type": "Identifier",
"type": "Identifier"
},
"end": 1508,
"operator": "-",
"start": 1496,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"end": 1512,
"raw": "2",
"start": 1511,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1496,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"end": 1524,
"name": "holeIndex",
"start": 1515,
"type": "Identifier",
"type": "Identifier"
},
"start": 1496,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 1533,
"start": 1447,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1548,
"name": "radius",
"start": 1542,
"type": "Identifier"
},
"arg": {
"end": 1561,
"name": "holeRadius",
"start": 1551,
"type": "Identifier",
"type": "Identifier"
}
}
],
"callee": {
"end": 1429,
"name": "circle",
"start": 1423,
"type": "Identifier"
},
"end": 1568,
"start": 1423,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"end": 1571,
"start": 1570,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 1422,
"name": "hole",
"start": 1418,
"type": "Identifier"
},
"end": 1572,
"start": 1418,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1604,
"name": "center",
"start": 1598,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1644,
"left": {
"end": 1632,
"left": {
"end": 1628,
"name": "plateWidth",
"start": 1618,
"type": "Identifier",
"type": "Identifier"
},
"operator": "/",
"right": {
"end": 1632,
"raw": "2",
"start": 1631,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1618,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"end": 1644,
"name": "holeIndex",
"start": 1635,
"type": "Identifier",
"type": "Identifier"
},
"start": 1618,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"end": 1683,
"left": {
"end": 1671,
"left": {
"argument": {
"end": 1667,
"name": "plateLength",
"start": 1656,
"type": "Identifier",
"type": "Identifier"
},
"end": 1667,
"operator": "-",
"start": 1655,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"end": 1671,
"raw": "2",
"start": 1670,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 1655,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"end": 1683,
"name": "holeIndex",
"start": 1674,
"type": "Identifier",
"type": "Identifier"
},
"start": 1655,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 1692,
"start": 1607,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1707,
"name": "radius",
"start": 1701,
"type": "Identifier"
},
"arg": {
"end": 1720,
"name": "holeRadius",
"start": 1710,
"type": "Identifier",
"type": "Identifier"
}
}
],
"callee": {
"end": 1589,
"name": "circle",
"start": 1583,
"type": "Identifier"
},
"end": 1727,
"start": 1583,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"end": 1730,
"start": 1729,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 1582,
"name": "hole",
"start": 1578,
"type": "Identifier"
},
"end": 1731,
"start": 1578,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1763,
"name": "center",
"start": 1757,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 1768,
"raw": "0",
"start": 1767,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"end": 1771,
"raw": "0",
"start": 1770,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
],
"end": 1772,
"start": 1766,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1787,
"name": "radius",
"start": 1781,
"type": "Identifier"
},
"arg": {
"end": 1808,
"name": "centerHoleDiameter",
"start": 1790,
"type": "Identifier",
"type": "Identifier"
}
}
],
"callee": {
"end": 1748,
"name": "circle",
"start": 1742,
"type": "Identifier"
},
"end": 1815,
"start": 1742,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"end": 1818,
"start": 1817,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 1741,
"name": "hole",
"start": 1737,
"type": "Identifier"
},
"end": 1819,
"start": 1737,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1839,
"name": "length",
"start": 1833,
"type": "Identifier"
},
"arg": {
"end": 1856,
"name": "plateThickness",
"start": 1842,
"type": "Identifier",
"type": "Identifier"
}
}
],
"callee": {
"end": 1832,
"name": "extrude",
"start": 1825,
"type": "Identifier"
},
"end": 1857,
"start": 1825,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 1884,
"name": "radius",
"start": 1878,
"type": "Identifier"
},
"arg": {
"end": 1899,
"name": "filletRadius",
"start": 1887,
"type": "Identifier",
"type": "Identifier"
}
},
{
"type": "LabeledArg",
"label": {
"end": 1912,
"name": "tags",
"start": 1908,
"type": "Identifier"
},
"arg": {
"elements": [
{
"arguments": [
{
"computed": false,
"end": 1963,
"object": {
"computed": false,
"end": 1957,
"object": {
"end": 1952,
"name": "rs",
"start": 1950,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 1957,
"name": "tags",
"start": 1953,
"type": "Identifier",
"type": "Identifier"
},
"start": 1950,
"type": "MemberExpression",
"type": "MemberExpression"
},
"property": {
"end": 1963,
"name": "edge1",
"start": 1958,
"type": "Identifier",
"type": "Identifier"
},
"start": 1950,
"type": "MemberExpression",
"type": "MemberExpression"
}
],
"callee": {
"end": 1949,
"name": "getPreviousAdjacentEdge",
"start": 1926,
"type": "Identifier"
},
"end": 1964,
"start": 1926,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"computed": false,
"end": 2012,
"object": {
"computed": false,
"end": 2006,
"object": {
"end": 2001,
"name": "rs",
"start": 1999,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 2006,
"name": "tags",
"start": 2002,
"type": "Identifier",
"type": "Identifier"
},
"start": 1999,
"type": "MemberExpression",
"type": "MemberExpression"
},
"property": {
"end": 2012,
"name": "edge2",
"start": 2007,
"type": "Identifier",
"type": "Identifier"
},
"start": 1999,
"type": "MemberExpression",
"type": "MemberExpression"
}
],
"callee": {
"end": 1998,
"name": "getPreviousAdjacentEdge",
"start": 1975,
"type": "Identifier"
},
"end": 2013,
"start": 1975,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"computed": false,
"end": 2061,
"object": {
"computed": false,
"end": 2055,
"object": {
"end": 2050,
"name": "rs",
"start": 2048,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 2055,
"name": "tags",
"start": 2051,
"type": "Identifier",
"type": "Identifier"
},
"start": 2048,
"type": "MemberExpression",
"type": "MemberExpression"
},
"property": {
"end": 2061,
"name": "edge3",
"start": 2056,
"type": "Identifier",
"type": "Identifier"
},
"start": 2048,
"type": "MemberExpression",
"type": "MemberExpression"
}
],
"callee": {
"end": 2047,
"name": "getPreviousAdjacentEdge",
"start": 2024,
"type": "Identifier"
},
"end": 2062,
"start": 2024,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"computed": false,
"end": 2110,
"object": {
"computed": false,
"end": 2104,
"object": {
"end": 2099,
"name": "rs",
"start": 2097,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 2104,
"name": "tags",
"start": 2100,
"type": "Identifier",
"type": "Identifier"
},
"start": 2097,
"type": "MemberExpression",
"type": "MemberExpression"
},
"property": {
"end": 2110,
"name": "edge4",
"start": 2105,
"type": "Identifier",
"type": "Identifier"
},
"start": 2097,
"type": "MemberExpression",
"type": "MemberExpression"
}
],
"callee": {
"end": 2096,
"name": "getPreviousAdjacentEdge",
"start": 2073,
"type": "Identifier"
},
"end": 2111,
"start": 2073,
"type": "CallExpression",
"type": "CallExpression"
}
],
"end": 2120,
"start": 1915,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 1869,
"name": "fillet",
"start": 1863,
"type": "Identifier"
},
"end": 2127,
"start": 1863,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 2127,
"start": 1093,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 1086,
"type": "VariableDeclarator"
},
"end": 2127,
"kind": "const",
"start": 1086,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"end": 2128,
"innerAttrs": [
{
"end": 240,
"name": {
"end": 216,
"name": "settings",
"start": 208,
"type": "Identifier"
},
"properties": [
{
"end": 239,
"key": {
"end": 234,
"name": "defaultLengthUnit",
"start": 217,
"type": "Identifier"
},
"start": 217,
"type": "ObjectProperty",
"value": {
"end": 239,
"name": "in",
"start": 237,
"type": "Identifier",
"type": "Identifier"
}
}
],
"start": 207,
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {
"4": [
{
"end": 506,
"start": 355,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Create a function that defines the body width and length of the mounting plate. Tag the corners so they can be passed through the fillet function.",
"style": "line"
}
}
],
"5": [
{
"end": 944,
"start": 889,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Define the hole radius and x, y location constants",
"style": "line"
}
}
],
"7": [
{
"end": 1037,
"start": 977,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "Create the mounting plate extrusion, holes, and fillets",
"style": "line"
}
}
]
},
"startNodes": [
{
"end": 17,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "Mounting Plate",
"style": "line"
}
},
{
"end": 192,
"start": 18,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "A flat piece of material, often metal or plastic, that serves as a support or base for attaching, securing, or mounting various types of equipment, devices, or components.",
"style": "line"
}
},
{
"end": 194,
"start": 192,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
},
{
"end": 206,
"start": 194,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "Set Units",
"style": "line"
}
},
{
"end": 242,
"start": 240,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
},
{
"end": 261,
"start": 242,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "Define constants",
"style": "line"
}
}
]
},
"start": 0
}
}