Improve snapshot testing (#5856)

* Improve snapshot testing

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Nick Cameron
2025-03-20 11:06:27 +13:00
committed by GitHub
parent 4b6166dc4f
commit a7e09a89ef
551 changed files with 115788 additions and 275855 deletions

File diff suppressed because one or more lines are too long

View File

@ -493,7 +493,7 @@ DATA;
#477 = CARTESIAN_POINT('NONE', (0.17795201496890334, 0.08584714229719675, -0.0020772165411061887)); #477 = CARTESIAN_POINT('NONE', (0.17795201496890334, 0.08584714229719675, -0.0020772165411061887));
#478 = CARTESIAN_POINT('NONE', (0.1778867385149994, 0.08582338363052132, -0.001955831074479715)); #478 = CARTESIAN_POINT('NONE', (0.1778867385149994, 0.08582338363052132, -0.001955831074479715));
#479 = CARTESIAN_POINT('NONE', (0.17785399900826404, 0.08581146743438747, -0.0018949500053573982)); #479 = CARTESIAN_POINT('NONE', (0.17785399900826404, 0.08581146743438747, -0.0018949500053573982));
#480 = CARTESIAN_POINT('NONE', (0.177795228689155, 0.08579007680516954, -0.0017710544700858233)); #480 = CARTESIAN_POINT('NONE', (0.177795228689155, 0.08579007680516954, -0.0017710544700858236));
#481 = CARTESIAN_POINT('NONE', (0.17776575234442069, 0.08577934830189664, -0.0017089144721400538)); #481 = CARTESIAN_POINT('NONE', (0.17776575234442069, 0.08577934830189664, -0.0017089144721400538));
#482 = CARTESIAN_POINT('NONE', (0.17771356944994834, 0.08576035529719464, -0.0015830812806709412)); #482 = CARTESIAN_POINT('NONE', (0.17771356944994834, 0.08576035529719464, -0.0015830812806709412));
#483 = CARTESIAN_POINT('NONE', (0.17768739703826125, 0.0857508293262177, -0.0015199694482529182)); #483 = CARTESIAN_POINT('NONE', (0.17768739703826125, 0.0857508293262177, -0.0015199694482529182));
@ -501,22 +501,22 @@ DATA;
#485 = CARTESIAN_POINT('NONE', (0.17761897023322498, 0.08572592402644587, -0.001328967798546515)); #485 = CARTESIAN_POINT('NONE', (0.17761897023322498, 0.08572592402644587, -0.001328967798546515));
#486 = CARTESIAN_POINT('NONE', (0.1775799821690043, 0.08571173354325107, -0.0012009514248958885)); #486 = CARTESIAN_POINT('NONE', (0.1775799821690043, 0.08571173354325107, -0.0012009514248958885));
#487 = CARTESIAN_POINT('NONE', (0.17756042764490243, 0.08570461628438747, -0.001136744614067409)); #487 = CARTESIAN_POINT('NONE', (0.17756042764490243, 0.08570461628438747, -0.001136744614067409));
#488 = CARTESIAN_POINT('NONE', (0.17752794179056877, 0.08569279241010172, -0.001008452303748607)); #488 = CARTESIAN_POINT('NONE', (0.17752794179056877, 0.08569279241010172, -0.0010084523037486074));
#489 = CARTESIAN_POINT('NONE', (0.17751164845992426, 0.08568686212760836, -0.0009441070964560733)); #489 = CARTESIAN_POINT('NONE', (0.17751164845992426, 0.08568686212760836, -0.0009441070964560733));
#490 = CARTESIAN_POINT('NONE', (0.17748553743296888, 0.08567735849882824, -0.0008160519293165438)); #490 = CARTESIAN_POINT('NONE', (0.17748553743296888, 0.08567735849882824, -0.0008160519293165438));
#491 = CARTESIAN_POINT('NONE', (0.1774724414068868, 0.0856725919390682, -0.0007518256615535176)); #491 = CARTESIAN_POINT('NONE', (0.1774724414068868, 0.0856725919390682, -0.0007518256615535176));
#492 = CARTESIAN_POINT('NONE', (0.17745253555268684, 0.08566534680661167, -0.0006244912002219513)); #492 = CARTESIAN_POINT('NONE', (0.17745253555268684, 0.08566534680661167, -0.0006244912002219513));
#493 = CARTESIAN_POINT('NONE', (0.1774425517406279, 0.0856617129991869, -0.0005606264035751191)); #493 = CARTESIAN_POINT('NONE', (0.1774425517406279, 0.0856617129991869, -0.0005606264035751191));
#494 = CARTESIAN_POINT('NONE', (0.1774286442148312, 0.08565665107792858, -0.0004344626339110227)); #494 = CARTESIAN_POINT('NONE', (0.1774286442148312, 0.08565665107792858, -0.00043446263391102273));
#495 = CARTESIAN_POINT('NONE', (0.17742166887368957, 0.08565411226346764, -0.00037118499948639576)); #495 = CARTESIAN_POINT('NONE', (0.17742166887368957, 0.08565411226346764, -0.00037118499948639576));
#496 = CARTESIAN_POINT('NONE', (0.1774135209818589, 0.08565114667580877, -0.0002466052443253171)); #496 = CARTESIAN_POINT('NONE', (0.1774135209818589, 0.08565114667580877, -0.00024660524432531703));
#497 = CARTESIAN_POINT('NONE', (0.17740943439406934, 0.08564965928071719, -0.0001841220748323609)); #497 = CARTESIAN_POINT('NONE', (0.17740943439406934, 0.08564965928071719, -0.0001841220748323609));
#498 = CARTESIAN_POINT('NONE', (0.1774067810255368, 0.08564869353434526, -0.00006150086036782758)); #498 = CARTESIAN_POINT('NONE', (0.1774067810255368, 0.08564869353434526, -0.00006150086036782763));
#499 = CARTESIAN_POINT('NONE', (0.17740545022443252, 0.085648209162754, 0.0000000000000000034978213206350045)); #499 = CARTESIAN_POINT('NONE', (0.17740545022443252, 0.085648209162754, 0.0000000000000000034978213206350045));
#500 = CARTESIAN_POINT('NONE', (0.177408103592965, 0.08564917490912594, 0.00012262121446453774)); #500 = CARTESIAN_POINT('NONE', (0.177408103592965, 0.08564917490912594, 0.00012262121446453774));
#501 = CARTESIAN_POINT('NONE', (0.17740912580390183, 0.08564954696317403, 0.00016986107013356122)); #501 = CARTESIAN_POINT('NONE', (0.17740912580390183, 0.08564954696317403, 0.00016986107013356122));
#502 = CARTESIAN_POINT('NONE', (0.17740943439406934, 0.08564965928071719, 0.00018412207483236787)); #502 = CARTESIAN_POINT('NONE', (0.17740943439406934, 0.08564965928071719, 0.00018412207483236787));
#503 = CARTESIAN_POINT('NONE', (0.17741758228590004, 0.08565262486837608, 0.00030870182999344597)); #503 = CARTESIAN_POINT('NONE', (0.17741758228590004, 0.08565262486837608, 0.000308701829993446));
#504 = CARTESIAN_POINT('NONE', (0.17742166887368963, 0.08565411226346765, 0.0003711849994864027)); #504 = CARTESIAN_POINT('NONE', (0.17742166887368963, 0.08565411226346765, 0.0003711849994864027));
#505 = CARTESIAN_POINT('NONE', (0.17743557639948632, 0.08565917418472598, 0.0004973487691505)); #505 = CARTESIAN_POINT('NONE', (0.17743557639948632, 0.08565917418472598, 0.0004973487691505));
#506 = CARTESIAN_POINT('NONE', (0.1774425517406279, 0.0856617129991869, 0.0005606264035751264)); #506 = CARTESIAN_POINT('NONE', (0.1774425517406279, 0.0856617129991869, 0.0005606264035751264));
@ -526,7 +526,7 @@ DATA;
#510 = CARTESIAN_POINT('NONE', (0.17751164845992423, 0.08568686212760836, 0.0009441070964560802)); #510 = CARTESIAN_POINT('NONE', (0.17751164845992423, 0.08568686212760836, 0.0009441070964560802));
#511 = CARTESIAN_POINT('NONE', (0.17754413431425792, 0.0856986860018941, 0.001072399406774878)); #511 = CARTESIAN_POINT('NONE', (0.17754413431425792, 0.0856986860018941, 0.001072399406774878));
#512 = CARTESIAN_POINT('NONE', (0.17756042764490243, 0.08570461628438747, 0.001136744614067416)); #512 = CARTESIAN_POINT('NONE', (0.17756042764490243, 0.08570461628438747, 0.001136744614067416));
#513 = CARTESIAN_POINT('NONE', (0.1775994157091231, 0.08571880676758226, 0.00126476098771804)); #513 = CARTESIAN_POINT('NONE', (0.1775994157091231, 0.08571880676758226, 0.0012647609877180397));
#514 = CARTESIAN_POINT('NONE', (0.17761897023322495, 0.08572592402644587, 0.001328967798546522)); #514 = CARTESIAN_POINT('NONE', (0.17761897023322495, 0.08572592402644587, 0.001328967798546522));
#515 = CARTESIAN_POINT('NONE', (0.1776645409663547, 0.08574251040321469, 0.0014561706571556946)); #515 = CARTESIAN_POINT('NONE', (0.1776645409663547, 0.08574251040321469, 0.0014561706571556946));
#516 = CARTESIAN_POINT('NONE', (0.17768739703826128, 0.08575082932621772, 0.0015199694482529254)); #516 = CARTESIAN_POINT('NONE', (0.17768739703826128, 0.08575082932621772, 0.0015199694482529254));
@ -541,7 +541,7 @@ DATA;
#525 = CARTESIAN_POINT('NONE', (0.1781128423383614, 0.08590567862438238, 0.0023333333333333322)); #525 = CARTESIAN_POINT('NONE', (0.1781128423383614, 0.08590567862438238, 0.0023333333333333322));
#526 = CARTESIAN_POINT('NONE', (0.17813740492873031, 0.085914618668799, 0.0023695300981384096)); #526 = CARTESIAN_POINT('NONE', (0.17813740492873031, 0.085914618668799, 0.0023695300981384096));
#527 = CARTESIAN_POINT('NONE', (0.1781764324402324, 0.08592882350961822, 0.002427043154927221)); #527 = CARTESIAN_POINT('NONE', (0.1781764324402324, 0.08592882350961822, 0.002427043154927221));
#528 = CARTESIAN_POINT('NONE', (0.17826016236587194, 0.08595929868519923, 0.0025375400111489355)); #528 = CARTESIAN_POINT('NONE', (0.17826016236587194, 0.08595929868519923, 0.002537540011148935));
#529 = CARTESIAN_POINT('NONE', (0.1783021572399878, 0.08597458355679569, 0.0025929598808285105)); #529 = CARTESIAN_POINT('NONE', (0.1783021572399878, 0.08597458355679569, 0.0025929598808285105));
#530 = CARTESIAN_POINT('NONE', (0.17839149551745315, 0.08600710000382542, 0.002698774175843207)); #530 = CARTESIAN_POINT('NONE', (0.17839149551745315, 0.08600710000382542, 0.002698774175843207));
#531 = CARTESIAN_POINT('NONE', (0.17843630326912885, 0.08602340867828413, 0.002751845499684166)); #531 = CARTESIAN_POINT('NONE', (0.17843630326912885, 0.08602340867828413, 0.002751845499684166));
@ -571,14 +571,14 @@ DATA;
#555 = CARTESIAN_POINT('NONE', (0.18045773597500814, 0.08675914940857034, 0.0039287094795402685)); #555 = CARTESIAN_POINT('NONE', (0.18045773597500814, 0.08675914940857034, 0.0039287094795402685));
#556 = CARTESIAN_POINT('NONE', (0.18057739124020727, 0.08680270032765071, 0.003949892845083641)); #556 = CARTESIAN_POINT('NONE', (0.18057739124020727, 0.08680270032765071, 0.003949892845083641));
#557 = CARTESIAN_POINT('NONE', (0.18063740452411917, 0.08682454335868699, 0.003960517394939006)); #557 = CARTESIAN_POINT('NONE', (0.18063740452411917, 0.08682454335868699, 0.003960517394939006));
#558 = CARTESIAN_POINT('NONE', (0.18067644581277573, 0.08683875321397622, 0.003965391194281957)); #558 = CARTESIAN_POINT('NONE', (0.18067644581277573, 0.08683875321397622, 0.003965391194281956));
#559 = CARTESIAN_POINT('NONE', (0.18075595969889122, 0.08686769387792627, 0.003975317473337812)); #559 = CARTESIAN_POINT('NONE', (0.18075595969889122, 0.08686769387792627, 0.003975317473337812));
#560 = CARTESIAN_POINT('NONE', (0.18081542123074262, 0.086889336087801, 0.003982740475621818)); #560 = CARTESIAN_POINT('NONE', (0.18081542123074262, 0.086889336087801, 0.003982740475621818));
#561 = CARTESIAN_POINT('NONE', (0.18093248791863173, 0.08693194484256649, 0.003991411280166247)); #561 = CARTESIAN_POINT('NONE', (0.18093248791863173, 0.08693194484256649, 0.003991411280166247));
#562 = CARTESIAN_POINT('NONE', (0.18099120289757753, 0.08695331532962879, 0.003995760135638706)); #562 = CARTESIAN_POINT('NONE', (0.18099120289757753, 0.08695331532962879, 0.003995760135638706));
#563 = CARTESIAN_POINT('NONE', (0.18110642915904954, 0.0869952542245111, 0.003998583791181479)); #563 = CARTESIAN_POINT('NONE', (0.18110642915904954, 0.0869952542245111, 0.003998583791181479));
#564 = CARTESIAN_POINT('NONE', (0.1811642210692703, 0.08701628874230968, 0.0040000000000000036)); #564 = CARTESIAN_POINT('NONE', (0.1811642210692703, 0.08701628874230968, 0.0040000000000000036));
#565 = B_SPLINE_CURVE_WITH_KNOTS('NONE', 2, (#434, #435, #436, #437, #438, #439, #440, #441, #442, #443, #444, #445, #446, #447, #448, #449, #450, #451, #452, #453, #454, #455, #456, #457, #458, #459, #460, #461, #462, #463, #464, #465, #466, #467, #468, #469, #470, #471, #472, #473, #474, #475, #476, #477, #478, #479, #480, #481, #482, #483, #484, #485, #486, #487, #488, #489, #490, #491, #492, #493, #494, #495, #496, #497, #498, #499, #500, #501, #502, #503, #504, #505, #506, #507, #508, #509, #510, #511, #512, #513, #514, #515, #516, #517, #518, #519, #520, #521, #522, #523, #524, #525, #526, #527, #528, #529, #530, #531, #532, #533, #534, #535, #536, #537, #538, #539, #540, #541, #542, #543, #544, #545, #546, #547, #548, #549, #550, #551, #552, #553, #554, #555, #556, #557, #558, #559, #560, #561, #562, #563, #564), .UNSPECIFIED., .F., .F., (3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3), (-1, -0.9922480620155039, -0.9844961240310077, -0.9767441860465116, -0.9689922480620154, -0.9612403100775194, -0.9534883720930233, -0.9457364341085271, -0.937984496124031, -0.9302325581395349, -0.9224806201550387, -0.9147286821705426, -0.9069767441860466, -0.8992248062015504, -0.8914728682170543, -0.8837209302325582, -0.875968992248062, -0.8682170542635659, -0.8604651162790697, -0.8527131782945736, -0.8449612403100775, -0.8372093023255813, -0.8294573643410853, -0.8217054263565892, -0.813953488372093, -0.8062015503875969, -0.7984496124031008, -0.7906976744186047, -0.7829457364341086, -0.7751937984496124, -0.7674418604651163, -0.7596899224806202, -0.751937984496124, -0.7441860465116279, -0.7364341085271318, -0.7286821705426356, -0.7209302325581395, -0.7131782945736433, -0.7054263565891473, -0.6976744186046512, -0.689922480620155, -0.6821705426356589, -0.6744186046511628, -0.6666666666666667, -0.6589147286821706, -0.6511627906976745, -0.6434108527131783, -0.6356589147286822, -0.627906976744186, -0.6201550387596899, -0.6124031007751938, -0.6046511627906976, -0.5968992248062015, -0.5891472868217054, -0.5813953488372093, -0.5736434108527132, -0.5658914728682171, -0.5581395348837209, -0.5503875968992248, -0.5426356589147288, -0.5348837209302326, -0.5271317829457365, -0.5193798449612403, -0.5116279069767442, -0.5038759689922481, -0.49612403100775193, -0.4883720930232558, -0.48062015503875966, -0.4728682170542636, -0.46511627906976744, -0.4573643410852713, -0.4496124031007752, -0.4418604651162791, -0.43410852713178294, -0.4263565891472868, -0.41860465116279066, -0.4108527131782946, -0.40310077519379844, -0.3953488372093023, -0.3875968992248062, -0.3798449612403101, -0.37209302325581395, -0.3643410852713178, -0.3565891472868217, -0.3488372093023256, -0.34108527131782945, -0.3333333333333333, -0.32558139534883723, -0.3178294573643411, -0.31007751937984496, -0.3023255813953488, -0.2945736434108527, -0.2868217054263566, -0.27906976744186046, -0.2713178294573643, -0.26356589147286824, -0.2558139534883721, -0.24806201550387597, -0.24031007751937983, -0.23255813953488372, -0.2248062015503876, -0.21705426356589147, -0.20930232558139533, -0.20155038759689922, -0.1937984496124031, -0.18604651162790697, -0.17829457364341084, -0.17054263565891473, -0.16279069767441862, -0.15503875968992248, -0.14728682170542634, -0.13953488372093023, -0.13178294573643412, -0.12403100775193798, -0.11627906976744186, -0.10852713178294573, -0.10077519379844961, -0.09302325581395349, -0.08527131782945736, -0.07751937984496124, -0.06976744186046512, -0.06201550387596899, -0.05426356589147287, -0.046511627906976744, -0.03875968992248062, -0.031007751937984496, -0.023255813953488372, -0.015503875968992248, -0.007751937984496124, -0), .UNSPECIFIED.); #565 = B_SPLINE_CURVE_WITH_KNOTS('NONE', 2, (#434, #435, #436, #437, #438, #439, #440, #441, #442, #443, #444, #445, #446, #447, #448, #449, #450, #451, #452, #453, #454, #455, #456, #457, #458, #459, #460, #461, #462, #463, #464, #465, #466, #467, #468, #469, #470, #471, #472, #473, #474, #475, #476, #477, #478, #479, #480, #481, #482, #483, #484, #485, #486, #487, #488, #489, #490, #491, #492, #493, #494, #495, #496, #497, #498, #499, #500, #501, #502, #503, #504, #505, #506, #507, #508, #509, #510, #511, #512, #513, #514, #515, #516, #517, #518, #519, #520, #521, #522, #523, #524, #525, #526, #527, #528, #529, #530, #531, #532, #533, #534, #535, #536, #537, #538, #539, #540, #541, #542, #543, #544, #545, #546, #547, #548, #549, #550, #551, #552, #553, #554, #555, #556, #557, #558, #559, #560, #561, #562, #563, #564), .UNSPECIFIED., .F., .F., (3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3), (0, 0.007751937984496124, 0.015503875968992248, 0.023255813953488372, 0.031007751937984496, 0.03875968992248062, 0.046511627906976744, 0.05426356589147287, 0.06201550387596899, 0.06976744186046512, 0.07751937984496124, 0.08527131782945736, 0.09302325581395349, 0.10077519379844961, 0.10852713178294573, 0.11627906976744186, 0.12403100775193798, 0.13178294573643412, 0.13953488372093023, 0.14728682170542634, 0.15503875968992248, 0.16279069767441862, 0.17054263565891473, 0.17829457364341084, 0.18604651162790697, 0.1937984496124031, 0.20155038759689922, 0.20930232558139533, 0.21705426356589147, 0.2248062015503876, 0.23255813953488372, 0.24031007751937983, 0.24806201550387597, 0.2558139534883721, 0.26356589147286824, 0.2713178294573643, 0.27906976744186046, 0.2868217054263566, 0.2945736434108527, 0.3023255813953488, 0.31007751937984496, 0.3178294573643411, 0.32558139534883723, 0.3333333333333333, 0.34108527131782945, 0.3488372093023256, 0.3565891472868217, 0.3643410852713178, 0.37209302325581395, 0.3798449612403101, 0.3875968992248062, 0.3953488372093023, 0.40310077519379844, 0.4108527131782946, 0.41860465116279066, 0.4263565891472868, 0.43410852713178294, 0.4418604651162791, 0.4496124031007752, 0.4573643410852713, 0.46511627906976744, 0.4728682170542636, 0.48062015503875966, 0.4883720930232558, 0.49612403100775193, 0.5038759689922481, 0.5116279069767442, 0.5193798449612403, 0.5271317829457365, 0.5348837209302326, 0.5426356589147288, 0.5503875968992248, 0.5581395348837209, 0.5658914728682171, 0.5736434108527132, 0.5813953488372093, 0.5891472868217054, 0.5968992248062015, 0.6046511627906976, 0.6124031007751938, 0.6201550387596899, 0.627906976744186, 0.6356589147286822, 0.6434108527131783, 0.6511627906976745, 0.6589147286821706, 0.6666666666666667, 0.6744186046511628, 0.6821705426356589, 0.689922480620155, 0.6976744186046512, 0.7054263565891473, 0.7131782945736433, 0.7209302325581395, 0.7286821705426356, 0.7364341085271318, 0.7441860465116279, 0.751937984496124, 0.7596899224806202, 0.7674418604651163, 0.7751937984496124, 0.7829457364341086, 0.7906976744186047, 0.7984496124031008, 0.8062015503875969, 0.813953488372093, 0.8217054263565892, 0.8294573643410853, 0.8372093023255813, 0.8449612403100775, 0.8527131782945736, 0.8604651162790697, 0.8682170542635659, 0.875968992248062, 0.8837209302325582, 0.8914728682170543, 0.8992248062015504, 0.9069767441860466, 0.9147286821705426, 0.9224806201550387, 0.9302325581395349, 0.937984496124031, 0.9457364341085271, 0.9534883720930233, 0.9612403100775194, 0.9689922480620154, 0.9767441860465116, 0.9844961240310077, 0.9922480620155039, 1), .UNSPECIFIED.);
#566 = DIRECTION('NONE', (-0.000000000000014210854715201953, -0.0000000000000035527136788004883, -1)); #566 = DIRECTION('NONE', (-0.000000000000014210854715201953, -0.0000000000000035527136788004883, -1));
#567 = DIRECTION('NONE', (-0.342019894888923, 0.9396927112094519, 0.0000000000000015219358869921909)); #567 = DIRECTION('NONE', (-0.342019894888923, 0.9396927112094519, 0.0000000000000015219358869921909));
#568 = CARTESIAN_POINT('NONE', (0.17774402212038112, 0.0964132158544042, 0.00000000000000002009718347115226)); #568 = CARTESIAN_POINT('NONE', (0.17774402212038112, 0.0964132158544042, 0.00000000000000002009718347115226));

View File

@ -1,4 +1,7 @@
use std::path::{Path, PathBuf}; use std::{
panic::{catch_unwind, AssertUnwindSafe},
path::{Path, PathBuf},
};
use insta::rounded_redaction; use insta::rounded_redaction;
@ -6,7 +9,6 @@ use crate::{
errors::KclError, errors::KclError,
exec::ArtifactCommand, exec::ArtifactCommand,
execution::{ArtifactGraph, Operation}, execution::{ArtifactGraph, Operation},
parsing::ast::types::{Node, Program},
ModuleId, ModuleId,
}; };
@ -40,17 +42,6 @@ impl Test {
} }
} }
/// Deserialize the data from a snapshot.
fn get<T: serde::de::DeserializeOwned>(snapshot: &str) -> T {
let mut parts = snapshot.split("---");
let _empty = parts.next().unwrap();
let _header = parts.next().unwrap();
let snapshot_data = parts.next().unwrap();
serde_json::from_str(snapshot_data)
.and_then(serde_json::from_value)
.unwrap()
}
fn assert_snapshot<F, R>(test: &Test, operation: &str, f: F) fn assert_snapshot<F, R>(test: &Test, operation: &str, f: F)
where where
F: FnOnce() -> R, F: FnOnce() -> R,
@ -91,7 +82,11 @@ fn parse_test(test: &Test) {
// Parse the tokens into an AST. // Parse the tokens into an AST.
let parse_res = Result::<_, KclError>::Ok(crate::parsing::parse_tokens(tokens).unwrap()); let parse_res = Result::<_, KclError>::Ok(crate::parsing::parse_tokens(tokens).unwrap());
assert_snapshot(test, "Result of parsing", || { assert_snapshot(test, "Result of parsing", || {
insta::assert_json_snapshot!("ast", parse_res); insta::assert_json_snapshot!("ast", parse_res, {
".**.start" => 0,
".**.end" => 0,
".**.comment_start" => 0,
});
}); });
} }
@ -100,30 +95,45 @@ async fn unparse(test_name: &str) {
} }
async fn unparse_test(test: &Test) { async fn unparse_test(test: &Test) {
let input = read("ast.snap", &test.output_dir); // Parse into an AST
let ast_res: Result<Program, KclError> = get(&input); let input = read(&test.entry_point, &test.input_dir);
let Ok(ast) = ast_res else { let tokens = crate::parsing::token::lex(&input, ModuleId::default()).unwrap();
return; let ast = crate::parsing::parse_tokens(tokens).unwrap();
};
// Check recasting the AST produces the original string. // Check recasting.
let actual = ast.recast(&Default::default(), 0); let actual = ast.recast(&Default::default(), 0);
let entry_point = test.input_dir.join(&test.entry_point); let input_result = catch_unwind(AssertUnwindSafe(|| {
expectorate::assert_contents(&entry_point, &actual); assert_snapshot(test, "Result of unparsing", || {
insta::assert_snapshot!("unparsed", actual);
})
}));
// Check all the rest of the files in the directory. // Check all the rest of the files in the directory.
let entry_point = test.input_dir.join(&test.entry_point);
let kcl_files = crate::unparser::walk_dir(&test.input_dir).await.unwrap(); let kcl_files = crate::unparser::walk_dir(&test.input_dir).await.unwrap();
// Filter out the entry point file. // Filter out the entry point file.
let kcl_files = kcl_files.into_iter().filter(|f| f != &entry_point); let kcl_files = kcl_files.into_iter().filter(|f| f != &entry_point);
let futures = kcl_files let futures = kcl_files
.into_iter() .into_iter()
.map(|file| { .map(|file| {
let snap_path = Path::new("..").join(&test.output_dir);
tokio::spawn(async move { tokio::spawn(async move {
let contents = tokio::fs::read_to_string(&file).await?; let contents = tokio::fs::read_to_string(&file).await.unwrap();
let program = crate::Program::parse_no_errs(&contents)?; let program = crate::Program::parse_no_errs(&contents).unwrap();
let recast = program.recast_with_options(&Default::default()); let recast = program.recast_with_options(&Default::default());
expectorate::assert_contents(file, &recast);
Ok::<(), anyhow::Error>(()) catch_unwind(AssertUnwindSafe(|| {
let mut settings = insta::Settings::clone_current();
settings.set_omit_expression(true);
settings.set_snapshot_path(snap_path);
settings.set_prepend_module_to_snapshot(false);
settings.set_snapshot_suffix(file.file_name().unwrap().to_str().unwrap());
settings.set_description(format!("Result of unparsing {}", file.display()));
// Run `f` (the closure that was passed in) with these settings.
settings.bind(|| {
insta::assert_snapshot!("unparsed", recast);
})
}))
}) })
}) })
.collect::<Vec<_>>(); .collect::<Vec<_>>();
@ -132,6 +142,7 @@ async fn unparse_test(test: &Test) {
for future in futures { for future in futures {
future.await.unwrap().unwrap(); future.await.unwrap().unwrap();
} }
input_result.unwrap();
} }
async fn execute(test_name: &str, render_to_png: bool) { async fn execute(test_name: &str, render_to_png: bool) {
@ -139,16 +150,8 @@ async fn execute(test_name: &str, render_to_png: bool) {
} }
async fn execute_test(test: &Test, render_to_png: bool, export_step: bool) { async fn execute_test(test: &Test, render_to_png: bool, export_step: bool) {
// Read the AST from disk. let input = read(&test.entry_point, &test.input_dir);
let input = read("ast.snap", &test.output_dir); let ast = crate::Program::parse_no_errs(&input).unwrap();
let ast_res: Result<Node<Program>, KclError> = get(&input);
let Ok(ast) = ast_res else {
return;
};
let ast = crate::Program {
ast,
original_file_contents: read(&test.entry_point, &test.input_dir),
};
// Run the program. // Run the program.
let exec_res = crate::test_server::execute_and_snapshot_ast( let exec_res = crate::test_server::execute_and_snapshot_ast(
@ -174,12 +177,8 @@ async fn execute_test(test: &Test, render_to_png: bool, export_step: bool) {
std::fs::write(test.output_dir.join(EXPORTED_STEP_NAME), step).unwrap(); std::fs::write(test.output_dir.join(EXPORTED_STEP_NAME), step).unwrap();
} }
let outcome = exec_state.to_wasm_outcome(env_ref).await; let outcome = exec_state.to_wasm_outcome(env_ref).await;
assert_common_snapshots(
test, let mem_result = catch_unwind(AssertUnwindSafe(|| {
outcome.operations,
outcome.artifact_commands,
outcome.artifact_graph,
);
assert_snapshot(test, "Variables in memory after executing", || { assert_snapshot(test, "Variables in memory after executing", || {
insta::assert_json_snapshot!("program_memory", outcome.variables, { insta::assert_json_snapshot!("program_memory", outcome.variables, {
".**.value" => rounded_redaction(4), ".**.value" => rounded_redaction(4),
@ -190,8 +189,18 @@ async fn execute_test(test: &Test, render_to_png: bool, export_step: bool) {
".**[].x[]" => rounded_redaction(4), ".**[].x[]" => rounded_redaction(4),
".**[].y[]" => rounded_redaction(4), ".**[].y[]" => rounded_redaction(4),
".**[].z[]" => rounded_redaction(4), ".**[].z[]" => rounded_redaction(4),
".**.sourceRange" => Vec::new(),
}) })
}); })
}));
assert_common_snapshots(
test,
outcome.operations,
outcome.artifact_commands,
outcome.artifact_graph,
);
mem_result.unwrap();
} }
Err(e) => { Err(e) => {
let ok_path = test.output_dir.join("program_memory.snap"); let ok_path = test.output_dir.join("program_memory.snap");
@ -213,11 +222,14 @@ async fn execute_test(test: &Test, render_to_png: bool, export_step: bool) {
} }
let report = format!("{:?}", report); let report = format!("{:?}", report);
let err_result = catch_unwind(AssertUnwindSafe(|| {
assert_snapshot(test, "Error from executing", || { assert_snapshot(test, "Error from executing", || {
insta::assert_snapshot!("execution_error", report); insta::assert_snapshot!("execution_error", report);
}); })
}));
assert_common_snapshots(test, error.operations, error.artifact_commands, error.artifact_graph); assert_common_snapshots(test, error.operations, error.artifact_commands, error.artifact_graph);
err_result.unwrap();
} }
e => { e => {
// These kinds of errors aren't expected to occur. We don't // These kinds of errors aren't expected to occur. We don't
@ -238,21 +250,28 @@ fn assert_common_snapshots(
artifact_commands: Vec<ArtifactCommand>, artifact_commands: Vec<ArtifactCommand>,
artifact_graph: ArtifactGraph, artifact_graph: ArtifactGraph,
) { ) {
let result1 = catch_unwind(AssertUnwindSafe(|| {
assert_snapshot(test, "Operations executed", || { assert_snapshot(test, "Operations executed", || {
insta::assert_json_snapshot!("ops", operations, { insta::assert_json_snapshot!("ops", operations, {
"[].unlabeledArg.*.value.**[].from[]" => rounded_redaction(4), "[].unlabeledArg.*.value.**[].from[]" => rounded_redaction(4),
"[].unlabeledArg.*.value.**[].to[]" => rounded_redaction(4), "[].unlabeledArg.*.value.**[].to[]" => rounded_redaction(4),
"[].labeledArgs.*.value.**[].from[]" => rounded_redaction(4), "[].labeledArgs.*.value.**[].from[]" => rounded_redaction(4),
"[].labeledArgs.*.value.**[].to[]" => rounded_redaction(4), "[].labeledArgs.*.value.**[].to[]" => rounded_redaction(4),
".**.sourceRange" => Vec::new(),
}); });
}); })
}));
let result2 = catch_unwind(AssertUnwindSafe(|| {
assert_snapshot(test, "Artifact commands", || { assert_snapshot(test, "Artifact commands", || {
insta::assert_json_snapshot!("artifact_commands", artifact_commands, { insta::assert_json_snapshot!("artifact_commands", artifact_commands, {
"[].command.segment.*.x" => rounded_redaction(4), "[].command.segment.*.x" => rounded_redaction(4),
"[].command.segment.*.y" => rounded_redaction(4), "[].command.segment.*.y" => rounded_redaction(4),
"[].command.segment.*.z" => rounded_redaction(4), "[].command.segment.*.z" => rounded_redaction(4),
".**.range" => Vec::new(),
}); });
}); })
}));
let result3 = catch_unwind(AssertUnwindSafe(|| {
assert_snapshot(test, "Artifact graph flowchart", || { assert_snapshot(test, "Artifact graph flowchart", || {
let flowchart = artifact_graph let flowchart = artifact_graph
.to_mermaid_flowchart() .to_mermaid_flowchart()
@ -260,7 +279,12 @@ fn assert_common_snapshots(
// Change the snapshot suffix so that it is rendered as a Markdown file // Change the snapshot suffix so that it is rendered as a Markdown file
// in GitHub. // in GitHub.
insta::assert_binary_snapshot!("artifact_graph_flowchart.md", flowchart.as_bytes().to_owned()); insta::assert_binary_snapshot!("artifact_graph_flowchart.md", flowchart.as_bytes().to_owned());
}); })
}));
result1.unwrap();
result2.unwrap();
result3.unwrap();
} }
mod cube { mod cube {

View File

@ -5,11 +5,7 @@ description: Artifact commands add_lots.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands add_lots.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands add_lots.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands add_lots.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing add_lots.kcl
---
fn f(i) {
return i * 2
}
x = f(0) + f(1) + f(2) + f(3) + f(4) + f(5) + f(6) + f(7) + f(8) + f(9) + f(10) + f(11) + f(12) + f(13) + f(14) + f(15) + f(16) + f(17) + f(18) + f(19) + f(20) + f(21) + f(22) + f(23) + f(24) + f(25) + f(26) + f(27) + f(28) + f(29) + f(30) + f(31) + f(32) + f(33) + f(34) + f(35) + f(36) + f(37) + f(38) + f(39) + f(40) + f(41) + f(42) + f(43) + f(44) + f(45) + f(46) + f(47) + f(48) + f(49) + f(50) + f(51) + f(52) + f(53) + f(54) + f(55) + f(56) + f(57) + f(58) + f(59) + f(60) + f(61) + f(62) + f(63) + f(64) + f(65) + f(66) + f(67) + f(68) + f(69) + f(70) + f(71) + f(72) + f(73) + f(74) + f(75) + f(76) + f(77) + f(78) + f(79) + f(80) + f(81) + f(82) + f(83) + f(84) + f(85) + f(86) + f(87) + f(88) + f(89) + f(90) + f(91) + f(92) + f(93) + f(94) + f(95) + f(96) + f(97) + f(98) + f(99) + f(100)
assertEqual(x, 10100, 0.1, "Big sum")

View File

@ -5,11 +5,7 @@ description: Artifact commands angled_line.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
10,
29,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
67,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
67,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
67,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
67,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
73,
97,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
103,
142,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
148,
174,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
180,
217,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -227,11 +175,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
223,
250,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -248,11 +192,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
256,
264,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -260,11 +200,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -280,11 +216,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -294,22 +226,14 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -317,11 +241,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -330,11 +250,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -344,11 +260,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -358,11 +270,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -372,11 +280,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -386,11 +290,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -400,11 +300,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -414,11 +310,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -428,11 +320,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -442,11 +330,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -456,11 +340,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -470,11 +350,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -484,11 +360,7 @@ description: Artifact commands angled_line.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
270,
289,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,9 +7,9 @@ description: Result of parsing angled_line.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 289, "end": 0,
"id": { "id": {
"end": 7, "end": 0,
"name": "part001", "name": "part001",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -19,22 +19,22 @@ description: Result of parsing angled_line.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 28, "end": 0,
"raw": "'XY'", "raw": "'XY'",
"start": 24, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XY" "value": "XY"
} }
], ],
"callee": { "callee": {
"end": 23, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 10, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 29, "end": 0,
"start": 10, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -43,9 +43,9 @@ description: Result of parsing angled_line.kcl
{ {
"elements": [ "elements": [
{ {
"end": 55, "end": 0,
"raw": "4.83", "raw": "4.83",
"start": 51, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -54,9 +54,9 @@ description: Result of parsing angled_line.kcl
} }
}, },
{ {
"end": 62, "end": 0,
"raw": "12.56", "raw": "12.56",
"start": 57, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -65,26 +65,26 @@ description: Result of parsing angled_line.kcl
} }
} }
], ],
"end": 63, "end": 0,
"start": 50, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 66, "end": 0,
"start": 65, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 49, "end": 0,
"name": "startProfileAt", "name": "startProfileAt",
"start": 35, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 67, "end": 0,
"start": 35, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -93,17 +93,17 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 81, "end": 0,
"name": "end", "name": "end",
"start": 78, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 89, "end": 0,
"raw": "15.1", "raw": "15.1",
"start": 85, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -112,9 +112,9 @@ description: Result of parsing angled_line.kcl
} }
}, },
{ {
"end": 95, "end": 0,
"raw": "2.48", "raw": "2.48",
"start": 91, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -123,21 +123,21 @@ description: Result of parsing angled_line.kcl
} }
} }
], ],
"end": 96, "end": 0,
"start": 84, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 77, "end": 0,
"name": "line", "name": "line",
"start": 73, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 97, "end": 0,
"start": 73, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -147,17 +147,17 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 111, "end": 0,
"name": "end", "name": "end",
"start": 108, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 119, "end": 0,
"raw": "3.15", "raw": "3.15",
"start": 115, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -167,9 +167,9 @@ description: Result of parsing angled_line.kcl
}, },
{ {
"argument": { "argument": {
"end": 126, "end": 0,
"raw": "9.85", "raw": "9.85",
"start": 122, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -177,15 +177,15 @@ description: Result of parsing angled_line.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 126, "end": 0,
"operator": "-", "operator": "-",
"start": 121, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 127, "end": 0,
"start": 114, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -193,14 +193,14 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 132, "end": 0,
"name": "tag", "name": "tag",
"start": 129, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 141, "end": 0,
"start": 135, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "seg01" "value": "seg01"
@ -208,13 +208,13 @@ description: Result of parsing angled_line.kcl
} }
], ],
"callee": { "callee": {
"end": 107, "end": 0,
"name": "line", "name": "line",
"start": 103, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 142, "end": 0,
"start": 103, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -224,18 +224,18 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 156, "end": 0,
"name": "end", "name": "end",
"start": 153, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"argument": { "argument": {
"end": 166, "end": 0,
"raw": "15.17", "raw": "15.17",
"start": 161, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -243,17 +243,17 @@ description: Result of parsing angled_line.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 166, "end": 0,
"operator": "-", "operator": "-",
"start": 160, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
}, },
{ {
"argument": { "argument": {
"end": 172, "end": 0,
"raw": "4.1", "raw": "4.1",
"start": 169, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -261,28 +261,28 @@ description: Result of parsing angled_line.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 172, "end": 0,
"operator": "-", "operator": "-",
"start": 168, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 173, "end": 0,
"start": 159, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 152, "end": 0,
"name": "line", "name": "line",
"start": 148, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 174, "end": 0,
"start": 148, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -294,28 +294,28 @@ description: Result of parsing angled_line.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 204, "end": 0,
"name": "seg01", "name": "seg01",
"start": 199, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 198, "end": 0,
"name": "segAng", "name": "segAng",
"start": 192, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 205, "end": 0,
"start": 192, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
{ {
"end": 212, "end": 0,
"raw": "12.35", "raw": "12.35",
"start": 207, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -324,26 +324,26 @@ description: Result of parsing angled_line.kcl
} }
} }
], ],
"end": 213, "end": 0,
"start": 191, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 216, "end": 0,
"start": 215, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 190, "end": 0,
"name": "angledLine", "name": "angledLine",
"start": 180, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 217, "end": 0,
"start": 180, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -352,18 +352,18 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 231, "end": 0,
"name": "end", "name": "end",
"start": 228, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"argument": { "argument": {
"end": 241, "end": 0,
"raw": "13.02", "raw": "13.02",
"start": 236, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -371,16 +371,16 @@ description: Result of parsing angled_line.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 241, "end": 0,
"operator": "-", "operator": "-",
"start": 235, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
}, },
{ {
"end": 248, "end": 0,
"raw": "10.03", "raw": "10.03",
"start": 243, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -389,21 +389,21 @@ description: Result of parsing angled_line.kcl
} }
} }
], ],
"end": 249, "end": 0,
"start": 234, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 227, "end": 0,
"name": "line", "name": "line",
"start": 223, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 250, "end": 0,
"start": 223, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -411,20 +411,20 @@ description: Result of parsing angled_line.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 263, "end": 0,
"start": 262, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 261, "end": 0,
"name": "close", "name": "close",
"start": 256, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 264, "end": 0,
"start": 256, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -433,15 +433,15 @@ description: Result of parsing angled_line.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 284, "end": 0,
"name": "length", "name": "length",
"start": 278, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 288, "end": 0,
"raw": "4", "raw": "4",
"start": 287, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -452,34 +452,34 @@ description: Result of parsing angled_line.kcl
} }
], ],
"callee": { "callee": {
"end": 277, "end": 0,
"name": "extrude", "name": "extrude",
"start": 270, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 289, "end": 0,
"start": 270, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
} }
], ],
"end": 289, "end": 0,
"start": 10, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 289, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 290, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -10,19 +10,11 @@ description: Operations executed angled_line.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
24,
28,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
10,
29,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -42,19 +34,11 @@ description: Operations executed angled_line.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
287,
288,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
270,
289,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -63,11 +47,7 @@ description: Operations executed angled_line.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
270,
289,
0
]
} }
} }
] ]

View File

@ -13,22 +13,14 @@ description: Variables in memory after executing angled_line.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
73,
97,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
103,
142,
0
],
"tag": { "tag": {
"end": 141, "end": 141,
"start": 135, "start": 135,
@ -40,44 +32,28 @@ description: Variables in memory after executing angled_line.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
148,
174,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
180,
217,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
223,
250,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
256,
264,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
} }
@ -89,11 +65,7 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
73,
97,
0
]
}, },
"from": [ "from": [
4.83, 4.83,
@ -112,11 +84,7 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
103,
142,
0
]
}, },
"from": [ "from": [
19.93, 19.93,
@ -140,11 +108,7 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
148,
174,
0
]
}, },
"from": [ "from": [
23.08, 23.08,
@ -163,11 +127,7 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
180,
217,
0
]
}, },
"from": [ "from": [
7.91, 7.91,
@ -186,11 +146,7 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
223,
250,
0
]
}, },
"from": [ "from": [
11.6718, 11.6718,
@ -209,11 +165,7 @@ description: Variables in memory after executing angled_line.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
256,
264,
0
]
}, },
"from": [ "from": [
-1.3482, -1.3482,
@ -274,11 +226,7 @@ description: Variables in memory after executing angled_line.kcl
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
35,
67,
0
]
} }
}, },
"tags": { "tags": {

View File

@ -0,0 +1,13 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing angled_line.kcl
---
part001 = startSketchOn('XY')
|> startProfileAt([4.83, 12.56], %)
|> line(end = [15.1, 2.48])
|> line(end = [3.15, -9.85], tag = $seg01)
|> line(end = [-15.17, -4.1])
|> angledLine([segAng(seg01), 12.35], %)
|> line(end = [-13.02, 10.03])
|> close(%)
|> extrude(length = 4)

View File

@ -5,11 +5,7 @@ description: Artifact commands argument_error.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands argument_error.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands argument_error.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands argument_error.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -1,5 +1,5 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl-lib/src/simulation_tests.rs
description: Result of parsing argument_error.kcl description: Result of parsing argument_error.kcl
--- ---
{ {
@ -7,11 +7,11 @@ description: Result of parsing argument_error.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 22, "end": 0,
"id": { "id": {
"end": 4, "end": 0,
"name": "f", "name": "f",
"start": 3, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
@ -19,9 +19,9 @@ description: Result of parsing argument_error.kcl
"body": [ "body": [
{ {
"argument": { "argument": {
"end": 20, "end": 0,
"raw": "5", "raw": "5",
"start": 19, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -29,57 +29,57 @@ description: Result of parsing argument_error.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 20, "end": 0,
"start": 12, "start": 0,
"type": "ReturnStatement", "type": "ReturnStatement",
"type": "ReturnStatement" "type": "ReturnStatement"
} }
], ],
"end": 22, "end": 0,
"start": 8 "start": 0
}, },
"end": 22, "end": 0,
"params": [ "params": [
{ {
"type": "Parameter", "type": "Parameter",
"identifier": { "identifier": {
"end": 6, "end": 0,
"name": "i", "name": "i",
"start": 5, "start": 0,
"type": "Identifier" "type": "Identifier"
} }
} }
], ],
"start": 4, "start": 0,
"type": "FunctionExpression", "type": "FunctionExpression",
"type": "FunctionExpression" "type": "FunctionExpression"
}, },
"start": 3, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 22, "end": 0,
"kind": "fn", "kind": "fn",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"end": 38, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"end": 29, "end": 0,
"name": "f", "name": "f",
"start": 28, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
{ {
"elements": [ "elements": [
{ {
"end": 33, "end": 0,
"raw": "0", "raw": "0",
"start": 32, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -88,9 +88,9 @@ description: Result of parsing argument_error.kcl
} }
}, },
{ {
"end": 36, "end": 0,
"raw": "1", "raw": "1",
"start": 35, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -99,35 +99,35 @@ description: Result of parsing argument_error.kcl
} }
} }
], ],
"end": 37, "end": 0,
"start": 31, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
], ],
"callee": { "callee": {
"end": 27, "end": 0,
"name": "map", "name": "map",
"start": 24, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 38, "end": 0,
"start": 24, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 24, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
} }
], ],
"end": 39, "end": 0,
"nonCodeMeta": { "nonCodeMeta": {
"nonCodeNodes": { "nonCodeNodes": {
"0": [ "0": [
{ {
"end": 24, "end": 0,
"start": 22, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLine" "type": "newLine"

View File

@ -0,0 +1,9 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing argument_error.kcl
---
fn f(i) {
return 5
}
map(f, [0, 1])

View File

@ -5,11 +5,7 @@ description: Artifact commands array_elem_pop.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands array_elem_pop.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands array_elem_pop.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands array_elem_pop.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,9 +7,9 @@ description: Result of parsing array_elem_pop.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 15, "end": 0,
"id": { "id": {
"end": 3, "end": 0,
"name": "arr", "name": "arr",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -17,9 +17,9 @@ description: Result of parsing array_elem_pop.kcl
"init": { "init": {
"elements": [ "elements": [
{ {
"end": 8, "end": 0,
"raw": "1", "raw": "1",
"start": 7, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -28,9 +28,9 @@ description: Result of parsing array_elem_pop.kcl
} }
}, },
{ {
"end": 11, "end": 0,
"raw": "2", "raw": "2",
"start": 10, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -39,9 +39,9 @@ description: Result of parsing array_elem_pop.kcl
} }
}, },
{ {
"end": 14, "end": 0,
"raw": "3", "raw": "3",
"start": 13, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -50,15 +50,15 @@ description: Result of parsing array_elem_pop.kcl
} }
} }
], ],
"end": 15, "end": 0,
"start": 6, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 15, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
@ -66,139 +66,139 @@ description: Result of parsing array_elem_pop.kcl
}, },
{ {
"declaration": { "declaration": {
"end": 35, "end": 0,
"id": { "id": {
"end": 24, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 16, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"arguments": [ "arguments": [
{ {
"end": 34, "end": 0,
"name": "arr", "name": "arr",
"start": 31, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 30, "end": 0,
"name": "pop", "name": "pop",
"start": 27, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 35, "end": 0,
"start": 27, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 16, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 35, "end": 0,
"kind": "const", "kind": "const",
"start": 16, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 60, "end": 0,
"id": { "id": {
"end": 44, "end": 0,
"name": "new_arr2", "name": "new_arr2",
"start": 36, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"arguments": [ "arguments": [
{ {
"end": 59, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 51, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 50, "end": 0,
"name": "pop", "name": "pop",
"start": 47, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 60, "end": 0,
"start": 47, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 36, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 60, "end": 0,
"kind": "const", "kind": "const",
"start": 36, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 85, "end": 0,
"id": { "id": {
"end": 69, "end": 0,
"name": "new_arr3", "name": "new_arr3",
"start": 61, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"arguments": [ "arguments": [
{ {
"end": 84, "end": 0,
"name": "new_arr2", "name": "new_arr2",
"start": 76, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 75, "end": 0,
"name": "pop", "name": "pop",
"start": 72, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 85, "end": 0,
"start": 72, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 61, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 85, "end": 0,
"kind": "const", "kind": "const",
"start": 61, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"end": 159, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 109, "end": 0,
"object": { "object": {
"end": 106, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 98, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 108, "end": 0,
"raw": "0", "raw": "0",
"start": 107, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -206,14 +206,14 @@ description: Result of parsing array_elem_pop.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 98, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 112, "end": 0,
"raw": "1", "raw": "1",
"start": 111, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -222,9 +222,9 @@ description: Result of parsing array_elem_pop.kcl
} }
}, },
{ {
"end": 121, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 114, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -233,47 +233,47 @@ description: Result of parsing array_elem_pop.kcl
} }
}, },
{ {
"end": 158, "end": 0,
"raw": "\"element 0 should not have changed\"", "raw": "\"element 0 should not have changed\"",
"start": 123, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "element 0 should not have changed" "value": "element 0 should not have changed"
} }
], ],
"callee": { "callee": {
"end": 97, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 86, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 159, "end": 0,
"start": 86, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 86, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 233, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 183, "end": 0,
"object": { "object": {
"end": 180, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 172, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 182, "end": 0,
"raw": "1", "raw": "1",
"start": 181, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -281,14 +281,14 @@ description: Result of parsing array_elem_pop.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 172, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 186, "end": 0,
"raw": "2", "raw": "2",
"start": 185, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -297,9 +297,9 @@ description: Result of parsing array_elem_pop.kcl
} }
}, },
{ {
"end": 195, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 188, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -308,47 +308,47 @@ description: Result of parsing array_elem_pop.kcl
} }
}, },
{ {
"end": 232, "end": 0,
"raw": "\"element 1 should not have changed\"", "raw": "\"element 1 should not have changed\"",
"start": 197, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "element 1 should not have changed" "value": "element 1 should not have changed"
} }
], ],
"callee": { "callee": {
"end": 171, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 160, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 233, "end": 0,
"start": 160, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 160, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 307, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 257, "end": 0,
"object": { "object": {
"end": 254, "end": 0,
"name": "new_arr2", "name": "new_arr2",
"start": 246, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 256, "end": 0,
"raw": "0", "raw": "0",
"start": 255, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -356,14 +356,14 @@ description: Result of parsing array_elem_pop.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 246, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 260, "end": 0,
"raw": "1", "raw": "1",
"start": 259, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -372,9 +372,9 @@ description: Result of parsing array_elem_pop.kcl
} }
}, },
{ {
"end": 269, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 262, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -383,31 +383,31 @@ description: Result of parsing array_elem_pop.kcl
} }
}, },
{ {
"end": 306, "end": 0,
"raw": "\"element 0 should not have changed\"", "raw": "\"element 0 should not have changed\"",
"start": 271, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "element 0 should not have changed" "value": "element 0 should not have changed"
} }
], ],
"callee": { "callee": {
"end": 245, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 234, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 307, "end": 0,
"start": 234, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 234, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
} }
], ],
"end": 308, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -0,0 +1,11 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing array_elem_pop.kcl
---
arr = [1, 2, 3]
new_arr1 = pop(arr)
new_arr2 = pop(new_arr1)
new_arr3 = pop(new_arr2)
assertEqual(new_arr1[0], 1, 0.00001, "element 0 should not have changed")
assertEqual(new_arr1[1], 2, 0.00001, "element 1 should not have changed")
assertEqual(new_arr2[0], 1, 0.00001, "element 0 should not have changed")

View File

@ -5,11 +5,7 @@ description: Artifact commands array_elem_pop_empty_fail.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands array_elem_pop_empty_fail.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands array_elem_pop_empty_fail.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands array_elem_pop_empty_fail.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,24 +7,24 @@ description: Result of parsing array_elem_pop_empty_fail.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 8, "end": 0,
"id": { "id": {
"end": 3, "end": 0,
"name": "arr", "name": "arr",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"elements": [], "elements": [],
"end": 8, "end": 0,
"start": 6, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 8, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
@ -32,45 +32,45 @@ description: Result of parsing array_elem_pop_empty_fail.kcl
}, },
{ {
"declaration": { "declaration": {
"end": 24, "end": 0,
"id": { "id": {
"end": 13, "end": 0,
"name": "fail", "name": "fail",
"start": 9, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"arguments": [ "arguments": [
{ {
"end": 23, "end": 0,
"name": "arr", "name": "arr",
"start": 20, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 19, "end": 0,
"name": "pop", "name": "pop",
"start": 16, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 24, "end": 0,
"start": 16, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 9, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 24, "end": 0,
"kind": "const", "kind": "const",
"start": 9, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 25, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -0,0 +1,6 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing array_elem_pop_empty_fail.kcl
---
arr = []
fail = pop(arr)

View File

@ -5,11 +5,7 @@ description: Artifact commands array_elem_pop_fail.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands array_elem_pop_fail.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands array_elem_pop_fail.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands array_elem_pop_fail.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -1,5 +1,5 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl-lib/src/simulation_tests.rs
description: Result of parsing array_elem_pop_fail.kcl description: Result of parsing array_elem_pop_fail.kcl
--- ---
{ {
@ -7,9 +7,9 @@ description: Result of parsing array_elem_pop_fail.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 15, "end": 0,
"id": { "id": {
"end": 3, "end": 0,
"name": "arr", "name": "arr",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -17,9 +17,9 @@ description: Result of parsing array_elem_pop_fail.kcl
"init": { "init": {
"elements": [ "elements": [
{ {
"end": 8, "end": 0,
"raw": "1", "raw": "1",
"start": 7, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -28,9 +28,9 @@ description: Result of parsing array_elem_pop_fail.kcl
} }
}, },
{ {
"end": 11, "end": 0,
"raw": "2", "raw": "2",
"start": 10, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -39,9 +39,9 @@ description: Result of parsing array_elem_pop_fail.kcl
} }
}, },
{ {
"end": 14, "end": 0,
"raw": "3", "raw": "3",
"start": 13, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -50,15 +50,15 @@ description: Result of parsing array_elem_pop_fail.kcl
} }
} }
], ],
"end": 15, "end": 0,
"start": 6, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 15, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
@ -66,66 +66,66 @@ description: Result of parsing array_elem_pop_fail.kcl
}, },
{ {
"declaration": { "declaration": {
"end": 36, "end": 0,
"id": { "id": {
"end": 25, "end": 0,
"name": "pushedArr", "name": "pushedArr",
"start": 16, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"arguments": [ "arguments": [
{ {
"end": 35, "end": 0,
"name": "arr", "name": "arr",
"start": 32, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 31, "end": 0,
"name": "pop", "name": "pop",
"start": 28, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 36, "end": 0,
"start": 28, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 16, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 36, "end": 0,
"kind": "const", "kind": "const",
"start": 16, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 56, "end": 0,
"id": { "id": {
"end": 41, "end": 0,
"name": "fail", "name": "fail",
"start": 37, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"computed": false, "computed": false,
"end": 56, "end": 0,
"object": { "object": {
"end": 53, "end": 0,
"name": "pushedArr", "name": "pushedArr",
"start": 44, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 55, "end": 0,
"raw": "2", "raw": "2",
"start": 54, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -133,21 +133,21 @@ description: Result of parsing array_elem_pop_fail.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 44, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
"start": 37, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 56, "end": 0,
"kind": "const", "kind": "const",
"start": 37, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 57, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -0,0 +1,7 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing array_elem_pop_fail.kcl
---
arr = [1, 2, 3]
pushedArr = pop(arr)
fail = pushedArr[2]

View File

@ -5,11 +5,7 @@ description: Artifact commands array_elem_push.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands array_elem_push.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands array_elem_push.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands array_elem_push.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -1,5 +1,5 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl-lib/src/simulation_tests.rs
description: Result of parsing array_elem_push.kcl description: Result of parsing array_elem_push.kcl
--- ---
{ {
@ -7,9 +7,9 @@ description: Result of parsing array_elem_push.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 15, "end": 0,
"id": { "id": {
"end": 3, "end": 0,
"name": "arr", "name": "arr",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -17,9 +17,9 @@ description: Result of parsing array_elem_push.kcl
"init": { "init": {
"elements": [ "elements": [
{ {
"end": 8, "end": 0,
"raw": "1", "raw": "1",
"start": 7, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -28,9 +28,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 11, "end": 0,
"raw": "2", "raw": "2",
"start": 10, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -39,9 +39,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 14, "end": 0,
"raw": "3", "raw": "3",
"start": 13, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -50,15 +50,15 @@ description: Result of parsing array_elem_push.kcl
} }
} }
], ],
"end": 15, "end": 0,
"start": 6, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 15, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
@ -66,26 +66,26 @@ description: Result of parsing array_elem_push.kcl
}, },
{ {
"declaration": { "declaration": {
"end": 39, "end": 0,
"id": { "id": {
"end": 24, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 16, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"arguments": [ "arguments": [
{ {
"end": 35, "end": 0,
"name": "arr", "name": "arr",
"start": 32, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
{ {
"end": 38, "end": 0,
"raw": "4", "raw": "4",
"start": 37, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -95,47 +95,47 @@ description: Result of parsing array_elem_push.kcl
} }
], ],
"callee": { "callee": {
"end": 31, "end": 0,
"name": "push", "name": "push",
"start": 27, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 39, "end": 0,
"start": 27, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 16, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 39, "end": 0,
"kind": "const", "kind": "const",
"start": 16, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 68, "end": 0,
"id": { "id": {
"end": 48, "end": 0,
"name": "new_arr2", "name": "new_arr2",
"start": 40, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"arguments": [ "arguments": [
{ {
"end": 64, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 56, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
{ {
"end": 67, "end": 0,
"raw": "5", "raw": "5",
"start": 66, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -145,43 +145,43 @@ description: Result of parsing array_elem_push.kcl
} }
], ],
"callee": { "callee": {
"end": 55, "end": 0,
"name": "push", "name": "push",
"start": 51, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 68, "end": 0,
"start": 51, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 40, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 68, "end": 0,
"kind": "const", "kind": "const",
"start": 40, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"end": 142, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 92, "end": 0,
"object": { "object": {
"end": 89, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 81, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 91, "end": 0,
"raw": "0", "raw": "0",
"start": 90, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -189,14 +189,14 @@ description: Result of parsing array_elem_push.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 81, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 95, "end": 0,
"raw": "1", "raw": "1",
"start": 94, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -205,9 +205,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 104, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 97, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -216,47 +216,47 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 141, "end": 0,
"raw": "\"element 0 should not have changed\"", "raw": "\"element 0 should not have changed\"",
"start": 106, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "element 0 should not have changed" "value": "element 0 should not have changed"
} }
], ],
"callee": { "callee": {
"end": 80, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 69, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 142, "end": 0,
"start": 69, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 69, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 216, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 166, "end": 0,
"object": { "object": {
"end": 163, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 155, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 165, "end": 0,
"raw": "1", "raw": "1",
"start": 164, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -264,14 +264,14 @@ description: Result of parsing array_elem_push.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 155, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 169, "end": 0,
"raw": "2", "raw": "2",
"start": 168, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -280,9 +280,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 178, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 171, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -291,47 +291,47 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 215, "end": 0,
"raw": "\"element 1 should not have changed\"", "raw": "\"element 1 should not have changed\"",
"start": 180, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "element 1 should not have changed" "value": "element 1 should not have changed"
} }
], ],
"callee": { "callee": {
"end": 154, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 143, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 216, "end": 0,
"start": 143, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 143, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 290, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 240, "end": 0,
"object": { "object": {
"end": 237, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 229, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 239, "end": 0,
"raw": "2", "raw": "2",
"start": 238, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -339,14 +339,14 @@ description: Result of parsing array_elem_push.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 229, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 243, "end": 0,
"raw": "3", "raw": "3",
"start": 242, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -355,9 +355,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 252, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 245, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -366,47 +366,47 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 289, "end": 0,
"raw": "\"element 2 should not have changed\"", "raw": "\"element 2 should not have changed\"",
"start": 254, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "element 2 should not have changed" "value": "element 2 should not have changed"
} }
], ],
"callee": { "callee": {
"end": 228, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 217, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 290, "end": 0,
"start": 217, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 217, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 366, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 314, "end": 0,
"object": { "object": {
"end": 311, "end": 0,
"name": "new_arr1", "name": "new_arr1",
"start": 303, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 313, "end": 0,
"raw": "3", "raw": "3",
"start": 312, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -414,14 +414,14 @@ description: Result of parsing array_elem_push.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 303, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 317, "end": 0,
"raw": "4", "raw": "4",
"start": 316, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -430,9 +430,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 326, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 319, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -441,47 +441,47 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 365, "end": 0,
"raw": "\"4 was added to the end of the array\"", "raw": "\"4 was added to the end of the array\"",
"start": 328, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "4 was added to the end of the array" "value": "4 was added to the end of the array"
} }
], ],
"callee": { "callee": {
"end": 302, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 291, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 366, "end": 0,
"start": 291, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 291, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 440, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 390, "end": 0,
"object": { "object": {
"end": 387, "end": 0,
"name": "new_arr2", "name": "new_arr2",
"start": 379, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 389, "end": 0,
"raw": "0", "raw": "0",
"start": 388, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -489,14 +489,14 @@ description: Result of parsing array_elem_push.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 379, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 393, "end": 0,
"raw": "1", "raw": "1",
"start": 392, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -505,9 +505,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 402, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 395, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -516,47 +516,47 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 439, "end": 0,
"raw": "\"element 0 should not have changed\"", "raw": "\"element 0 should not have changed\"",
"start": 404, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "element 0 should not have changed" "value": "element 0 should not have changed"
} }
], ],
"callee": { "callee": {
"end": 378, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 367, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 440, "end": 0,
"start": 367, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 367, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 514, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 464, "end": 0,
"object": { "object": {
"end": 461, "end": 0,
"name": "new_arr2", "name": "new_arr2",
"start": 453, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 463, "end": 0,
"raw": "1", "raw": "1",
"start": 462, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -564,14 +564,14 @@ description: Result of parsing array_elem_push.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 453, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 467, "end": 0,
"raw": "2", "raw": "2",
"start": 466, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -580,9 +580,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 476, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 469, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -591,47 +591,47 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 513, "end": 0,
"raw": "\"element 1 should not have changed\"", "raw": "\"element 1 should not have changed\"",
"start": 478, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "element 1 should not have changed" "value": "element 1 should not have changed"
} }
], ],
"callee": { "callee": {
"end": 452, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 441, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 514, "end": 0,
"start": 441, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 441, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 588, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 538, "end": 0,
"object": { "object": {
"end": 535, "end": 0,
"name": "new_arr2", "name": "new_arr2",
"start": 527, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 537, "end": 0,
"raw": "2", "raw": "2",
"start": 536, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -639,14 +639,14 @@ description: Result of parsing array_elem_push.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 527, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 541, "end": 0,
"raw": "3", "raw": "3",
"start": 540, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -655,9 +655,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 550, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 543, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -666,47 +666,47 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 587, "end": 0,
"raw": "\"element 2 should not have changed\"", "raw": "\"element 2 should not have changed\"",
"start": 552, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "element 2 should not have changed" "value": "element 2 should not have changed"
} }
], ],
"callee": { "callee": {
"end": 526, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 515, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 588, "end": 0,
"start": 515, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 515, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 664, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 612, "end": 0,
"object": { "object": {
"end": 609, "end": 0,
"name": "new_arr2", "name": "new_arr2",
"start": 601, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 611, "end": 0,
"raw": "3", "raw": "3",
"start": 610, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -714,14 +714,14 @@ description: Result of parsing array_elem_push.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 601, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 615, "end": 0,
"raw": "4", "raw": "4",
"start": 614, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -730,9 +730,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 624, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 617, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -741,47 +741,47 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 663, "end": 0,
"raw": "\"4 was added to the end of the array\"", "raw": "\"4 was added to the end of the array\"",
"start": 626, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "4 was added to the end of the array" "value": "4 was added to the end of the array"
} }
], ],
"callee": { "callee": {
"end": 600, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 589, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 664, "end": 0,
"start": 589, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 589, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 740, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 688, "end": 0,
"object": { "object": {
"end": 685, "end": 0,
"name": "new_arr2", "name": "new_arr2",
"start": 677, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 687, "end": 0,
"raw": "4", "raw": "4",
"start": 686, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -789,14 +789,14 @@ description: Result of parsing array_elem_push.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 677, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"end": 691, "end": 0,
"raw": "5", "raw": "5",
"start": 690, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -805,9 +805,9 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 700, "end": 0,
"raw": "0.00001", "raw": "0.00001",
"start": 693, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -816,31 +816,31 @@ description: Result of parsing array_elem_push.kcl
} }
}, },
{ {
"end": 739, "end": 0,
"raw": "\"5 was added to the end of the array\"", "raw": "\"5 was added to the end of the array\"",
"start": 702, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "5 was added to the end of the array" "value": "5 was added to the end of the array"
} }
], ],
"callee": { "callee": {
"end": 676, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 665, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 740, "end": 0,
"start": 665, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 665, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
} }
], ],
"end": 741, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -0,0 +1,16 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing array_elem_push.kcl
---
arr = [1, 2, 3]
new_arr1 = push(arr, 4)
new_arr2 = push(new_arr1, 5)
assertEqual(new_arr1[0], 1, 0.00001, "element 0 should not have changed")
assertEqual(new_arr1[1], 2, 0.00001, "element 1 should not have changed")
assertEqual(new_arr1[2], 3, 0.00001, "element 2 should not have changed")
assertEqual(new_arr1[3], 4, 0.00001, "4 was added to the end of the array")
assertEqual(new_arr2[0], 1, 0.00001, "element 0 should not have changed")
assertEqual(new_arr2[1], 2, 0.00001, "element 1 should not have changed")
assertEqual(new_arr2[2], 3, 0.00001, "element 2 should not have changed")
assertEqual(new_arr2[3], 4, 0.00001, "4 was added to the end of the array")
assertEqual(new_arr2[4], 5, 0.00001, "5 was added to the end of the array")

View File

@ -5,11 +5,7 @@ description: Artifact commands array_elem_push_fail.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands array_elem_push_fail.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands array_elem_push_fail.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands array_elem_push_fail.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -1,5 +1,5 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl-lib/src/simulation_tests.rs
description: Result of parsing array_elem_push_fail.kcl description: Result of parsing array_elem_push_fail.kcl
--- ---
{ {
@ -7,9 +7,9 @@ description: Result of parsing array_elem_push_fail.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 15, "end": 0,
"id": { "id": {
"end": 3, "end": 0,
"name": "arr", "name": "arr",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -17,9 +17,9 @@ description: Result of parsing array_elem_push_fail.kcl
"init": { "init": {
"elements": [ "elements": [
{ {
"end": 8, "end": 0,
"raw": "1", "raw": "1",
"start": 7, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -28,9 +28,9 @@ description: Result of parsing array_elem_push_fail.kcl
} }
}, },
{ {
"end": 11, "end": 0,
"raw": "2", "raw": "2",
"start": 10, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -39,9 +39,9 @@ description: Result of parsing array_elem_push_fail.kcl
} }
}, },
{ {
"end": 14, "end": 0,
"raw": "3", "raw": "3",
"start": 13, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -50,15 +50,15 @@ description: Result of parsing array_elem_push_fail.kcl
} }
} }
], ],
"end": 15, "end": 0,
"start": 6, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 15, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
@ -66,26 +66,26 @@ description: Result of parsing array_elem_push_fail.kcl
}, },
{ {
"declaration": { "declaration": {
"end": 40, "end": 0,
"id": { "id": {
"end": 25, "end": 0,
"name": "pushedArr", "name": "pushedArr",
"start": 16, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"arguments": [ "arguments": [
{ {
"end": 36, "end": 0,
"name": "arr", "name": "arr",
"start": 33, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
{ {
"end": 39, "end": 0,
"raw": "4", "raw": "4",
"start": 38, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -95,48 +95,48 @@ description: Result of parsing array_elem_push_fail.kcl
} }
], ],
"callee": { "callee": {
"end": 32, "end": 0,
"name": "push", "name": "push",
"start": 28, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 40, "end": 0,
"start": 28, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 16, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 40, "end": 0,
"kind": "const", "kind": "const",
"start": 16, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 54, "end": 0,
"id": { "id": {
"end": 45, "end": 0,
"name": "fail", "name": "fail",
"start": 41, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"computed": false, "computed": false,
"end": 54, "end": 0,
"object": { "object": {
"end": 51, "end": 0,
"name": "arr", "name": "arr",
"start": 48, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 53, "end": 0,
"raw": "3", "raw": "3",
"start": 52, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -144,21 +144,21 @@ description: Result of parsing array_elem_push_fail.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 48, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
"start": 41, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 54, "end": 0,
"kind": "const", "kind": "const",
"start": 41, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 55, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -0,0 +1,7 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing array_elem_push_fail.kcl
---
arr = [1, 2, 3]
pushedArr = push(arr, 4)
fail = arr[3]

View File

@ -5,11 +5,7 @@ description: Artifact commands array_index_oob.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands array_index_oob.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands array_index_oob.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands array_index_oob.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,24 +7,24 @@ description: Result of parsing array_index_oob.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 8, "end": 0,
"id": { "id": {
"end": 3, "end": 0,
"name": "arr", "name": "arr",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"elements": [], "elements": [],
"end": 8, "end": 0,
"start": 6, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 8, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
@ -32,27 +32,27 @@ description: Result of parsing array_index_oob.kcl
}, },
{ {
"declaration": { "declaration": {
"end": 19, "end": 0,
"id": { "id": {
"end": 10, "end": 0,
"name": "x", "name": "x",
"start": 9, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"computed": false, "computed": false,
"end": 19, "end": 0,
"object": { "object": {
"end": 16, "end": 0,
"name": "arr", "name": "arr",
"start": 13, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 18, "end": 0,
"raw": "0", "raw": "0",
"start": 17, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -60,21 +60,21 @@ description: Result of parsing array_index_oob.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 13, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
"start": 9, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 19, "end": 0,
"kind": "const", "kind": "const",
"start": 9, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 20, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -0,0 +1,6 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing array_index_oob.kcl
---
arr = []
x = arr[0]

View File

@ -5,11 +5,7 @@ description: Artifact commands array_range_expr.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands array_range_expr.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands array_range_expr.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands array_range_expr.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,21 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing array_range_expr.kcl
---
r1 = [0..4]
assertEqual(r1[4], 4, 0.00001, "last element is included")
four = 4
zero = 0
r2 = [zero..four]
assertEqual(r2[4], 4, 0.00001, "last element is included")
five = int(four + 1)
r3 = [zero..five]
assertEqual(r3[4], 4, 0.00001, "second-to-last element is included")
assertEqual(r3[5], 5, 0.00001, "last element is included")
r4 = [int(zero + 1) .. int(five - 1)]
assertEqual(r4[0], 1, 0.00001, "first element is 1")
assertEqual(r4[2], 3, 0.00001, "second-to-last element is 3")
assertEqual(r4[3], 4, 0.00001, "last element is 4")

View File

@ -5,11 +5,7 @@ description: Artifact commands array_range_negative_expr.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands array_range_negative_expr.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands array_range_negative_expr.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands array_range_negative_expr.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -1,5 +1,5 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl-lib/src/simulation_tests.rs
description: Result of parsing array_range_negative_expr.kcl description: Result of parsing array_range_negative_expr.kcl
--- ---
{ {
@ -7,19 +7,19 @@ description: Result of parsing array_range_negative_expr.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 19, "end": 0,
"id": { "id": {
"end": 2, "end": 0,
"name": "xs", "name": "xs",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"end": 19, "end": 0,
"endElement": { "endElement": {
"end": 18, "end": 0,
"raw": "5", "raw": "5",
"start": 17, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -28,14 +28,14 @@ description: Result of parsing array_range_negative_expr.kcl
} }
}, },
"endInclusive": true, "endInclusive": true,
"start": 5, "start": 0,
"startElement": { "startElement": {
"arguments": [ "arguments": [
{ {
"argument": { "argument": {
"end": 12, "end": 0,
"raw": "5", "raw": "5",
"start": 11, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -43,21 +43,21 @@ description: Result of parsing array_range_negative_expr.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 12, "end": 0,
"operator": "-", "operator": "-",
"start": 10, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"callee": { "callee": {
"end": 9, "end": 0,
"name": "int", "name": "int",
"start": 6, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 13, "end": 0,
"start": 6, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -67,30 +67,30 @@ description: Result of parsing array_range_negative_expr.kcl
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 19, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"end": 72, "end": 0,
"expression": { "expression": {
"arguments": [ "arguments": [
{ {
"computed": false, "computed": false,
"end": 37, "end": 0,
"object": { "object": {
"end": 34, "end": 0,
"name": "xs", "name": "xs",
"start": 32, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"property": { "property": {
"end": 36, "end": 0,
"raw": "0", "raw": "0",
"start": 35, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -98,15 +98,15 @@ description: Result of parsing array_range_negative_expr.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 32, "start": 0,
"type": "MemberExpression", "type": "MemberExpression",
"type": "MemberExpression" "type": "MemberExpression"
}, },
{ {
"argument": { "argument": {
"end": 41, "end": 0,
"raw": "5", "raw": "5",
"start": 40, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -114,16 +114,16 @@ description: Result of parsing array_range_negative_expr.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 41, "end": 0,
"operator": "-", "operator": "-",
"start": 39, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
}, },
{ {
"end": 48, "end": 0,
"raw": "0.001", "raw": "0.001",
"start": 43, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -132,31 +132,31 @@ description: Result of parsing array_range_negative_expr.kcl
} }
}, },
{ {
"end": 71, "end": 0,
"raw": "\"first element is -5\"", "raw": "\"first element is -5\"",
"start": 50, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "first element is -5" "value": "first element is -5"
} }
], ],
"callee": { "callee": {
"end": 31, "end": 0,
"name": "assertEqual", "name": "assertEqual",
"start": 20, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 72, "end": 0,
"start": 20, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 20, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
} }
], ],
"end": 73, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -0,0 +1,6 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing array_range_negative_expr.kcl
---
xs = [int(-5) .. 5]
assertEqual(xs[0], -5, 0.001, "first element is -5")

View File

@ -5,11 +5,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
12,
31,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
64,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
64,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
64,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
64,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
70,
89,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
95,
131,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
137,
171,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
177,
233,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -227,11 +175,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
239,
246,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -239,11 +183,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -259,11 +199,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -273,22 +209,14 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -296,11 +224,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -309,11 +233,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -323,11 +243,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -337,11 +253,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -351,11 +263,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -365,11 +273,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -379,11 +283,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -393,11 +293,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -407,11 +303,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
260,
292,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -421,11 +313,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
298,
332,
0
],
"command": { "command": {
"type": "solid3d_fillet_edge", "type": "solid3d_fillet_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -437,11 +325,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
383,
410,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -453,22 +337,14 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
383,
410,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
383,
410,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -481,22 +357,14 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
383,
410,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
416,
434,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -513,11 +381,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
440,
459,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -534,11 +398,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
465,
521,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -555,11 +415,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
527,
534,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -567,11 +423,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -583,11 +435,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -597,22 +445,14 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -620,11 +460,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -633,11 +469,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -647,11 +479,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -661,11 +489,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -675,11 +499,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -689,11 +509,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -703,11 +519,7 @@ description: Artifact commands artifact_graph_example_code1.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
548,
578,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",

File diff suppressed because it is too large Load Diff

View File

@ -10,19 +10,11 @@ description: Operations executed artifact_graph_example_code1.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
26,
30,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
12,
31,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -42,19 +34,11 @@ description: Operations executed artifact_graph_example_code1.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
288,
291,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
260,
292,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -63,11 +47,7 @@ description: Operations executed artifact_graph_example_code1.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
268,
277,
0
]
} }
}, },
{ {
@ -86,11 +66,7 @@ description: Operations executed artifact_graph_example_code1.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
314,
315,
0
]
}, },
"tags": { "tags": {
"value": { "value": {
@ -103,19 +79,11 @@ description: Operations executed artifact_graph_example_code1.kcl
} }
] ]
}, },
"sourceRange": [ "sourceRange": []
324,
331,
0
]
} }
}, },
"name": "fillet", "name": "fillet",
"sourceRange": [ "sourceRange": [],
298,
332,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -124,11 +92,7 @@ description: Operations executed artifact_graph_example_code1.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
298,
332,
0
]
} }
}, },
{ {
@ -140,11 +104,7 @@ description: Operations executed artifact_graph_example_code1.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
359,
369,
0
]
}, },
"tag": { "tag": {
"value": { "value": {
@ -152,19 +112,11 @@ description: Operations executed artifact_graph_example_code1.kcl
"value": "seg02", "value": "seg02",
"artifact_id": "[uuid]" "artifact_id": "[uuid]"
}, },
"sourceRange": [ "sourceRange": []
371,
376,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
345,
377,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -184,19 +136,11 @@ description: Operations executed artifact_graph_example_code1.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
576,
577,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
548,
578,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -205,11 +149,7 @@ description: Operations executed artifact_graph_example_code1.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
556,
565,
0
]
} }
} }
] ]

View File

@ -13,22 +13,14 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
70,
89,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
95,
131,
0
],
"tag": { "tag": {
"end": 130, "end": 130,
"start": 124, "start": 124,
@ -40,11 +32,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
137,
171,
0
],
"tag": { "tag": {
"end": 170, "end": 170,
"start": 164, "start": 164,
@ -56,11 +44,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
177,
233,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
} }
@ -72,11 +56,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
70,
89,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -95,11 +75,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
95,
131,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -123,11 +99,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
137,
171,
0
]
}, },
"from": [ "from": [
5.55, 5.55,
@ -151,11 +123,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
177,
233,
0
]
}, },
"from": [ "from": [
5.55, 5.55,
@ -174,11 +142,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
239,
246,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -239,11 +203,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
37,
64,
0
]
} }
}, },
"tags": { "tags": {
@ -289,33 +249,21 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
416,
434,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
440,
459,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
465,
521,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
} }
@ -327,11 +275,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
416,
434,
0
]
}, },
"from": [ "from": [
-2.0, -2.0,
@ -350,11 +294,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
440,
459,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -373,11 +313,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
465,
521,
0
]
}, },
"from": [ "from": [
2.0, 2.0,
@ -396,11 +332,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
527,
534,
0
]
}, },
"from": [ "from": [
-2.0, -2.0,
@ -445,22 +377,14 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
70,
89,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
95,
131,
0
],
"tag": { "tag": {
"end": 130, "end": 130,
"start": 124, "start": 124,
@ -472,11 +396,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
137,
171,
0
],
"tag": { "tag": {
"end": 170, "end": 170,
"start": 164, "start": 164,
@ -488,11 +408,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
177,
233,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
} }
@ -504,11 +420,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
70,
89,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -527,11 +439,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
95,
131,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -555,11 +463,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
137,
171,
0
]
}, },
"from": [ "from": [
5.55, 5.55,
@ -583,11 +487,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
177,
233,
0
]
}, },
"from": [ "from": [
5.55, 5.55,
@ -606,11 +506,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
239,
246,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -671,11 +567,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
37,
64,
0
]
} }
}, },
"tags": { "tags": {
@ -729,11 +621,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
383,
410,
0
]
} }
}, },
"artifactId": "[uuid]", "artifactId": "[uuid]",
@ -769,11 +657,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
70,
89,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -792,11 +676,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
95,
131,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -820,11 +700,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
137,
171,
0
]
}, },
"from": [ "from": [
5.55, 5.55,
@ -848,11 +724,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
177,
233,
0
]
}, },
"from": [ "from": [
5.55, 5.55,
@ -871,11 +743,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
239,
246,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -936,11 +804,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
37,
64,
0
]
} }
}, },
"tags": { "tags": {
@ -969,11 +833,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
416,
434,
0
]
}, },
"from": [ "from": [
-2.0, -2.0,
@ -992,11 +852,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
440,
459,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -1015,11 +871,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
465,
521,
0
]
}, },
"from": [ "from": [
2.0, 2.0,
@ -1038,11 +890,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
527,
534,
0
]
}, },
"from": [ "from": [
-2.0, -2.0,
@ -1087,22 +935,14 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
70,
89,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
95,
131,
0
],
"tag": { "tag": {
"end": 130, "end": 130,
"start": 124, "start": 124,
@ -1114,11 +954,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
137,
171,
0
],
"tag": { "tag": {
"end": 170, "end": 170,
"start": 164, "start": 164,
@ -1130,11 +966,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
177,
233,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
} }
@ -1146,11 +978,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
70,
89,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -1169,11 +997,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
95,
131,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -1197,11 +1021,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
137,
171,
0
]
}, },
"from": [ "from": [
5.55, 5.55,
@ -1225,11 +1045,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
177,
233,
0
]
}, },
"from": [ "from": [
5.55, 5.55,
@ -1248,11 +1064,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
239,
246,
0
]
}, },
"from": [ "from": [
-5.0, -5.0,
@ -1313,11 +1125,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
37,
64,
0
]
} }
}, },
"tags": { "tags": {
@ -1371,11 +1179,7 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
383,
410,
0
]
} }
}, },
"artifactId": "[uuid]", "artifactId": "[uuid]",

View File

@ -0,0 +1,20 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing artifact_graph_example_code1.kcl
---
sketch001 = startSketchOn('XY')
|> startProfileAt([-5, -5], %)
|> line(end = [0, 10])
|> line(end = [10.55, 0], tag = $seg01)
|> line(end = [0, -10], tag = $seg02)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
extrude001 = extrude(sketch001, length = -10)
|> fillet(radius = 5, tags = [seg01])
sketch002 = startSketchOn(extrude001, seg02)
|> startProfileAt([-2, -6], %)
|> line(end = [2, 3])
|> line(end = [2, -3])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
extrude002 = extrude(sketch002, length = 5)

View File

@ -5,11 +5,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
12,
31,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
65,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
65,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
65,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
65,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
71,
121,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
127,
227,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
233,
353,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
359,
415,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -227,11 +175,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
421,
428,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -239,11 +183,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
441,
461,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -268,11 +208,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
467,
496,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -288,22 +224,14 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
467,
496,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
467,
496,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -316,22 +244,14 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
467,
496,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
502,
527,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -348,11 +268,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
533,
559,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -369,11 +285,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
565,
597,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",

View File

@ -7,9 +7,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 428, "end": 0,
"id": { "id": {
"end": 9, "end": 0,
"name": "sketch003", "name": "sketch003",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -19,22 +19,22 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 30, "end": 0,
"raw": "'YZ'", "raw": "'YZ'",
"start": 26, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "YZ" "value": "YZ"
} }
], ],
"callee": { "callee": {
"end": 25, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 12, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 31, "end": 0,
"start": 12, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -43,9 +43,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"elements": [ "elements": [
{ {
"end": 57, "end": 0,
"raw": "5.82", "raw": "5.82",
"start": 53, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -54,9 +54,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
}, },
{ {
"end": 60, "end": 0,
"raw": "0", "raw": "0",
"start": 59, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -65,26 +65,26 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
} }
], ],
"end": 61, "end": 0,
"start": 52, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 64, "end": 0,
"start": 63, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 51, "end": 0,
"name": "startProfileAt", "name": "startProfileAt",
"start": 37, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 65, "end": 0,
"start": 37, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -93,9 +93,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"elements": [ "elements": [
{ {
"end": 86, "end": 0,
"raw": "180", "raw": "180",
"start": 83, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -104,9 +104,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
}, },
{ {
"end": 93, "end": 0,
"raw": "11.54", "raw": "11.54",
"start": 88, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -115,33 +115,33 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
} }
], ],
"end": 94, "end": 0,
"start": 82, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 97, "end": 0,
"start": 96, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
}, },
{ {
"end": 120, "end": 0,
"start": 99, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "rectangleSegmentA001" "value": "rectangleSegmentA001"
} }
], ],
"callee": { "callee": {
"end": 81, "end": 0,
"name": "angledLine", "name": "angledLine",
"start": 71, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 121, "end": 0,
"start": 71, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -150,33 +150,33 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"elements": [ "elements": [
{ {
"end": 180, "end": 0,
"left": { "left": {
"arguments": [ "arguments": [
{ {
"end": 174, "end": 0,
"name": "rectangleSegmentA001", "name": "rectangleSegmentA001",
"start": 154, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 153, "end": 0,
"name": "segAng", "name": "segAng",
"start": 147, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 175, "end": 0,
"start": 147, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"operator": "-", "operator": "-",
"right": { "right": {
"end": 180, "end": 0,
"raw": "90", "raw": "90",
"start": 178, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -184,14 +184,14 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 147, "start": 0,
"type": "BinaryExpression", "type": "BinaryExpression",
"type": "BinaryExpression" "type": "BinaryExpression"
}, },
{ {
"end": 193, "end": 0,
"raw": "8.21", "raw": "8.21",
"start": 189, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -200,33 +200,33 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
} }
], ],
"end": 200, "end": 0,
"start": 138, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 203, "end": 0,
"start": 202, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
}, },
{ {
"end": 226, "end": 0,
"start": 205, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "rectangleSegmentB001" "value": "rectangleSegmentB001"
} }
], ],
"callee": { "callee": {
"end": 137, "end": 0,
"name": "angledLine", "name": "angledLine",
"start": 127, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 227, "end": 0,
"start": 127, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -237,21 +237,21 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 280, "end": 0,
"name": "rectangleSegmentA001", "name": "rectangleSegmentA001",
"start": 260, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 259, "end": 0,
"name": "segAng", "name": "segAng",
"start": 253, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 281, "end": 0,
"start": 253, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -259,58 +259,58 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
"argument": { "argument": {
"arguments": [ "arguments": [
{ {
"end": 318, "end": 0,
"name": "rectangleSegmentA001", "name": "rectangleSegmentA001",
"start": 298, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 297, "end": 0,
"name": "segLen", "name": "segLen",
"start": 291, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 319, "end": 0,
"start": 291, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"end": 319, "end": 0,
"operator": "-", "operator": "-",
"start": 290, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 326, "end": 0,
"start": 244, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 329, "end": 0,
"start": 328, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
}, },
{ {
"end": 352, "end": 0,
"start": 331, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "rectangleSegmentC001" "value": "rectangleSegmentC001"
} }
], ],
"callee": { "callee": {
"end": 243, "end": 0,
"name": "angledLine", "name": "angledLine",
"start": 233, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 353, "end": 0,
"start": 233, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -319,9 +319,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 375, "end": 0,
"name": "endAbsolute", "name": "endAbsolute",
"start": 364, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
@ -329,59 +329,59 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 394, "end": 0,
"start": 393, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 392, "end": 0,
"name": "profileStartX", "name": "profileStartX",
"start": 379, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 395, "end": 0,
"start": 379, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
{ {
"arguments": [ "arguments": [
{ {
"end": 412, "end": 0,
"start": 411, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 410, "end": 0,
"name": "profileStartY", "name": "profileStartY",
"start": 397, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 413, "end": 0,
"start": 397, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"end": 414, "end": 0,
"start": 378, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 363, "end": 0,
"name": "line", "name": "line",
"start": 359, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 415, "end": 0,
"start": 359, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -389,26 +389,26 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"arguments": [], "arguments": [],
"callee": { "callee": {
"end": 426, "end": 0,
"name": "close", "name": "close",
"start": 421, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 428, "end": 0,
"start": 421, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"end": 428, "end": 0,
"start": 12, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 428, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
@ -416,11 +416,11 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
}, },
{ {
"declaration": { "declaration": {
"end": 597, "end": 0,
"id": { "id": {
"end": 438, "end": 0,
"name": "sketch004", "name": "sketch004",
"start": 429, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
@ -428,22 +428,22 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 460, "end": 0,
"raw": "'-XZ'", "raw": "'-XZ'",
"start": 455, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "-XZ" "value": "-XZ"
} }
], ],
"callee": { "callee": {
"end": 454, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 441, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 461, "end": 0,
"start": 441, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -452,9 +452,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"elements": [ "elements": [
{ {
"end": 484, "end": 0,
"raw": "0", "raw": "0",
"start": 483, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -463,9 +463,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
}, },
{ {
"end": 491, "end": 0,
"raw": "14.36", "raw": "14.36",
"start": 486, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -474,26 +474,26 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
} }
], ],
"end": 492, "end": 0,
"start": 482, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 495, "end": 0,
"start": 494, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 481, "end": 0,
"name": "startProfileAt", "name": "startProfileAt",
"start": 467, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 496, "end": 0,
"start": 467, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -502,17 +502,17 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 510, "end": 0,
"name": "end", "name": "end",
"start": 507, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 519, "end": 0,
"raw": "15.49", "raw": "15.49",
"start": 514, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -521,9 +521,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
}, },
{ {
"end": 525, "end": 0,
"raw": "0.05", "raw": "0.05",
"start": 521, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -532,21 +532,21 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
} }
], ],
"end": 526, "end": 0,
"start": 513, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 506, "end": 0,
"name": "line", "name": "line",
"start": 502, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 527, "end": 0,
"start": 502, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -556,9 +556,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
{ {
"elements": [ "elements": [
{ {
"end": 551, "end": 0,
"raw": "0", "raw": "0",
"start": 550, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -567,9 +567,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
}, },
{ {
"end": 554, "end": 0,
"raw": "0", "raw": "0",
"start": 553, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -578,26 +578,26 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
} }
], ],
"end": 555, "end": 0,
"start": 549, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 558, "end": 0,
"start": 557, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 548, "end": 0,
"name": "tangentialArcTo", "name": "tangentialArcTo",
"start": 533, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 559, "end": 0,
"start": 533, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -607,9 +607,9 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
"elements": [ "elements": [
{ {
"argument": { "argument": {
"end": 586, "end": 0,
"raw": "6.8", "raw": "6.8",
"start": 583, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -617,16 +617,16 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 586, "end": 0,
"operator": "-", "operator": "-",
"start": 582, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
}, },
{ {
"end": 592, "end": 0,
"raw": "8.17", "raw": "8.17",
"start": 588, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -635,46 +635,46 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
} }
} }
], ],
"end": 593, "end": 0,
"start": 581, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 596, "end": 0,
"start": 595, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 580, "end": 0,
"name": "tangentialArcTo", "name": "tangentialArcTo",
"start": 565, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 597, "end": 0,
"start": 565, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"end": 597, "end": 0,
"start": 441, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 429, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 597, "end": 0,
"kind": "const", "kind": "const",
"start": 429, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 598, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -1,5 +1,5 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl-lib/src/simulation_tests.rs
description: Operations executed artifact_graph_example_code_no_3d.kcl description: Operations executed artifact_graph_example_code_no_3d.kcl
--- ---
[ [
@ -10,19 +10,11 @@ description: Operations executed artifact_graph_example_code_no_3d.kcl
"type": "String", "type": "String",
"value": "YZ" "value": "YZ"
}, },
"sourceRange": [ "sourceRange": []
26,
30,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
12,
31,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -33,19 +25,11 @@ description: Operations executed artifact_graph_example_code_no_3d.kcl
"type": "String", "type": "String",
"value": "-XZ" "value": "-XZ"
}, },
"sourceRange": [ "sourceRange": []
455,
460,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
441,
461,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
} }

View File

@ -27,11 +27,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
71,
121,
0
]
}, },
"from": [ "from": [
5.82, 5.82,
@ -55,11 +51,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
127,
227,
0
]
}, },
"from": [ "from": [
-5.72, -5.72,
@ -83,11 +75,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
233,
353,
0
]
}, },
"from": [ "from": [
-5.72, -5.72,
@ -111,11 +99,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
359,
415,
0
]
}, },
"from": [ "from": [
5.82, 5.82,
@ -134,11 +118,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
421,
428,
0
]
}, },
"from": [ "from": [
5.82, 5.82,
@ -199,11 +179,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
37,
65,
0
]
} }
}, },
"tags": { "tags": {
@ -236,11 +212,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
502,
527,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -259,11 +231,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
533,
559,
0
]
}, },
"ccw": false, "ccw": false,
"center": [ "center": [
@ -287,11 +255,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
565,
597,
0
]
}, },
"ccw": true, "ccw": true,
"center": [ "center": [
@ -357,11 +321,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
467,
496,
0
]
} }
}, },
"artifactId": "[uuid]", "artifactId": "[uuid]",

View File

@ -0,0 +1,22 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing artifact_graph_example_code_no_3d.kcl
---
sketch003 = startSketchOn('YZ')
|> startProfileAt([5.82, 0], %)
|> angledLine([180, 11.54], %, $rectangleSegmentA001)
|> angledLine([
segAng(rectangleSegmentA001) - 90,
8.21
], %, $rectangleSegmentB001)
|> angledLine([
segAng(rectangleSegmentA001),
-segLen(rectangleSegmentA001)
], %, $rectangleSegmentC001)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
sketch004 = startSketchOn('-XZ')
|> startProfileAt([0, 14.36], %)
|> line(end = [15.49, 0.05])
|> tangentialArcTo([0, 0], %)
|> tangentialArcTo([-6.8, 8.17], %)

View File

@ -5,11 +5,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
17,
47,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
17,
47,
0
],
"command": { "command": {
"type": "plane_set_color", "type": "plane_set_color",
"plane_id": "[uuid]", "plane_id": "[uuid]",
@ -102,11 +78,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
65,
96,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -131,11 +103,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
65,
96,
0
],
"command": { "command": {
"type": "plane_set_color", "type": "plane_set_color",
"plane_id": "[uuid]", "plane_id": "[uuid]",
@ -149,11 +117,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
114,
144,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -178,11 +142,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
114,
144,
0
],
"command": { "command": {
"type": "plane_set_color", "type": "plane_set_color",
"plane_id": "[uuid]", "plane_id": "[uuid]",
@ -196,11 +156,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
193,
218,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -216,22 +172,14 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
193,
218,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
193,
218,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -244,22 +192,14 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
193,
218,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
224,
249,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -276,11 +216,7 @@ description: Artifact commands artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
193,
218,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,9 +7,9 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 47, "end": 0,
"id": { "id": {
"end": 14, "end": 0,
"name": "offsetPlane001", "name": "offsetPlane001",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -19,15 +19,15 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 41, "end": 0,
"name": "offset", "name": "offset",
"start": 35, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 46, "end": 0,
"raw": "20", "raw": "20",
"start": 44, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -38,19 +38,19 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
} }
], ],
"callee": { "callee": {
"end": 28, "end": 0,
"name": "offsetPlane", "name": "offsetPlane",
"start": 17, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 47, "end": 0,
"start": 17, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"end": 33, "end": 0,
"raw": "\"XY\"", "raw": "\"XY\"",
"start": 29, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XY" "value": "XY"
@ -59,7 +59,7 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 47, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
@ -67,11 +67,11 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
}, },
{ {
"declaration": { "declaration": {
"end": 96, "end": 0,
"id": { "id": {
"end": 62, "end": 0,
"name": "offsetPlane002", "name": "offsetPlane002",
"start": 48, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
@ -79,16 +79,16 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 89, "end": 0,
"name": "offset", "name": "offset",
"start": 83, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"argument": { "argument": {
"end": 95, "end": 0,
"raw": "50", "raw": "50",
"start": 93, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -96,49 +96,49 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 95, "end": 0,
"operator": "-", "operator": "-",
"start": 92, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 76, "end": 0,
"name": "offsetPlane", "name": "offsetPlane",
"start": 65, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 96, "end": 0,
"start": 65, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"end": 81, "end": 0,
"raw": "\"XZ\"", "raw": "\"XZ\"",
"start": 77, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XZ" "value": "XZ"
} }
}, },
"start": 48, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 96, "end": 0,
"kind": "const", "kind": "const",
"start": 48, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 144, "end": 0,
"id": { "id": {
"end": 111, "end": 0,
"name": "offsetPlane003", "name": "offsetPlane003",
"start": 97, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
@ -146,15 +146,15 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 138, "end": 0,
"name": "offset", "name": "offset",
"start": 132, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 143, "end": 0,
"raw": "10", "raw": "10",
"start": 141, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -165,40 +165,40 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
} }
], ],
"callee": { "callee": {
"end": 125, "end": 0,
"name": "offsetPlane", "name": "offsetPlane",
"start": 114, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 144, "end": 0,
"start": 114, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"end": 130, "end": 0,
"raw": "\"YZ\"", "raw": "\"YZ\"",
"start": 126, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "YZ" "value": "YZ"
} }
}, },
"start": 97, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 144, "end": 0,
"kind": "const", "kind": "const",
"start": 97, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 249, "end": 0,
"id": { "id": {
"end": 155, "end": 0,
"name": "sketch002", "name": "sketch002",
"start": 146, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
@ -206,21 +206,21 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 186, "end": 0,
"name": "offsetPlane001", "name": "offsetPlane001",
"start": 172, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 171, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 158, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 187, "end": 0,
"start": 158, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -229,9 +229,9 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
{ {
"elements": [ "elements": [
{ {
"end": 210, "end": 0,
"raw": "0", "raw": "0",
"start": 209, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -240,9 +240,9 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
} }
}, },
{ {
"end": 213, "end": 0,
"raw": "0", "raw": "0",
"start": 212, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -251,26 +251,26 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
} }
} }
], ],
"end": 214, "end": 0,
"start": 208, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 217, "end": 0,
"start": 216, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 207, "end": 0,
"name": "startProfileAt", "name": "startProfileAt",
"start": 193, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 218, "end": 0,
"start": 193, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -279,17 +279,17 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 232, "end": 0,
"name": "end", "name": "end",
"start": 229, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 240, "end": 0,
"raw": "6.78", "raw": "6.78",
"start": 236, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -298,9 +298,9 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
} }
}, },
{ {
"end": 247, "end": 0,
"raw": "15.01", "raw": "15.01",
"start": 242, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -309,48 +309,48 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
} }
} }
], ],
"end": 248, "end": 0,
"start": 235, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 228, "end": 0,
"name": "line", "name": "line",
"start": 224, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 249, "end": 0,
"start": 224, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
} }
], ],
"end": 249, "end": 0,
"start": 158, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 146, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 249, "end": 0,
"kind": "const", "kind": "const",
"start": 146, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 250, "end": 0,
"nonCodeMeta": { "nonCodeMeta": {
"nonCodeNodes": { "nonCodeNodes": {
"2": [ "2": [
{ {
"end": 146, "end": 0,
"start": 144, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLine" "type": "newLine"

View File

@ -1,5 +1,5 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl-lib/src/simulation_tests.rs
description: Operations executed artifact_graph_example_code_offset_planes.kcl description: Operations executed artifact_graph_example_code_offset_planes.kcl
--- ---
[ [
@ -19,30 +19,18 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
44,
46,
0
]
} }
}, },
"name": "offsetPlane", "name": "offsetPlane",
"sourceRange": [ "sourceRange": [],
17,
47,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
29,
33,
0
]
} }
}, },
{ {
@ -61,30 +49,18 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
92,
95,
0
]
} }
}, },
"name": "offsetPlane", "name": "offsetPlane",
"sourceRange": [ "sourceRange": [],
65,
96,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "String",
"value": "XZ" "value": "XZ"
}, },
"sourceRange": [ "sourceRange": []
77,
81,
0
]
} }
}, },
{ {
@ -103,30 +79,18 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
141,
143,
0
]
} }
}, },
"name": "offsetPlane", "name": "offsetPlane",
"sourceRange": [ "sourceRange": [],
114,
144,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
"type": "String", "type": "String",
"value": "YZ" "value": "YZ"
}, },
"sourceRange": [ "sourceRange": []
126,
130,
0
]
} }
}, },
{ {
@ -136,19 +100,11 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
"type": "Plane", "type": "Plane",
"artifact_id": "[uuid]" "artifact_id": "[uuid]"
}, },
"sourceRange": [ "sourceRange": []
172,
186,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
158,
187,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
} }

View File

@ -105,11 +105,7 @@ description: Variables in memory after executing artifact_graph_example_code_off
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
224,
249,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -170,11 +166,7 @@ description: Variables in memory after executing artifact_graph_example_code_off
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
193,
218,
0
]
} }
}, },
"artifactId": "[uuid]", "artifactId": "[uuid]",

View File

@ -0,0 +1,11 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing artifact_graph_example_code_offset_planes.kcl
---
offsetPlane001 = offsetPlane("XY", offset = 20)
offsetPlane002 = offsetPlane("XZ", offset = -50)
offsetPlane003 = offsetPlane("YZ", offset = 10)
sketch002 = startSketchOn(offsetPlane001)
|> startProfileAt([0, 0], %)
|> line(end = [6.78, 15.01])

View File

@ -5,11 +5,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
12,
31,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
62,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
62,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
62,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
37,
62,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
68,
86,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
92,
125,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
131,
187,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
193,
200,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -218,11 +166,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -238,11 +182,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -252,22 +192,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -275,11 +207,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -288,11 +216,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -302,11 +226,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -316,11 +236,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -330,11 +246,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -344,11 +256,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -358,11 +266,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
214,
244,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -372,11 +276,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
295,
325,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -388,22 +288,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
295,
325,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
295,
325,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -416,22 +308,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
295,
325,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
331,
349,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -448,11 +332,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
355,
374,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -469,11 +349,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
380,
436,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -490,11 +366,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
442,
449,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -502,11 +374,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -518,11 +386,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -532,22 +396,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -555,11 +411,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -568,11 +420,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -582,11 +430,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -596,11 +440,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -610,11 +450,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -624,11 +460,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -638,11 +470,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
463,
493,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -652,11 +480,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
544,
571,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -668,22 +492,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
544,
571,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
544,
571,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -696,22 +512,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
544,
571,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
577,
611,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -728,11 +536,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
617,
636,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -749,11 +553,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
642,
698,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -770,11 +570,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
704,
711,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -782,11 +578,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -798,11 +590,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -812,22 +600,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -835,11 +615,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -848,11 +624,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -862,11 +634,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -876,11 +644,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -890,11 +654,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -904,11 +664,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -918,11 +674,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
725,
755,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -932,11 +684,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
806,
833,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -948,22 +696,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
806,
833,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
806,
833,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -976,22 +716,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
806,
833,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
839,
859,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -1008,11 +740,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
865,
886,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -1029,11 +757,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
892,
948,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -1050,11 +774,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
954,
961,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -1062,11 +782,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -1078,11 +794,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -1092,22 +804,14 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -1115,11 +819,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -1128,11 +828,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -1142,11 +838,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -1156,11 +848,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -1170,11 +858,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -1184,11 +868,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -1198,11 +878,7 @@ description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
975,
1005,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl-lib/src/simulation_tests.rs
description: Operations executed artifact_graph_sketch_on_face_etc.kcl description: Operations executed artifact_graph_sketch_on_face_etc.kcl
--- ---
[ [
@ -10,19 +10,11 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"type": "String", "type": "String",
"value": "XZ" "value": "XZ"
}, },
"sourceRange": [ "sourceRange": []
26,
30,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
12,
31,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -42,19 +34,11 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
242,
243,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
214,
244,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -63,11 +47,7 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
222,
231,
0
]
} }
}, },
{ {
@ -79,11 +59,7 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
271,
281,
0
]
}, },
"tag": { "tag": {
"value": { "value": {
@ -91,19 +67,11 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"value": "seg01", "value": "seg01",
"artifact_id": "[uuid]" "artifact_id": "[uuid]"
}, },
"sourceRange": [ "sourceRange": []
283,
288,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
257,
289,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -123,19 +91,11 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
491,
492,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
463,
493,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -144,11 +104,7 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
471,
480,
0
]
} }
}, },
{ {
@ -160,30 +116,18 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
520,
530,
0
]
}, },
"tag": { "tag": {
"value": { "value": {
"type": "String", "type": "String",
"value": "END" "value": "END"
}, },
"sourceRange": [ "sourceRange": []
532,
537,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
506,
538,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -203,19 +147,11 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
753,
754,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
725,
755,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -224,11 +160,7 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
733,
742,
0
]
} }
}, },
{ {
@ -240,11 +172,7 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
782,
792,
0
]
}, },
"tag": { "tag": {
"value": { "value": {
@ -252,19 +180,11 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"value": "seg02", "value": "seg02",
"artifact_id": "[uuid]" "artifact_id": "[uuid]"
}, },
"sourceRange": [ "sourceRange": []
794,
799,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
768,
800,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -284,19 +204,11 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
1003,
1004,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
975,
1005,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -305,11 +217,7 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
983,
992,
0
]
} }
} }
] ]

View File

@ -0,0 +1,32 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing artifact_graph_sketch_on_face_etc.kcl
---
sketch001 = startSketchOn('XZ')
|> startProfileAt([0, 0], %)
|> line(end = [4, 8])
|> line(end = [5, -8], tag = $seg01)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
extrude001 = extrude(sketch001, length = 6)
sketch002 = startSketchOn(extrude001, seg01)
|> startProfileAt([-0.5, 0.5], %)
|> line(end = [2, 5])
|> line(end = [2, -5])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
extrude002 = extrude(sketch002, length = 5)
sketch003 = startSketchOn(extrude002, 'END')
|> startProfileAt([1, 1.5], %)
|> line(end = [0.5, 2], tag = $seg02)
|> line(end = [1, -2])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
extrude003 = extrude(sketch003, length = 4)
sketch004 = startSketchOn(extrude003, seg02)
|> startProfileAt([-3, 14], %)
|> line(end = [0.5, 1])
|> line(end = [0.5, -2])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
extrude004 = extrude(sketch004, length = 3)

View File

@ -5,11 +5,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
33,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "in" "unit": "in"
@ -67,11 +47,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
33,
3
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "in" "unit": "in"
@ -79,11 +55,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
48,
67,
3
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -108,11 +80,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
77,
114,
3
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -128,22 +96,14 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
77,
114,
3
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
77,
114,
3
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -156,22 +116,14 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
77,
114,
3
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
120,
137,
3
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -188,11 +140,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
143,
161,
3
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -209,11 +157,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
167,
185,
3
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -230,11 +174,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
191,
247,
3
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -251,11 +191,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
253,
260,
3
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -263,11 +199,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -283,11 +215,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -297,22 +225,14 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -320,11 +240,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -333,11 +249,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -347,11 +259,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -361,11 +269,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -375,11 +279,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -389,11 +289,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -403,11 +299,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -417,11 +309,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -431,11 +319,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
266,
288,
3
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -445,11 +329,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
33,
4
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -457,11 +337,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
48,
67,
4
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -486,11 +362,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
77,
112,
4
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -506,22 +378,14 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
77,
112,
4
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
77,
112,
4
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -534,22 +398,14 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
77,
112,
4
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
118,
135,
4
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -566,11 +422,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
141,
159,
4
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -587,11 +439,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
165,
183,
4
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -608,11 +456,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
189,
245,
4
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -629,11 +473,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
251,
258,
4
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -641,11 +481,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -661,11 +497,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -675,22 +507,14 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -698,11 +522,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -711,11 +531,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -725,11 +541,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -739,11 +551,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -753,11 +561,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -767,11 +571,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -781,11 +581,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -795,11 +591,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -809,11 +601,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
264,
286,
4
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -823,11 +611,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "in" "unit": "in"

View File

@ -6,7 +6,7 @@ description: Result of parsing assembly_mixed_units_cubes.kcl
"Ok": { "Ok": {
"body": [ "body": [
{ {
"end": 70, "end": 0,
"path": { "path": {
"type": "Kcl", "type": "Kcl",
"filename": "cube-inches.kcl" "filename": "cube-inches.kcl"
@ -14,18 +14,18 @@ description: Result of parsing assembly_mixed_units_cubes.kcl
"selector": { "selector": {
"type": "None", "type": "None",
"alias": { "alias": {
"end": 70, "end": 0,
"name": "cubeIn", "name": "cubeIn",
"start": 64, "start": 0,
"type": "Identifier" "type": "Identifier"
} }
}, },
"start": 36, "start": 0,
"type": "ImportStatement", "type": "ImportStatement",
"type": "ImportStatement" "type": "ImportStatement"
}, },
{ {
"end": 101, "end": 0,
"path": { "path": {
"type": "Kcl", "type": "Kcl",
"filename": "cube-mm.kcl" "filename": "cube-mm.kcl"
@ -33,68 +33,68 @@ description: Result of parsing assembly_mixed_units_cubes.kcl
"selector": { "selector": {
"type": "None", "type": "None",
"alias": { "alias": {
"end": 101, "end": 0,
"name": "cubeMm", "name": "cubeMm",
"start": 95, "start": 0,
"type": "Identifier" "type": "Identifier"
} }
}, },
"start": 71, "start": 0,
"type": "ImportStatement", "type": "ImportStatement",
"type": "ImportStatement" "type": "ImportStatement"
}, },
{ {
"end": 109, "end": 0,
"expression": { "expression": {
"end": 109, "end": 0,
"name": "cubeIn", "name": "cubeIn",
"start": 103, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"start": 103, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 116, "end": 0,
"expression": { "expression": {
"end": 116, "end": 0,
"name": "cubeMm", "name": "cubeMm",
"start": 110, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"start": 110, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
} }
], ],
"end": 117, "end": 0,
"innerAttrs": [ "innerAttrs": [
{ {
"end": 33, "end": 0,
"name": { "name": {
"end": 9, "end": 0,
"name": "settings", "name": "settings",
"start": 1, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"properties": [ "properties": [
{ {
"end": 32, "end": 0,
"key": { "key": {
"end": 27, "end": 0,
"name": "defaultLengthUnit", "name": "defaultLengthUnit",
"start": 10, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"start": 10, "start": 0,
"type": "ObjectProperty", "type": "ObjectProperty",
"value": { "value": {
"end": 32, "end": 0,
"name": "in", "name": "in",
"start": 30, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
@ -108,8 +108,8 @@ description: Result of parsing assembly_mixed_units_cubes.kcl
"nonCodeNodes": { "nonCodeNodes": {
"1": [ "1": [
{ {
"end": 103, "end": 0,
"start": 101, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLine" "type": "newLine"
@ -119,8 +119,8 @@ description: Result of parsing assembly_mixed_units_cubes.kcl
}, },
"startNodes": [ "startNodes": [
{ {
"end": 36, "end": 0,
"start": 33, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLine" "type": "newLine"

View File

@ -10,19 +10,11 @@ description: Operations executed assembly_mixed_units_cubes.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
62,
66,
3
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
48,
67,
3
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -42,19 +34,11 @@ description: Operations executed assembly_mixed_units_cubes.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
286,
287,
3
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
266,
288,
3
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -63,11 +47,7 @@ description: Operations executed assembly_mixed_units_cubes.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
274,
275,
3
]
} }
}, },
{ {
@ -77,19 +57,11 @@ description: Operations executed assembly_mixed_units_cubes.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
62,
66,
4
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
48,
67,
4
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -109,19 +81,11 @@ description: Operations executed assembly_mixed_units_cubes.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
284,
285,
4
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
264,
286,
4
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -130,11 +94,7 @@ description: Operations executed assembly_mixed_units_cubes.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
272,
273,
4
]
} }
} }
] ]

View File

@ -0,0 +1,12 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing assembly_mixed_units_cubes.kcl
---
@settings(defaultLengthUnit = in)
import "cube-inches.kcl" as cubeIn
import "cube-mm.kcl" as cubeMm
cubeIn
cubeMm

View File

@ -0,0 +1,15 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing tests/assembly_mixed_units_cubes/cube-inches.kcl
---
@settings(defaultLengthUnit = in)
sketch001 = startSketchOn('XY')
cubeIn = startProfileAt([-10, -10], sketch001)
|> xLine(length = 5)
|> yLine(length = -5)
|> xLine(length = -5)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> extrude(%, length = 5)

View File

@ -0,0 +1,15 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing tests/assembly_mixed_units_cubes/cube-mm.kcl
---
@settings(defaultLengthUnit = mm)
sketch001 = startSketchOn('XY')
cubeMm = startProfileAt([10, 10], sketch001)
|> xLine(length = 5)
|> yLine(length = -5)
|> xLine(length = -5)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> extrude(%, length = 5)

View File

@ -5,11 +5,7 @@ description: Artifact commands assembly_non_default_units.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
33,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "in" "unit": "in"
@ -67,11 +47,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
33,
3
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "in" "unit": "in"
@ -79,11 +55,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
173,
192,
3
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -108,11 +80,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
198,
233,
3
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -128,22 +96,14 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
198,
233,
3
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
198,
233,
3
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -156,22 +116,14 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
198,
233,
3
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
198,
233,
3
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -196,11 +148,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
198,
233,
3
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -208,11 +156,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
33,
4
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "in" "unit": "in"
@ -220,11 +164,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
89,
108,
4
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -249,11 +189,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
114,
149,
4
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -269,22 +205,14 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
114,
149,
4
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
114,
149,
4
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -297,22 +225,14 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
114,
149,
4
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
114,
149,
4
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -337,11 +257,7 @@ description: Artifact commands assembly_non_default_units.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
114,
149,
4
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"

View File

@ -6,7 +6,7 @@ description: Result of parsing assembly_non_default_units.kcl
"Ok": { "Ok": {
"body": [ "body": [
{ {
"end": 172, "end": 0,
"path": { "path": {
"type": "Kcl", "type": "Kcl",
"filename": "other1.kcl" "filename": "other1.kcl"
@ -15,12 +15,12 @@ description: Result of parsing assembly_non_default_units.kcl
"type": "None", "type": "None",
"alias": null "alias": null
}, },
"start": 153, "start": 0,
"type": "ImportStatement", "type": "ImportStatement",
"type": "ImportStatement" "type": "ImportStatement"
}, },
{ {
"end": 192, "end": 0,
"path": { "path": {
"type": "Kcl", "type": "Kcl",
"filename": "other2.kcl" "filename": "other2.kcl"
@ -29,62 +29,62 @@ description: Result of parsing assembly_non_default_units.kcl
"type": "None", "type": "None",
"alias": null "alias": null
}, },
"start": 173, "start": 0,
"type": "ImportStatement", "type": "ImportStatement",
"type": "ImportStatement" "type": "ImportStatement"
}, },
{ {
"end": 200, "end": 0,
"expression": { "expression": {
"end": 200, "end": 0,
"name": "other1", "name": "other1",
"start": 194, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"start": 194, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
}, },
{ {
"end": 207, "end": 0,
"expression": { "expression": {
"end": 207, "end": 0,
"name": "other2", "name": "other2",
"start": 201, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"start": 201, "start": 0,
"type": "ExpressionStatement", "type": "ExpressionStatement",
"type": "ExpressionStatement" "type": "ExpressionStatement"
} }
], ],
"end": 208, "end": 0,
"innerAttrs": [ "innerAttrs": [
{ {
"end": 33, "end": 0,
"name": { "name": {
"end": 9, "end": 0,
"name": "settings", "name": "settings",
"start": 1, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"properties": [ "properties": [
{ {
"end": 32, "end": 0,
"key": { "key": {
"end": 27, "end": 0,
"name": "defaultLengthUnit", "name": "defaultLengthUnit",
"start": 10, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"start": 10, "start": 0,
"type": "ObjectProperty", "type": "ObjectProperty",
"value": { "value": {
"end": 32, "end": 0,
"name": "in", "name": "in",
"start": 30, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
@ -98,8 +98,8 @@ description: Result of parsing assembly_non_default_units.kcl
"nonCodeNodes": { "nonCodeNodes": {
"1": [ "1": [
{ {
"end": 194, "end": 0,
"start": 192, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLine" "type": "newLine"
@ -109,16 +109,16 @@ description: Result of parsing assembly_non_default_units.kcl
}, },
"startNodes": [ "startNodes": [
{ {
"end": 36, "end": 0,
"start": 33, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLine" "type": "newLine"
} }
}, },
{ {
"end": 87, "end": 0,
"start": 36, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "blockComment", "type": "blockComment",
@ -127,8 +127,8 @@ description: Result of parsing assembly_non_default_units.kcl
} }
}, },
{ {
"end": 152, "end": 0,
"start": 88, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "blockComment", "type": "blockComment",

View File

@ -10,19 +10,11 @@ description: Operations executed assembly_non_default_units.kcl
"type": "String", "type": "String",
"value": "XZ" "value": "XZ"
}, },
"sourceRange": [ "sourceRange": []
187,
191,
3
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
173,
192,
3
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -33,19 +25,11 @@ description: Operations executed assembly_non_default_units.kcl
"type": "String", "type": "String",
"value": "XZ" "value": "XZ"
}, },
"sourceRange": [ "sourceRange": []
103,
107,
4
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
89,
108,
4
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
} }

View File

@ -0,0 +1,14 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing assembly_non_default_units.kcl
---
@settings(defaultLengthUnit = in)
// Use a default unit that isn't the default of mm.
// This should look like two circles barely touching each other.
import "other1.kcl"
import "other2.kcl"
other1
other2

View File

@ -0,0 +1,8 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing tests/assembly_non_default_units/globals.kcl
---
@settings(defaultLengthUnit = in)
export radius = 1

View File

@ -0,0 +1,13 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing tests/assembly_non_default_units/other1.kcl
---
@settings(defaultLengthUnit = in)
// This is not used, but it triggers the problem.
import radius from "globals.kcl"
// Use the same units as in the main importing file.
startSketchOn('XZ')
|> circle(center = [0, 0], radius = 1)

View File

@ -0,0 +1,10 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing tests/assembly_non_default_units/other2.kcl
---
@settings(defaultLengthUnit = in)
// Use the same units as in the main importing file.
startSketchOn('XZ')
|> circle(center = [0, 2], radius = 1)

View File

@ -5,11 +5,7 @@ description: Artifact commands bad_units_in_annotation.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands bad_units_in_annotation.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands bad_units_in_annotation.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands bad_units_in_annotation.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,17 +7,17 @@ description: Result of parsing bad_units_in_annotation.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 143, "end": 0,
"id": { "id": {
"end": 135, "end": 0,
"name": "oxygenRadius", "name": "oxygenRadius",
"start": 123, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"end": 143, "end": 0,
"raw": "0.066", "raw": "0.066",
"start": 138, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -25,28 +25,28 @@ description: Result of parsing bad_units_in_annotation.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 123, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 143, "end": 0,
"kind": "const", "kind": "const",
"start": 123, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 206, "end": 0,
"id": { "id": {
"end": 198, "end": 0,
"name": "hydrogenRadius", "name": "hydrogenRadius",
"start": 184, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"end": 206, "end": 0,
"raw": "0.053", "raw": "0.053",
"start": 201, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -54,28 +54,28 @@ description: Result of parsing bad_units_in_annotation.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 184, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 206, "end": 0,
"kind": "const", "kind": "const",
"start": 184, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 278, "end": 0,
"id": { "id": {
"end": 270, "end": 0,
"name": "oxygenHydrogenDistance", "name": "oxygenHydrogenDistance",
"start": 248, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"end": 278, "end": 0,
"raw": "0.096", "raw": "0.096",
"start": 273, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -83,28 +83,28 @@ description: Result of parsing bad_units_in_annotation.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 248, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 278, "end": 0,
"kind": "const", "kind": "const",
"start": 248, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 354, "end": 0,
"id": { "id": {
"end": 346, "end": 0,
"name": "bondAngle", "name": "bondAngle",
"start": 337, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"end": 354, "end": 0,
"raw": "104.5", "raw": "104.5",
"start": 349, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -112,22 +112,22 @@ description: Result of parsing bad_units_in_annotation.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 337, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 354, "end": 0,
"kind": "const", "kind": "const",
"start": 337, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 580, "end": 0,
"id": { "id": {
"end": 447, "end": 0,
"name": "createAtom", "name": "createAtom",
"start": 437, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
@ -139,22 +139,22 @@ description: Result of parsing bad_units_in_annotation.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 493, "end": 0,
"raw": "'XY'", "raw": "'XY'",
"start": 489, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XY" "value": "XY"
} }
], ],
"callee": { "callee": {
"end": 488, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 475, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 494, "end": 0,
"start": 475, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -163,15 +163,15 @@ description: Result of parsing bad_units_in_annotation.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 515, "end": 0,
"name": "center", "name": "center",
"start": 509, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 524, "end": 0,
"name": "center", "name": "center",
"start": 518, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
@ -179,28 +179,28 @@ description: Result of parsing bad_units_in_annotation.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 532, "end": 0,
"name": "radius", "name": "radius",
"start": 526, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 541, "end": 0,
"name": "radius", "name": "radius",
"start": 535, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
} }
], ],
"callee": { "callee": {
"end": 508, "end": 0,
"name": "circle", "name": "circle",
"start": 502, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 542, "end": 0,
"start": 502, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -210,25 +210,25 @@ description: Result of parsing bad_units_in_annotation.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 564, "end": 0,
"name": "length", "name": "length",
"start": 558, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 577, "end": 0,
"left": { "left": {
"end": 573, "end": 0,
"name": "radius", "name": "radius",
"start": 567, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"operator": "*", "operator": "*",
"right": { "right": {
"end": 577, "end": 0,
"raw": "2", "raw": "2",
"start": 576, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -236,80 +236,80 @@ description: Result of parsing bad_units_in_annotation.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 567, "start": 0,
"type": "BinaryExpression", "type": "BinaryExpression",
"type": "BinaryExpression" "type": "BinaryExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 557, "end": 0,
"name": "extrude", "name": "extrude",
"start": 550, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 578, "end": 0,
"start": 550, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
} }
], ],
"end": 578, "end": 0,
"start": 475, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"end": 578, "end": 0,
"start": 468, "start": 0,
"type": "ReturnStatement", "type": "ReturnStatement",
"type": "ReturnStatement" "type": "ReturnStatement"
} }
], ],
"end": 580, "end": 0,
"start": 464 "start": 0
}, },
"end": 580, "end": 0,
"params": [ "params": [
{ {
"type": "Parameter", "type": "Parameter",
"identifier": { "identifier": {
"end": 454, "end": 0,
"name": "center", "name": "center",
"start": 448, "start": 0,
"type": "Identifier" "type": "Identifier"
} }
}, },
{ {
"type": "Parameter", "type": "Parameter",
"identifier": { "identifier": {
"end": 462, "end": 0,
"name": "radius", "name": "radius",
"start": 456, "start": 0,
"type": "Identifier" "type": "Identifier"
} }
} }
], ],
"start": 447, "start": 0,
"type": "FunctionExpression", "type": "FunctionExpression",
"type": "FunctionExpression" "type": "FunctionExpression"
}, },
"start": 437, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 580, "end": 0,
"kind": "fn", "kind": "fn",
"start": 434, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 667, "end": 0,
"id": { "id": {
"end": 632, "end": 0,
"name": "oxygenAtom", "name": "oxygenAtom",
"start": 622, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
@ -317,9 +317,9 @@ description: Result of parsing bad_units_in_annotation.kcl
{ {
"elements": [ "elements": [
{ {
"end": 648, "end": 0,
"raw": "0", "raw": "0",
"start": 647, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -328,9 +328,9 @@ description: Result of parsing bad_units_in_annotation.kcl
} }
}, },
{ {
"end": 651, "end": 0,
"raw": "0", "raw": "0",
"start": 650, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -339,54 +339,54 @@ description: Result of parsing bad_units_in_annotation.kcl
} }
} }
], ],
"end": 652, "end": 0,
"start": 646, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 666, "end": 0,
"name": "oxygenRadius", "name": "oxygenRadius",
"start": 654, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 645, "end": 0,
"name": "createAtom", "name": "createAtom",
"start": 635, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 667, "end": 0,
"start": 635, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 622, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 667, "end": 0,
"kind": "const", "kind": "const",
"start": 622, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 790, "end": 0,
"id": { "id": {
"end": 733, "end": 0,
"name": "hydrogenOffsetX", "name": "hydrogenOffsetX",
"start": 718, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"end": 790, "end": 0,
"left": { "left": {
"end": 758, "end": 0,
"name": "oxygenHydrogenDistance", "name": "oxygenHydrogenDistance",
"start": 736, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
@ -396,19 +396,19 @@ description: Result of parsing bad_units_in_annotation.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 788, "end": 0,
"left": { "left": {
"end": 784, "end": 0,
"name": "bondAngle", "name": "bondAngle",
"start": 775, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"end": 788, "end": 0,
"raw": "2", "raw": "2",
"start": 787, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -416,62 +416,62 @@ description: Result of parsing bad_units_in_annotation.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 775, "start": 0,
"type": "BinaryExpression", "type": "BinaryExpression",
"type": "BinaryExpression" "type": "BinaryExpression"
} }
], ],
"callee": { "callee": {
"end": 774, "end": 0,
"name": "toRadians", "name": "toRadians",
"start": 765, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 789, "end": 0,
"start": 765, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"callee": { "callee": {
"end": 764, "end": 0,
"name": "cos", "name": "cos",
"start": 761, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 790, "end": 0,
"start": 761, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 736, "start": 0,
"type": "BinaryExpression", "type": "BinaryExpression",
"type": "BinaryExpression" "type": "BinaryExpression"
}, },
"start": 718, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 790, "end": 0,
"kind": "const", "kind": "const",
"start": 718, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 863, "end": 0,
"id": { "id": {
"end": 806, "end": 0,
"name": "hydrogenOffsetY", "name": "hydrogenOffsetY",
"start": 791, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"end": 863, "end": 0,
"left": { "left": {
"end": 831, "end": 0,
"name": "oxygenHydrogenDistance", "name": "oxygenHydrogenDistance",
"start": 809, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
@ -481,19 +481,19 @@ description: Result of parsing bad_units_in_annotation.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 861, "end": 0,
"left": { "left": {
"end": 857, "end": 0,
"name": "bondAngle", "name": "bondAngle",
"start": 848, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"end": 861, "end": 0,
"raw": "2", "raw": "2",
"start": 860, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -501,54 +501,54 @@ description: Result of parsing bad_units_in_annotation.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"start": 848, "start": 0,
"type": "BinaryExpression", "type": "BinaryExpression",
"type": "BinaryExpression" "type": "BinaryExpression"
} }
], ],
"callee": { "callee": {
"end": 847, "end": 0,
"name": "toRadians", "name": "toRadians",
"start": 838, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 862, "end": 0,
"start": 838, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"callee": { "callee": {
"end": 837, "end": 0,
"name": "sin", "name": "sin",
"start": 834, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 863, "end": 0,
"start": 834, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 809, "start": 0,
"type": "BinaryExpression", "type": "BinaryExpression",
"type": "BinaryExpression" "type": "BinaryExpression"
}, },
"start": 791, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 863, "end": 0,
"kind": "const", "kind": "const",
"start": 791, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 972, "end": 0,
"id": { "id": {
"end": 907, "end": 0,
"name": "hydrogenAtom1", "name": "hydrogenAtom1",
"start": 894, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
@ -556,60 +556,60 @@ description: Result of parsing bad_units_in_annotation.kcl
{ {
"elements": [ "elements": [
{ {
"end": 937, "end": 0,
"name": "hydrogenOffsetX", "name": "hydrogenOffsetX",
"start": 922, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
{ {
"end": 954, "end": 0,
"name": "hydrogenOffsetY", "name": "hydrogenOffsetY",
"start": 939, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"end": 955, "end": 0,
"start": 921, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 971, "end": 0,
"name": "hydrogenRadius", "name": "hydrogenRadius",
"start": 957, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 920, "end": 0,
"name": "createAtom", "name": "createAtom",
"start": 910, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 972, "end": 0,
"start": 910, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 894, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 972, "end": 0,
"kind": "const", "kind": "const",
"start": 894, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"declaration": { "declaration": {
"end": 1052, "end": 0,
"id": { "id": {
"end": 986, "end": 0,
"name": "hydrogenAtom2", "name": "hydrogenAtom2",
"start": 973, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
@ -618,85 +618,85 @@ description: Result of parsing bad_units_in_annotation.kcl
"elements": [ "elements": [
{ {
"argument": { "argument": {
"end": 1017, "end": 0,
"name": "hydrogenOffsetX", "name": "hydrogenOffsetX",
"start": 1002, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
"end": 1017, "end": 0,
"operator": "-", "operator": "-",
"start": 1001, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
}, },
{ {
"end": 1034, "end": 0,
"name": "hydrogenOffsetY", "name": "hydrogenOffsetY",
"start": 1019, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"end": 1035, "end": 0,
"start": 1000, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 1051, "end": 0,
"name": "hydrogenRadius", "name": "hydrogenRadius",
"start": 1037, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 999, "end": 0,
"name": "createAtom", "name": "createAtom",
"start": 989, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 1052, "end": 0,
"start": 989, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
"start": 973, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 1052, "end": 0,
"kind": "const", "kind": "const",
"start": 973, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 1053, "end": 0,
"innerAttrs": [ "innerAttrs": [
{ {
"end": 33, "end": 0,
"name": { "name": {
"end": 9, "end": 0,
"name": "settings", "name": "settings",
"start": 1, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"properties": [ "properties": [
{ {
"end": 32, "end": 0,
"key": { "key": {
"end": 27, "end": 0,
"name": "defaultLengthUnit", "name": "defaultLengthUnit",
"start": 10, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"start": 10, "start": 0,
"type": "ObjectProperty", "type": "ObjectProperty",
"value": { "value": {
"end": 32, "end": 0,
"name": "nm", "name": "nm",
"start": 30, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
@ -710,8 +710,8 @@ description: Result of parsing bad_units_in_annotation.kcl
"nonCodeNodes": { "nonCodeNodes": {
"0": [ "0": [
{ {
"end": 183, "end": 0,
"start": 143, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "inlineComment", "type": "inlineComment",
@ -722,8 +722,8 @@ description: Result of parsing bad_units_in_annotation.kcl
], ],
"1": [ "1": [
{ {
"end": 247, "end": 0,
"start": 206, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "inlineComment", "type": "inlineComment",
@ -734,8 +734,8 @@ description: Result of parsing bad_units_in_annotation.kcl
], ],
"2": [ "2": [
{ {
"end": 336, "end": 0,
"start": 278, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "inlineComment", "type": "inlineComment",
@ -746,8 +746,8 @@ description: Result of parsing bad_units_in_annotation.kcl
], ],
"3": [ "3": [
{ {
"end": 379, "end": 0,
"start": 354, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "inlineComment", "type": "inlineComment",
@ -756,16 +756,16 @@ description: Result of parsing bad_units_in_annotation.kcl
} }
}, },
{ {
"end": 382, "end": 0,
"start": 379, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLine" "type": "newLine"
} }
}, },
{ {
"end": 433, "end": 0,
"start": 382, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "blockComment", "type": "blockComment",
@ -776,8 +776,8 @@ description: Result of parsing bad_units_in_annotation.kcl
], ],
"4": [ "4": [
{ {
"end": 621, "end": 0,
"start": 580, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLineBlockComment", "type": "newLineBlockComment",
@ -788,8 +788,8 @@ description: Result of parsing bad_units_in_annotation.kcl
], ],
"5": [ "5": [
{ {
"end": 717, "end": 0,
"start": 667, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLineBlockComment", "type": "newLineBlockComment",
@ -800,8 +800,8 @@ description: Result of parsing bad_units_in_annotation.kcl
], ],
"7": [ "7": [
{ {
"end": 893, "end": 0,
"start": 863, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLineBlockComment", "type": "newLineBlockComment",
@ -813,8 +813,8 @@ description: Result of parsing bad_units_in_annotation.kcl
}, },
"startNodes": [ "startNodes": [
{ {
"end": 84, "end": 0,
"start": 34, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "blockComment", "type": "blockComment",
@ -823,16 +823,16 @@ description: Result of parsing bad_units_in_annotation.kcl
} }
}, },
{ {
"end": 87, "end": 0,
"start": 84, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "newLine" "type": "newLine"
} }
}, },
{ {
"end": 122, "end": 0,
"start": 87, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
"value": { "value": {
"type": "blockComment", "type": "blockComment",

View File

@ -0,0 +1,32 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing bad_units_in_annotation.kcl
---
@settings(defaultLengthUnit = nm)
// Generated by Text-to-CAD: draw a water molecule
// Constants for the water molecule
oxygenRadius = 0.066 // Approximate radius of an oxygen atom
hydrogenRadius = 0.053 // Approximate radius of a hydrogen atom
oxygenHydrogenDistance = 0.096 // Approximate distance between oxygen and hydrogen atoms
bondAngle = 104.5 // Bond angle in degrees
// Function to create a sphere representing an atom
fn createAtom(center, radius) {
return startSketchOn('XY')
|> circle(center = center, radius = radius)
|> extrude(length = radius * 2)
}
// Create the oxygen atom at the origin
oxygenAtom = createAtom([0, 0], oxygenRadius)
// Calculate the positions of the hydrogen atoms
hydrogenOffsetX = oxygenHydrogenDistance * cos(toRadians(bondAngle / 2))
hydrogenOffsetY = oxygenHydrogenDistance * sin(toRadians(bondAngle / 2))
// Create the hydrogen atoms
hydrogenAtom1 = createAtom([hydrogenOffsetX, hydrogenOffsetY], hydrogenRadius)
hydrogenAtom2 = createAtom([-hydrogenOffsetX, hydrogenOffsetY], hydrogenRadius)

View File

@ -5,11 +5,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
10,
29,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
66,
99,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
105,
124,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
130,
165,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
171,
191,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -218,11 +166,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -238,11 +182,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -252,22 +192,14 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -275,11 +207,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -288,11 +216,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -302,11 +226,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -316,11 +236,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -330,11 +246,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -344,11 +256,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -358,11 +266,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -372,11 +276,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -386,11 +286,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
197,
217,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -400,11 +296,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
258,
281,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -414,11 +306,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
223,
283,
0
],
"command": { "command": {
"type": "solid3d_fillet_edge", "type": "solid3d_fillet_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -430,11 +318,7 @@ description: Artifact commands basic_fillet_cube_close_opposite.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
223,
283,
0
],
"command": { "command": {
"type": "solid3d_fillet_edge", "type": "solid3d_fillet_edge",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,9 +7,9 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 283, "end": 0,
"id": { "id": {
"end": 7, "end": 0,
"name": "part001", "name": "part001",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -19,22 +19,22 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 28, "end": 0,
"raw": "'XY'", "raw": "'XY'",
"start": 24, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XY" "value": "XY"
} }
], ],
"callee": { "callee": {
"end": 23, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 10, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 29, "end": 0,
"start": 10, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -43,9 +43,9 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"elements": [ "elements": [
{ {
"end": 52, "end": 0,
"raw": "0", "raw": "0",
"start": 51, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -54,9 +54,9 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
}, },
{ {
"end": 55, "end": 0,
"raw": "0", "raw": "0",
"start": 54, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -65,26 +65,26 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
} }
], ],
"end": 56, "end": 0,
"start": 50, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 59, "end": 0,
"start": 58, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 49, "end": 0,
"name": "startProfileAt", "name": "startProfileAt",
"start": 35, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 60, "end": 0,
"start": 35, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -93,17 +93,17 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 74, "end": 0,
"name": "end", "name": "end",
"start": 71, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 79, "end": 0,
"raw": "0", "raw": "0",
"start": 78, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -112,9 +112,9 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
}, },
{ {
"end": 83, "end": 0,
"raw": "10", "raw": "10",
"start": 81, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -123,8 +123,8 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
} }
], ],
"end": 84, "end": 0,
"start": 77, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -132,14 +132,14 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 89, "end": 0,
"name": "tag", "name": "tag",
"start": 86, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 98, "end": 0,
"start": 92, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
@ -147,13 +147,13 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
], ],
"callee": { "callee": {
"end": 70, "end": 0,
"name": "line", "name": "line",
"start": 66, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 99, "end": 0,
"start": 66, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -163,17 +163,17 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 113, "end": 0,
"name": "end", "name": "end",
"start": 110, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 119, "end": 0,
"raw": "10", "raw": "10",
"start": 117, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -182,9 +182,9 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
}, },
{ {
"end": 122, "end": 0,
"raw": "0", "raw": "0",
"start": 121, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -193,21 +193,21 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
} }
], ],
"end": 123, "end": 0,
"start": 116, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 109, "end": 0,
"name": "line", "name": "line",
"start": 105, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 124, "end": 0,
"start": 105, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -217,17 +217,17 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 138, "end": 0,
"name": "end", "name": "end",
"start": 135, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 143, "end": 0,
"raw": "0", "raw": "0",
"start": 142, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -237,9 +237,9 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
}, },
{ {
"argument": { "argument": {
"end": 148, "end": 0,
"raw": "10", "raw": "10",
"start": 146, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -247,15 +247,15 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 148, "end": 0,
"operator": "-", "operator": "-",
"start": 145, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 149, "end": 0,
"start": 141, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -263,14 +263,14 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 154, "end": 0,
"name": "tag", "name": "tag",
"start": 151, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 164, "end": 0,
"start": 157, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
@ -278,13 +278,13 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
], ],
"callee": { "callee": {
"end": 134, "end": 0,
"name": "line", "name": "line",
"start": 130, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 165, "end": 0,
"start": 130, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -294,14 +294,14 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 180, "end": 0,
"name": "tag", "name": "tag",
"start": 177, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 190, "end": 0,
"start": 183, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing3" "value": "thing3"
@ -309,13 +309,13 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
], ],
"callee": { "callee": {
"end": 176, "end": 0,
"name": "close", "name": "close",
"start": 171, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 191, "end": 0,
"start": 171, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -325,15 +325,15 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 211, "end": 0,
"name": "length", "name": "length",
"start": 205, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 216, "end": 0,
"raw": "10", "raw": "10",
"start": 214, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -344,13 +344,13 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
} }
], ],
"callee": { "callee": {
"end": 204, "end": 0,
"name": "extrude", "name": "extrude",
"start": 197, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 217, "end": 0,
"start": 197, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -360,15 +360,15 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 236, "end": 0,
"name": "radius", "name": "radius",
"start": 230, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 240, "end": 0,
"raw": "2", "raw": "2",
"start": 239, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -380,78 +380,78 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 246, "end": 0,
"name": "tags", "name": "tags",
"start": 242, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 256, "end": 0,
"name": "thing3", "name": "thing3",
"start": 250, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
{ {
"arguments": [ "arguments": [
{ {
"end": 280, "end": 0,
"name": "thing3", "name": "thing3",
"start": 274, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 273, "end": 0,
"name": "getOppositeEdge", "name": "getOppositeEdge",
"start": 258, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 281, "end": 0,
"start": 258, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"end": 282, "end": 0,
"start": 249, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 229, "end": 0,
"name": "fillet", "name": "fillet",
"start": 223, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 283, "end": 0,
"start": 223, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
} }
], ],
"end": 283, "end": 0,
"start": 10, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 283, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 284, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -10,19 +10,11 @@ description: Operations executed basic_fillet_cube_close_opposite.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
24,
28,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
10,
29,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -42,19 +34,11 @@ description: Operations executed basic_fillet_cube_close_opposite.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
214,
216,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
197,
217,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -63,11 +47,7 @@ description: Operations executed basic_fillet_cube_close_opposite.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
197,
217,
0
]
} }
}, },
{ {
@ -86,11 +66,7 @@ description: Operations executed basic_fillet_cube_close_opposite.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
239,
240,
0
]
}, },
"tags": { "tags": {
"value": { "value": {
@ -107,19 +83,11 @@ description: Operations executed basic_fillet_cube_close_opposite.kcl
} }
] ]
}, },
"sourceRange": [ "sourceRange": []
249,
282,
0
]
} }
}, },
"name": "fillet", "name": "fillet",
"sourceRange": [ "sourceRange": [],
223,
283,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -128,11 +96,7 @@ description: Operations executed basic_fillet_cube_close_opposite.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
223,
283,
0
]
} }
} }
] ]

View File

@ -13,11 +13,7 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
66,
99,
0
],
"tag": { "tag": {
"end": 98, "end": 98,
"start": 92, "start": 92,
@ -29,22 +25,14 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
105,
124,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
130,
165,
0
],
"tag": { "tag": {
"end": 164, "end": 164,
"start": 157, "start": 157,
@ -56,11 +44,7 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
171,
191,
0
],
"tag": { "tag": {
"end": 190, "end": 190,
"start": 183, "start": 183,
@ -77,11 +61,7 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
66,
99,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -105,11 +85,7 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
105,
124,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -128,11 +104,7 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
130,
165,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -156,11 +128,7 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
171,
191,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -226,11 +194,7 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
35,
60,
0
]
} }
}, },
"tags": { "tags": {

View File

@ -0,0 +1,12 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing basic_fillet_cube_close_opposite.kcl
---
part001 = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line(end = [0, 10], tag = $thing)
|> line(end = [10, 0])
|> line(end = [0, -10], tag = $thing2)
|> close(tag = $thing3)
|> extrude(length = 10)
|> fillet(radius = 2, tags = [thing3, getOppositeEdge(thing3)])

View File

@ -5,11 +5,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
10,
29,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
66,
99,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
105,
124,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
130,
165,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
171,
179,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -218,11 +166,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -238,11 +182,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -252,22 +192,14 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -275,11 +207,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -288,11 +216,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -302,11 +226,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -316,11 +236,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -330,11 +246,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -344,11 +256,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -358,11 +266,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -372,11 +276,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -386,11 +286,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -400,11 +296,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
245,
267,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -414,11 +306,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
211,
269,
0
],
"command": { "command": {
"type": "solid3d_fillet_edge", "type": "solid3d_fillet_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -430,11 +318,7 @@ description: Artifact commands basic_fillet_cube_end.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
211,
269,
0
],
"command": { "command": {
"type": "solid3d_fillet_edge", "type": "solid3d_fillet_edge",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,9 +7,9 @@ description: Result of parsing basic_fillet_cube_end.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 269, "end": 0,
"id": { "id": {
"end": 7, "end": 0,
"name": "part001", "name": "part001",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -19,22 +19,22 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 28, "end": 0,
"raw": "'XY'", "raw": "'XY'",
"start": 24, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XY" "value": "XY"
} }
], ],
"callee": { "callee": {
"end": 23, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 10, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 29, "end": 0,
"start": 10, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -43,9 +43,9 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"elements": [ "elements": [
{ {
"end": 52, "end": 0,
"raw": "0", "raw": "0",
"start": 51, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -54,9 +54,9 @@ description: Result of parsing basic_fillet_cube_end.kcl
} }
}, },
{ {
"end": 55, "end": 0,
"raw": "0", "raw": "0",
"start": 54, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -65,26 +65,26 @@ description: Result of parsing basic_fillet_cube_end.kcl
} }
} }
], ],
"end": 56, "end": 0,
"start": 50, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 59, "end": 0,
"start": 58, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 49, "end": 0,
"name": "startProfileAt", "name": "startProfileAt",
"start": 35, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 60, "end": 0,
"start": 35, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -93,17 +93,17 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 74, "end": 0,
"name": "end", "name": "end",
"start": 71, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 79, "end": 0,
"raw": "0", "raw": "0",
"start": 78, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -112,9 +112,9 @@ description: Result of parsing basic_fillet_cube_end.kcl
} }
}, },
{ {
"end": 83, "end": 0,
"raw": "10", "raw": "10",
"start": 81, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -123,8 +123,8 @@ description: Result of parsing basic_fillet_cube_end.kcl
} }
} }
], ],
"end": 84, "end": 0,
"start": 77, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -132,14 +132,14 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 89, "end": 0,
"name": "tag", "name": "tag",
"start": 86, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 98, "end": 0,
"start": 92, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
@ -147,13 +147,13 @@ description: Result of parsing basic_fillet_cube_end.kcl
} }
], ],
"callee": { "callee": {
"end": 70, "end": 0,
"name": "line", "name": "line",
"start": 66, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 99, "end": 0,
"start": 66, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -163,17 +163,17 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 113, "end": 0,
"name": "end", "name": "end",
"start": 110, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 119, "end": 0,
"raw": "10", "raw": "10",
"start": 117, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -182,9 +182,9 @@ description: Result of parsing basic_fillet_cube_end.kcl
} }
}, },
{ {
"end": 122, "end": 0,
"raw": "0", "raw": "0",
"start": 121, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -193,21 +193,21 @@ description: Result of parsing basic_fillet_cube_end.kcl
} }
} }
], ],
"end": 123, "end": 0,
"start": 116, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 109, "end": 0,
"name": "line", "name": "line",
"start": 105, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 124, "end": 0,
"start": 105, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -217,17 +217,17 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 138, "end": 0,
"name": "end", "name": "end",
"start": 135, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 143, "end": 0,
"raw": "0", "raw": "0",
"start": 142, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -237,9 +237,9 @@ description: Result of parsing basic_fillet_cube_end.kcl
}, },
{ {
"argument": { "argument": {
"end": 148, "end": 0,
"raw": "10", "raw": "10",
"start": 146, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -247,15 +247,15 @@ description: Result of parsing basic_fillet_cube_end.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 148, "end": 0,
"operator": "-", "operator": "-",
"start": 145, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 149, "end": 0,
"start": 141, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -263,14 +263,14 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 154, "end": 0,
"name": "tag", "name": "tag",
"start": 151, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 164, "end": 0,
"start": 157, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
@ -278,13 +278,13 @@ description: Result of parsing basic_fillet_cube_end.kcl
} }
], ],
"callee": { "callee": {
"end": 134, "end": 0,
"name": "line", "name": "line",
"start": 130, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 165, "end": 0,
"start": 130, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -292,20 +292,20 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 178, "end": 0,
"start": 177, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 176, "end": 0,
"name": "close", "name": "close",
"start": 171, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 179, "end": 0,
"start": 171, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -314,15 +314,15 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 199, "end": 0,
"name": "length", "name": "length",
"start": 193, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 204, "end": 0,
"raw": "10", "raw": "10",
"start": 202, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -333,13 +333,13 @@ description: Result of parsing basic_fillet_cube_end.kcl
} }
], ],
"callee": { "callee": {
"end": 192, "end": 0,
"name": "extrude", "name": "extrude",
"start": 185, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 205, "end": 0,
"start": 185, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -349,15 +349,15 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 224, "end": 0,
"name": "radius", "name": "radius",
"start": 218, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 228, "end": 0,
"raw": "2", "raw": "2",
"start": 227, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -369,78 +369,78 @@ description: Result of parsing basic_fillet_cube_end.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 234, "end": 0,
"name": "tags", "name": "tags",
"start": 230, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 243, "end": 0,
"name": "thing", "name": "thing",
"start": 238, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
{ {
"arguments": [ "arguments": [
{ {
"end": 266, "end": 0,
"name": "thing", "name": "thing",
"start": 261, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 260, "end": 0,
"name": "getOppositeEdge", "name": "getOppositeEdge",
"start": 245, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 267, "end": 0,
"start": 245, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"end": 268, "end": 0,
"start": 237, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 217, "end": 0,
"name": "fillet", "name": "fillet",
"start": 211, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 269, "end": 0,
"start": 211, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
} }
], ],
"end": 269, "end": 0,
"start": 10, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 269, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 270, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -10,19 +10,11 @@ description: Operations executed basic_fillet_cube_end.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
24,
28,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
10,
29,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -42,19 +34,11 @@ description: Operations executed basic_fillet_cube_end.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
202,
204,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
185,
205,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -63,11 +47,7 @@ description: Operations executed basic_fillet_cube_end.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
185,
205,
0
]
} }
}, },
{ {
@ -86,11 +66,7 @@ description: Operations executed basic_fillet_cube_end.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
227,
228,
0
]
}, },
"tags": { "tags": {
"value": { "value": {
@ -107,19 +83,11 @@ description: Operations executed basic_fillet_cube_end.kcl
} }
] ]
}, },
"sourceRange": [ "sourceRange": []
237,
268,
0
]
} }
}, },
"name": "fillet", "name": "fillet",
"sourceRange": [ "sourceRange": [],
211,
269,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -128,11 +96,7 @@ description: Operations executed basic_fillet_cube_end.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
211,
269,
0
]
} }
} }
] ]

View File

@ -13,11 +13,7 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
66,
99,
0
],
"tag": { "tag": {
"end": 98, "end": 98,
"start": 92, "start": 92,
@ -29,22 +25,14 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
105,
124,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
130,
165,
0
],
"tag": { "tag": {
"end": 164, "end": 164,
"start": 157, "start": 157,
@ -56,11 +44,7 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
171,
179,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
} }
@ -72,11 +56,7 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
66,
99,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -100,11 +80,7 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
105,
124,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -123,11 +99,7 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
130,
165,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -151,11 +123,7 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
171,
179,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -216,11 +184,7 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
35,
60,
0
]
} }
}, },
"tags": { "tags": {

View File

@ -0,0 +1,12 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing basic_fillet_cube_end.kcl
---
part001 = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line(end = [0, 10], tag = $thing)
|> line(end = [10, 0])
|> line(end = [0, -10], tag = $thing2)
|> close(%)
|> extrude(length = 10)
|> fillet(radius = 2, tags = [thing, getOppositeEdge(thing)])

View File

@ -5,11 +5,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
10,
29,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
66,
99,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
105,
139,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
145,
180,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
186,
206,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -218,11 +166,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -238,11 +182,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -252,22 +192,14 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -275,11 +207,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -288,11 +216,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -302,11 +226,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -316,11 +236,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -330,11 +246,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -344,11 +256,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -358,11 +266,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -372,11 +276,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -386,11 +286,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -400,11 +296,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
265,
292,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -414,11 +306,7 @@ description: Artifact commands basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
238,
294,
0
],
"command": { "command": {
"type": "solid3d_fillet_edge", "type": "solid3d_fillet_edge",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,9 +7,9 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 294, "end": 0,
"id": { "id": {
"end": 7, "end": 0,
"name": "part001", "name": "part001",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -19,22 +19,22 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 28, "end": 0,
"raw": "'XY'", "raw": "'XY'",
"start": 24, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XY" "value": "XY"
} }
], ],
"callee": { "callee": {
"end": 23, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 10, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 29, "end": 0,
"start": 10, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -43,9 +43,9 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"elements": [ "elements": [
{ {
"end": 52, "end": 0,
"raw": "0", "raw": "0",
"start": 51, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -54,9 +54,9 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
}, },
{ {
"end": 55, "end": 0,
"raw": "0", "raw": "0",
"start": 54, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -65,26 +65,26 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
} }
], ],
"end": 56, "end": 0,
"start": 50, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 59, "end": 0,
"start": 58, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 49, "end": 0,
"name": "startProfileAt", "name": "startProfileAt",
"start": 35, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 60, "end": 0,
"start": 35, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -93,17 +93,17 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 74, "end": 0,
"name": "end", "name": "end",
"start": 71, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 79, "end": 0,
"raw": "0", "raw": "0",
"start": 78, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -112,9 +112,9 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
}, },
{ {
"end": 83, "end": 0,
"raw": "10", "raw": "10",
"start": 81, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -123,8 +123,8 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
} }
], ],
"end": 84, "end": 0,
"start": 77, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -132,14 +132,14 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 89, "end": 0,
"name": "tag", "name": "tag",
"start": 86, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 98, "end": 0,
"start": 92, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
@ -147,13 +147,13 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 70, "end": 0,
"name": "line", "name": "line",
"start": 66, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 99, "end": 0,
"start": 66, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -163,17 +163,17 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 113, "end": 0,
"name": "end", "name": "end",
"start": 110, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 119, "end": 0,
"raw": "10", "raw": "10",
"start": 117, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -182,9 +182,9 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
}, },
{ {
"end": 122, "end": 0,
"raw": "0", "raw": "0",
"start": 121, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -193,8 +193,8 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
} }
], ],
"end": 123, "end": 0,
"start": 116, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -202,14 +202,14 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 128, "end": 0,
"name": "tag", "name": "tag",
"start": 125, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 138, "end": 0,
"start": 131, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing1" "value": "thing1"
@ -217,13 +217,13 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 109, "end": 0,
"name": "line", "name": "line",
"start": 105, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 139, "end": 0,
"start": 105, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -233,17 +233,17 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 153, "end": 0,
"name": "end", "name": "end",
"start": 150, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 158, "end": 0,
"raw": "0", "raw": "0",
"start": 157, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -253,9 +253,9 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
}, },
{ {
"argument": { "argument": {
"end": 163, "end": 0,
"raw": "10", "raw": "10",
"start": 161, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -263,15 +263,15 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 163, "end": 0,
"operator": "-", "operator": "-",
"start": 160, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 164, "end": 0,
"start": 156, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -279,14 +279,14 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 169, "end": 0,
"name": "tag", "name": "tag",
"start": 166, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 179, "end": 0,
"start": 172, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
@ -294,13 +294,13 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 149, "end": 0,
"name": "line", "name": "line",
"start": 145, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 180, "end": 0,
"start": 145, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -310,14 +310,14 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 195, "end": 0,
"name": "tag", "name": "tag",
"start": 192, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 205, "end": 0,
"start": 198, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing3" "value": "thing3"
@ -325,13 +325,13 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 191, "end": 0,
"name": "close", "name": "close",
"start": 186, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 206, "end": 0,
"start": 186, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -341,15 +341,15 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 226, "end": 0,
"name": "length", "name": "length",
"start": 220, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 231, "end": 0,
"raw": "10", "raw": "10",
"start": 229, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -360,13 +360,13 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 219, "end": 0,
"name": "extrude", "name": "extrude",
"start": 212, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 232, "end": 0,
"start": 212, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -376,15 +376,15 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 251, "end": 0,
"name": "radius", "name": "radius",
"start": 245, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 255, "end": 0,
"raw": "2", "raw": "2",
"start": 254, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -396,9 +396,9 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 261, "end": 0,
"name": "tags", "name": "tags",
"start": 257, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
@ -406,61 +406,61 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 291, "end": 0,
"name": "thing3", "name": "thing3",
"start": 285, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 284, "end": 0,
"name": "getNextAdjacentEdge", "name": "getNextAdjacentEdge",
"start": 265, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 292, "end": 0,
"start": 265, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"end": 293, "end": 0,
"start": 264, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 244, "end": 0,
"name": "fillet", "name": "fillet",
"start": 238, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 294, "end": 0,
"start": 238, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
} }
], ],
"end": 294, "end": 0,
"start": 10, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 294, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 295, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -10,19 +10,11 @@ description: Operations executed basic_fillet_cube_next_adjacent.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
24,
28,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
10,
29,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -42,19 +34,11 @@ description: Operations executed basic_fillet_cube_next_adjacent.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
229,
231,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
212,
232,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -63,11 +47,7 @@ description: Operations executed basic_fillet_cube_next_adjacent.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
212,
232,
0
]
} }
}, },
{ {
@ -86,11 +66,7 @@ description: Operations executed basic_fillet_cube_next_adjacent.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
254,
255,
0
]
}, },
"tags": { "tags": {
"value": { "value": {
@ -102,19 +78,11 @@ description: Operations executed basic_fillet_cube_next_adjacent.kcl
} }
] ]
}, },
"sourceRange": [ "sourceRange": []
264,
293,
0
]
} }
}, },
"name": "fillet", "name": "fillet",
"sourceRange": [ "sourceRange": [],
238,
294,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -123,11 +91,7 @@ description: Operations executed basic_fillet_cube_next_adjacent.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
238,
294,
0
]
} }
} }
] ]

View File

@ -13,11 +13,7 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
66,
99,
0
],
"tag": { "tag": {
"end": 98, "end": 98,
"start": 92, "start": 92,
@ -29,11 +25,7 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
105,
139,
0
],
"tag": { "tag": {
"end": 138, "end": 138,
"start": 131, "start": 131,
@ -45,11 +37,7 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
145,
180,
0
],
"tag": { "tag": {
"end": 179, "end": 179,
"start": 172, "start": 172,
@ -61,11 +49,7 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
186,
206,
0
],
"tag": { "tag": {
"end": 205, "end": 205,
"start": 198, "start": 198,
@ -82,11 +66,7 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
66,
99,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -110,11 +90,7 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
105,
139,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -138,11 +114,7 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
145,
180,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -166,11 +138,7 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
186,
206,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -236,11 +204,7 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
35,
60,
0
]
} }
}, },
"tags": { "tags": {

View File

@ -0,0 +1,12 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing basic_fillet_cube_next_adjacent.kcl
---
part001 = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line(end = [0, 10], tag = $thing)
|> line(end = [10, 0], tag = $thing1)
|> line(end = [0, -10], tag = $thing2)
|> close(tag = $thing3)
|> extrude(length = 10)
|> fillet(radius = 2, tags = [getNextAdjacentEdge(thing3)])

View File

@ -5,11 +5,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
10,
29,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
66,
99,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
105,
139,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
145,
180,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
186,
206,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -218,11 +166,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -238,11 +182,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -252,22 +192,14 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -275,11 +207,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -288,11 +216,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -302,11 +226,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -316,11 +236,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -330,11 +246,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -344,11 +256,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -358,11 +266,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -372,11 +276,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -386,11 +286,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
212,
232,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -400,11 +296,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
265,
296,
0
],
"command": { "command": {
"type": "solid3d_get_prev_adjacent_edge", "type": "solid3d_get_prev_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -414,11 +306,7 @@ description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
238,
298,
0
],
"command": { "command": {
"type": "solid3d_fillet_edge", "type": "solid3d_fillet_edge",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,9 +7,9 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 298, "end": 0,
"id": { "id": {
"end": 7, "end": 0,
"name": "part001", "name": "part001",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -19,22 +19,22 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 28, "end": 0,
"raw": "'XY'", "raw": "'XY'",
"start": 24, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XY" "value": "XY"
} }
], ],
"callee": { "callee": {
"end": 23, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 10, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 29, "end": 0,
"start": 10, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -43,9 +43,9 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"elements": [ "elements": [
{ {
"end": 52, "end": 0,
"raw": "0", "raw": "0",
"start": 51, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -54,9 +54,9 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
}, },
{ {
"end": 55, "end": 0,
"raw": "0", "raw": "0",
"start": 54, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -65,26 +65,26 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
} }
], ],
"end": 56, "end": 0,
"start": 50, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 59, "end": 0,
"start": 58, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 49, "end": 0,
"name": "startProfileAt", "name": "startProfileAt",
"start": 35, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 60, "end": 0,
"start": 35, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -93,17 +93,17 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 74, "end": 0,
"name": "end", "name": "end",
"start": 71, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 79, "end": 0,
"raw": "0", "raw": "0",
"start": 78, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -112,9 +112,9 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
}, },
{ {
"end": 83, "end": 0,
"raw": "10", "raw": "10",
"start": 81, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -123,8 +123,8 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
} }
], ],
"end": 84, "end": 0,
"start": 77, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -132,14 +132,14 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 89, "end": 0,
"name": "tag", "name": "tag",
"start": 86, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 98, "end": 0,
"start": 92, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
@ -147,13 +147,13 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 70, "end": 0,
"name": "line", "name": "line",
"start": 66, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 99, "end": 0,
"start": 66, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -163,17 +163,17 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 113, "end": 0,
"name": "end", "name": "end",
"start": 110, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 119, "end": 0,
"raw": "10", "raw": "10",
"start": 117, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -182,9 +182,9 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
}, },
{ {
"end": 122, "end": 0,
"raw": "0", "raw": "0",
"start": 121, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -193,8 +193,8 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
} }
], ],
"end": 123, "end": 0,
"start": 116, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -202,14 +202,14 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 128, "end": 0,
"name": "tag", "name": "tag",
"start": 125, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 138, "end": 0,
"start": 131, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing1" "value": "thing1"
@ -217,13 +217,13 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 109, "end": 0,
"name": "line", "name": "line",
"start": 105, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 139, "end": 0,
"start": 105, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -233,17 +233,17 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 153, "end": 0,
"name": "end", "name": "end",
"start": 150, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 158, "end": 0,
"raw": "0", "raw": "0",
"start": 157, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -253,9 +253,9 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
}, },
{ {
"argument": { "argument": {
"end": 163, "end": 0,
"raw": "10", "raw": "10",
"start": 161, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -263,15 +263,15 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 163, "end": 0,
"operator": "-", "operator": "-",
"start": 160, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 164, "end": 0,
"start": 156, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -279,14 +279,14 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 169, "end": 0,
"name": "tag", "name": "tag",
"start": 166, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 179, "end": 0,
"start": 172, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
@ -294,13 +294,13 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 149, "end": 0,
"name": "line", "name": "line",
"start": 145, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 180, "end": 0,
"start": 145, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -310,14 +310,14 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 195, "end": 0,
"name": "tag", "name": "tag",
"start": 192, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 205, "end": 0,
"start": 198, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing3" "value": "thing3"
@ -325,13 +325,13 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 191, "end": 0,
"name": "close", "name": "close",
"start": 186, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 206, "end": 0,
"start": 186, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -341,15 +341,15 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 226, "end": 0,
"name": "length", "name": "length",
"start": 220, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 231, "end": 0,
"raw": "10", "raw": "10",
"start": 229, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -360,13 +360,13 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
} }
], ],
"callee": { "callee": {
"end": 219, "end": 0,
"name": "extrude", "name": "extrude",
"start": 212, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 232, "end": 0,
"start": 212, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -376,15 +376,15 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 251, "end": 0,
"name": "radius", "name": "radius",
"start": 245, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 255, "end": 0,
"raw": "2", "raw": "2",
"start": 254, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -396,9 +396,9 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 261, "end": 0,
"name": "tags", "name": "tags",
"start": 257, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
@ -406,61 +406,61 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 295, "end": 0,
"name": "thing3", "name": "thing3",
"start": 289, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"callee": { "callee": {
"end": 288, "end": 0,
"name": "getPreviousAdjacentEdge", "name": "getPreviousAdjacentEdge",
"start": 265, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 296, "end": 0,
"start": 265, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"end": 297, "end": 0,
"start": 264, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 244, "end": 0,
"name": "fillet", "name": "fillet",
"start": 238, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 298, "end": 0,
"start": 238, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
} }
], ],
"end": 298, "end": 0,
"start": 10, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 298, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 299, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -10,19 +10,11 @@ description: Operations executed basic_fillet_cube_previous_adjacent.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
24,
28,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
10,
29,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -42,19 +34,11 @@ description: Operations executed basic_fillet_cube_previous_adjacent.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
229,
231,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
212,
232,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -63,11 +47,7 @@ description: Operations executed basic_fillet_cube_previous_adjacent.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
212,
232,
0
]
} }
}, },
{ {
@ -86,11 +66,7 @@ description: Operations executed basic_fillet_cube_previous_adjacent.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
254,
255,
0
]
}, },
"tags": { "tags": {
"value": { "value": {
@ -102,19 +78,11 @@ description: Operations executed basic_fillet_cube_previous_adjacent.kcl
} }
] ]
}, },
"sourceRange": [ "sourceRange": []
264,
297,
0
]
} }
}, },
"name": "fillet", "name": "fillet",
"sourceRange": [ "sourceRange": [],
238,
298,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -123,11 +91,7 @@ description: Operations executed basic_fillet_cube_previous_adjacent.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
238,
298,
0
]
} }
} }
] ]

View File

@ -13,11 +13,7 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
66,
99,
0
],
"tag": { "tag": {
"end": 98, "end": 98,
"start": 92, "start": 92,
@ -29,11 +25,7 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
105,
139,
0
],
"tag": { "tag": {
"end": 138, "end": 138,
"start": 131, "start": 131,
@ -45,11 +37,7 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
145,
180,
0
],
"tag": { "tag": {
"end": 179, "end": 179,
"start": 172, "start": 172,
@ -61,11 +49,7 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
186,
206,
0
],
"tag": { "tag": {
"end": 205, "end": 205,
"start": 198, "start": 198,
@ -82,11 +66,7 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
66,
99,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -110,11 +90,7 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
105,
139,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -138,11 +114,7 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
145,
180,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -166,11 +138,7 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
186,
206,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -236,11 +204,7 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
35,
60,
0
]
} }
}, },
"tags": { "tags": {

View File

@ -0,0 +1,12 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing basic_fillet_cube_previous_adjacent.kcl
---
part001 = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line(end = [0, 10], tag = $thing)
|> line(end = [10, 0], tag = $thing1)
|> line(end = [0, -10], tag = $thing2)
|> close(tag = $thing3)
|> extrude(length = 10)
|> fillet(radius = 2, tags = [getPreviousAdjacentEdge(thing3)])

View File

@ -5,11 +5,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
[ [
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "edge_lines_visible", "type": "edge_lines_visible",
"hidden": false "hidden": false
@ -17,11 +13,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "set_scene_units", "type": "set_scene_units",
"unit": "mm" "unit": "mm"
@ -29,11 +21,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -42,11 +30,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
0,
0,
0
],
"command": { "command": {
"type": "object_visible", "type": "object_visible",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -55,11 +39,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
10,
29,
0
],
"command": { "command": {
"type": "make_plane", "type": "make_plane",
"origin": { "origin": {
@ -84,11 +64,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -104,22 +80,14 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "start_path" "type": "start_path"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "move_path_pen", "type": "move_path_pen",
"path": "[uuid]", "path": "[uuid]",
@ -132,22 +100,14 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
35,
60,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
66,
99,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -164,11 +124,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
105,
124,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -185,11 +141,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
130,
165,
0
],
"command": { "command": {
"type": "extend_path", "type": "extend_path",
"path": "[uuid]", "path": "[uuid]",
@ -206,11 +158,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
171,
179,
0
],
"command": { "command": {
"type": "close_path", "type": "close_path",
"path_id": "[uuid]" "path_id": "[uuid]"
@ -218,11 +166,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "enable_sketch_mode", "type": "enable_sketch_mode",
"entity_id": "[uuid]", "entity_id": "[uuid]",
@ -238,11 +182,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
@ -252,22 +192,14 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "sketch_mode_disable" "type": "sketch_mode_disable"
} }
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "object_bring_to_front", "type": "object_bring_to_front",
"object_id": "[uuid]" "object_id": "[uuid]"
@ -275,11 +207,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_extrusion_face_info", "type": "solid3d_get_extrusion_face_info",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -288,11 +216,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -302,11 +226,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -316,11 +236,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -330,11 +246,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -344,11 +256,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -358,11 +266,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -372,11 +276,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_opposite_edge", "type": "solid3d_get_opposite_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -386,11 +286,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
185,
205,
0
],
"command": { "command": {
"type": "solid3d_get_next_adjacent_edge", "type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -400,11 +296,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
211,
253,
0
],
"command": { "command": {
"type": "solid3d_fillet_edge", "type": "solid3d_fillet_edge",
"object_id": "[uuid]", "object_id": "[uuid]",
@ -416,11 +308,7 @@ description: Artifact commands basic_fillet_cube_start.kcl
}, },
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [ "range": [],
211,
253,
0
],
"command": { "command": {
"type": "solid3d_fillet_edge", "type": "solid3d_fillet_edge",
"object_id": "[uuid]", "object_id": "[uuid]",

View File

@ -7,9 +7,9 @@ description: Result of parsing basic_fillet_cube_start.kcl
"body": [ "body": [
{ {
"declaration": { "declaration": {
"end": 253, "end": 0,
"id": { "id": {
"end": 7, "end": 0,
"name": "part001", "name": "part001",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
@ -19,22 +19,22 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 28, "end": 0,
"raw": "'XY'", "raw": "'XY'",
"start": 24, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": "XY" "value": "XY"
} }
], ],
"callee": { "callee": {
"end": 23, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 10, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 29, "end": 0,
"start": 10, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -43,9 +43,9 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"elements": [ "elements": [
{ {
"end": 52, "end": 0,
"raw": "0", "raw": "0",
"start": 51, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -54,9 +54,9 @@ description: Result of parsing basic_fillet_cube_start.kcl
} }
}, },
{ {
"end": 55, "end": 0,
"raw": "0", "raw": "0",
"start": 54, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -65,26 +65,26 @@ description: Result of parsing basic_fillet_cube_start.kcl
} }
} }
], ],
"end": 56, "end": 0,
"start": 50, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
}, },
{ {
"end": 59, "end": 0,
"start": 58, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 49, "end": 0,
"name": "startProfileAt", "name": "startProfileAt",
"start": 35, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 60, "end": 0,
"start": 35, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -93,17 +93,17 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 74, "end": 0,
"name": "end", "name": "end",
"start": 71, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 79, "end": 0,
"raw": "0", "raw": "0",
"start": 78, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -112,9 +112,9 @@ description: Result of parsing basic_fillet_cube_start.kcl
} }
}, },
{ {
"end": 83, "end": 0,
"raw": "10", "raw": "10",
"start": 81, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -123,8 +123,8 @@ description: Result of parsing basic_fillet_cube_start.kcl
} }
} }
], ],
"end": 84, "end": 0,
"start": 77, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -132,14 +132,14 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 89, "end": 0,
"name": "tag", "name": "tag",
"start": 86, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 98, "end": 0,
"start": 92, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
@ -147,13 +147,13 @@ description: Result of parsing basic_fillet_cube_start.kcl
} }
], ],
"callee": { "callee": {
"end": 70, "end": 0,
"name": "line", "name": "line",
"start": 66, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 99, "end": 0,
"start": 66, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -163,17 +163,17 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 113, "end": 0,
"name": "end", "name": "end",
"start": 110, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 119, "end": 0,
"raw": "10", "raw": "10",
"start": 117, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -182,9 +182,9 @@ description: Result of parsing basic_fillet_cube_start.kcl
} }
}, },
{ {
"end": 122, "end": 0,
"raw": "0", "raw": "0",
"start": 121, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -193,21 +193,21 @@ description: Result of parsing basic_fillet_cube_start.kcl
} }
} }
], ],
"end": 123, "end": 0,
"start": 116, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 109, "end": 0,
"name": "line", "name": "line",
"start": 105, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 124, "end": 0,
"start": 105, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -217,17 +217,17 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 138, "end": 0,
"name": "end", "name": "end",
"start": 135, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 143, "end": 0,
"raw": "0", "raw": "0",
"start": 142, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -237,9 +237,9 @@ description: Result of parsing basic_fillet_cube_start.kcl
}, },
{ {
"argument": { "argument": {
"end": 148, "end": 0,
"raw": "10", "raw": "10",
"start": 146, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -247,15 +247,15 @@ description: Result of parsing basic_fillet_cube_start.kcl
"suffix": "None" "suffix": "None"
} }
}, },
"end": 148, "end": 0,
"operator": "-", "operator": "-",
"start": 145, "start": 0,
"type": "UnaryExpression", "type": "UnaryExpression",
"type": "UnaryExpression" "type": "UnaryExpression"
} }
], ],
"end": 149, "end": 0,
"start": 141, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
@ -263,14 +263,14 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 154, "end": 0,
"name": "tag", "name": "tag",
"start": 151, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 164, "end": 0,
"start": 157, "start": 0,
"type": "TagDeclarator", "type": "TagDeclarator",
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
@ -278,13 +278,13 @@ description: Result of parsing basic_fillet_cube_start.kcl
} }
], ],
"callee": { "callee": {
"end": 134, "end": 0,
"name": "line", "name": "line",
"start": 130, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 165, "end": 0,
"start": 130, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -292,20 +292,20 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"arguments": [ "arguments": [
{ {
"end": 178, "end": 0,
"start": 177, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
"type": "PipeSubstitution" "type": "PipeSubstitution"
} }
], ],
"callee": { "callee": {
"end": 176, "end": 0,
"name": "close", "name": "close",
"start": 171, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 179, "end": 0,
"start": 171, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
}, },
@ -314,15 +314,15 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 199, "end": 0,
"name": "length", "name": "length",
"start": 193, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 204, "end": 0,
"raw": "10", "raw": "10",
"start": 202, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -333,13 +333,13 @@ description: Result of parsing basic_fillet_cube_start.kcl
} }
], ],
"callee": { "callee": {
"end": 192, "end": 0,
"name": "extrude", "name": "extrude",
"start": 185, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 205, "end": 0,
"start": 185, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
@ -349,15 +349,15 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 224, "end": 0,
"name": "radius", "name": "radius",
"start": 218, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"end": 228, "end": 0,
"raw": "2", "raw": "2",
"start": 227, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
"value": { "value": {
@ -369,64 +369,64 @@ description: Result of parsing basic_fillet_cube_start.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"end": 234, "end": 0,
"name": "tags", "name": "tags",
"start": 230, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"elements": [ "elements": [
{ {
"end": 243, "end": 0,
"name": "thing", "name": "thing",
"start": 238, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
}, },
{ {
"end": 251, "end": 0,
"name": "thing2", "name": "thing2",
"start": 245, "start": 0,
"type": "Identifier", "type": "Identifier",
"type": "Identifier" "type": "Identifier"
} }
], ],
"end": 252, "end": 0,
"start": 237, "start": 0,
"type": "ArrayExpression", "type": "ArrayExpression",
"type": "ArrayExpression" "type": "ArrayExpression"
} }
} }
], ],
"callee": { "callee": {
"end": 217, "end": 0,
"name": "fillet", "name": "fillet",
"start": 211, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"end": 253, "end": 0,
"start": 211, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": null "unlabeled": null
} }
], ],
"end": 253, "end": 0,
"start": 10, "start": 0,
"type": "PipeExpression", "type": "PipeExpression",
"type": "PipeExpression" "type": "PipeExpression"
}, },
"start": 0, "start": 0,
"type": "VariableDeclarator" "type": "VariableDeclarator"
}, },
"end": 253, "end": 0,
"kind": "const", "kind": "const",
"start": 0, "start": 0,
"type": "VariableDeclaration", "type": "VariableDeclaration",
"type": "VariableDeclaration" "type": "VariableDeclaration"
} }
], ],
"end": 254, "end": 0,
"start": 0 "start": 0
} }
} }

View File

@ -10,19 +10,11 @@ description: Operations executed basic_fillet_cube_start.kcl
"type": "String", "type": "String",
"value": "XY" "value": "XY"
}, },
"sourceRange": [ "sourceRange": []
24,
28,
0
]
} }
}, },
"name": "startSketchOn", "name": "startSketchOn",
"sourceRange": [ "sourceRange": [],
10,
29,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": null "unlabeledArg": null
}, },
@ -42,19 +34,11 @@ description: Operations executed basic_fillet_cube_start.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
202,
204,
0
]
} }
}, },
"name": "extrude", "name": "extrude",
"sourceRange": [ "sourceRange": [],
185,
205,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -63,11 +47,7 @@ description: Operations executed basic_fillet_cube_start.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
185,
205,
0
]
} }
}, },
{ {
@ -86,11 +66,7 @@ description: Operations executed basic_fillet_cube_start.kcl
} }
} }
}, },
"sourceRange": [ "sourceRange": []
227,
228,
0
]
}, },
"tags": { "tags": {
"value": { "value": {
@ -108,19 +84,11 @@ description: Operations executed basic_fillet_cube_start.kcl
} }
] ]
}, },
"sourceRange": [ "sourceRange": []
237,
252,
0
]
} }
}, },
"name": "fillet", "name": "fillet",
"sourceRange": [ "sourceRange": [],
211,
253,
0
],
"type": "StdLibCall", "type": "StdLibCall",
"unlabeledArg": { "unlabeledArg": {
"value": { "value": {
@ -129,11 +97,7 @@ description: Operations executed basic_fillet_cube_start.kcl
"artifactId": "[uuid]" "artifactId": "[uuid]"
} }
}, },
"sourceRange": [ "sourceRange": []
211,
253,
0
]
} }
} }
] ]

View File

@ -13,11 +13,7 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
66,
99,
0
],
"tag": { "tag": {
"end": 98, "end": 98,
"start": 92, "start": 92,
@ -29,22 +25,14 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
105,
124,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
}, },
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
130,
165,
0
],
"tag": { "tag": {
"end": 164, "end": 164,
"start": 157, "start": 157,
@ -56,11 +44,7 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
{ {
"faceId": "[uuid]", "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [],
171,
179,
0
],
"tag": null, "tag": null,
"type": "extrudePlane" "type": "extrudePlane"
} }
@ -72,11 +56,7 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
66,
99,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -100,11 +80,7 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
105,
124,
0
]
}, },
"from": [ "from": [
0.0, 0.0,
@ -123,11 +99,7 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
130,
165,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -151,11 +123,7 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
{ {
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
171,
179,
0
]
}, },
"from": [ "from": [
10.0, 10.0,
@ -216,11 +184,7 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
"tag": null, "tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": []
35,
60,
0
]
} }
}, },
"tags": { "tags": {

View File

@ -0,0 +1,12 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing basic_fillet_cube_start.kcl
---
part001 = startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line(end = [0, 10], tag = $thing)
|> line(end = [10, 0])
|> line(end = [0, -10], tag = $thing2)
|> close(%)
|> extrude(length = 10)
|> fillet(radius = 2, tags = [thing, thing2])

Some files were not shown because too many files have changed in this diff Show More