Files
modeling-app/rust/kcl-lib/tests/kcl_samples/enclosure/artifact_graph_flowchart.snap.md
Adam Chalmers 89bae66257 KCL: User-defined KCL functions in examples etc now use keywords (#6603)
Preparing for the removal of positional functions from the language. The first big step is to change all our KCL code examples, test code, public samples etc to all use keyword functions.

Apologies for how large this PR is. Most of it is:

- Changing example KCL that defined its own functions, so the functions now use keyword arguments rather than positional arguments. E.g. change `cube([20, 20])` to be `cube(center = [20, 20])`.
- Some parts of the code assumed positional code and didn't handle keyword calls, e.g. the linter would only check for positional calls to startSketchOn. Now they should work with either positional or keyword.
- Update all the artifacts

This does _not_ remove support for positional calls. That will be in a follow-up PR.
2025-05-01 12:36:51 -04:00

8.1 KiB

flowchart LR
  subgraph path8 [Path]
    8["Path<br>[287, 312, 0]"]
    27["Segment<br>[318, 384, 0]"]
    28["Segment<br>[390, 489, 0]"]
    29["Segment<br>[495, 612, 0]"]
    30["Segment<br>[618, 703, 0]"]
    31["Segment<br>[709, 716, 0]"]
    67[Solid2d]
  end
  subgraph path9 [Path]
    9["Path<br>[1598, 1681, 0]"]
    33["Segment<br>[1598, 1681, 0]"]
    59[Solid2d]
  end
  subgraph path10 [Path]
    10["Path<br>[1598, 1681, 0]"]
    32["Segment<br>[1598, 1681, 0]"]
    60[Solid2d]
  end
  subgraph path11 [Path]
    11["Path<br>[1598, 1681, 0]"]
    34["Segment<br>[1598, 1681, 0]"]
    66[Solid2d]
  end
  subgraph path12 [Path]
    12["Path<br>[1598, 1681, 0]"]
    35["Segment<br>[1598, 1681, 0]"]
    75[Solid2d]
  end
  subgraph path13 [Path]
    13["Path<br>[1707, 1774, 0]"]
    37["Segment<br>[1707, 1774, 0]"]
    62[Solid2d]
  end
  subgraph path14 [Path]
    14["Path<br>[1707, 1774, 0]"]
    36["Segment<br>[1707, 1774, 0]"]
    70[Solid2d]
  end
  subgraph path15 [Path]
    15["Path<br>[1707, 1774, 0]"]
    39["Segment<br>[1707, 1774, 0]"]
    72[Solid2d]
  end
  subgraph path16 [Path]
    16["Path<br>[1707, 1774, 0]"]
    38["Segment<br>[1707, 1774, 0]"]
    73[Solid2d]
  end
  subgraph path17 [Path]
    17["Path<br>[2342, 2377, 0]"]
    40["Segment<br>[2383, 2449, 0]"]
    41["Segment<br>[2455, 2554, 0]"]
    42["Segment<br>[2560, 2677, 0]"]
    43["Segment<br>[2683, 2768, 0]"]
    44["Segment<br>[2774, 2781, 0]"]
    63[Solid2d]
  end
  subgraph path18 [Path]
    18["Path<br>[2805, 2961, 0]"]
    45["Segment<br>[2805, 2961, 0]"]
    74[Solid2d]
  end
  subgraph path19 [Path]
    19["Path<br>[2986, 3153, 0]"]
    46["Segment<br>[2986, 3153, 0]"]
    76[Solid2d]
  end
  subgraph path20 [Path]
    20["Path<br>[3178, 3336, 0]"]
    47["Segment<br>[3178, 3336, 0]"]
    64[Solid2d]
  end
  subgraph path21 [Path]
    21["Path<br>[3361, 3530, 0]"]
    48["Segment<br>[3361, 3530, 0]"]
    61[Solid2d]
  end
  subgraph path22 [Path]
    22["Path<br>[3973, 4057, 0]"]
    49["Segment<br>[4063, 4151, 0]"]
    50["Segment<br>[4157, 4278, 0]"]
    51["Segment<br>[4284, 4401, 0]"]
    52["Segment<br>[4407, 4492, 0]"]
    53["Segment<br>[4498, 4505, 0]"]
    65[Solid2d]
  end
  subgraph path23 [Path]
    23["Path<br>[4529, 4701, 0]"]
    54["Segment<br>[4529, 4701, 0]"]
    58[Solid2d]
  end
  subgraph path24 [Path]
    24["Path<br>[4726, 4909, 0]"]
    55["Segment<br>[4726, 4909, 0]"]
    71[Solid2d]
  end
  subgraph path25 [Path]
    25["Path<br>[4934, 5108, 0]"]
    56["Segment<br>[4934, 5108, 0]"]
    68[Solid2d]
  end
  subgraph path26 [Path]
    26["Path<br>[5133, 5318, 0]"]
    57["Segment<br>[5133, 5318, 0]"]
    69[Solid2d]
  end
  1["Plane<br>[264, 281, 0]"]
  2["Plane<br>[1567, 1590, 0]"]
  3["Plane<br>[1567, 1590, 0]"]
  4["Plane<br>[1567, 1590, 0]"]
  5["Plane<br>[1567, 1590, 0]"]
  6["Plane<br>[2319, 2336, 0]"]
  7["StartSketchOnFace<br>[3930, 3967, 0]"]
  77["Sweep Extrusion<br>[730, 765, 0]"]
  78["Sweep Extrusion<br>[1791, 1842, 0]"]
  79["Sweep Extrusion<br>[1791, 1842, 0]"]
  80["Sweep Extrusion<br>[1791, 1842, 0]"]
  81["Sweep Extrusion<br>[1791, 1842, 0]"]
  82["Sweep Extrusion<br>[3545, 3587, 0]"]
  83["Sweep Extrusion<br>[5333, 5375, 0]"]
  84[Wall]
  85[Wall]
  86[Wall]
  87[Wall]
  88[Wall]
  89[Wall]
  90[Wall]
  91[Wall]
  92[Wall]
  93[Wall]
  94[Wall]
  95[Wall]
  96[Wall]
  97[Wall]
  98[Wall]
  99[Wall]
  100["Cap Start"]
  101["Cap Start"]
  102["Cap Start"]
  103["Cap Start"]
  104["Cap Start"]
  105["Cap Start"]
  106["Cap Start"]
  107["Cap End"]
  108["Cap End"]
  109["Cap End"]
  110["Cap End"]
  111["Cap End"]
  112["Cap End"]
  113["Cap End"]
  114["SweepEdge Opposite"]
  115["SweepEdge Opposite"]
  116["SweepEdge Opposite"]
  117["SweepEdge Opposite"]
  118["SweepEdge Opposite"]
  119["SweepEdge Opposite"]
  120["SweepEdge Opposite"]
  121["SweepEdge Opposite"]
  122["SweepEdge Opposite"]
  123["SweepEdge Opposite"]
  124["SweepEdge Opposite"]
  125["SweepEdge Opposite"]
  126["SweepEdge Opposite"]
  127["SweepEdge Opposite"]
  128["SweepEdge Opposite"]
  129["SweepEdge Opposite"]
  130["SweepEdge Adjacent"]
  131["SweepEdge Adjacent"]
  132["SweepEdge Adjacent"]
  133["SweepEdge Adjacent"]
  134["SweepEdge Adjacent"]
  135["SweepEdge Adjacent"]
  136["SweepEdge Adjacent"]
  137["SweepEdge Adjacent"]
  138["SweepEdge Adjacent"]
  139["SweepEdge Adjacent"]
  140["SweepEdge Adjacent"]
  141["SweepEdge Adjacent"]
  142["SweepEdge Adjacent"]
  143["SweepEdge Adjacent"]
  144["SweepEdge Adjacent"]
  145["SweepEdge Adjacent"]
  146["EdgeCut Fillet<br>[771, 1053, 0]"]
  147["EdgeCut Fillet<br>[771, 1053, 0]"]
  148["EdgeCut Fillet<br>[771, 1053, 0]"]
  149["EdgeCut Fillet<br>[771, 1053, 0]"]
  150["EdgeCut Fillet<br>[3593, 3875, 0]"]
  151["EdgeCut Fillet<br>[3593, 3875, 0]"]
  152["EdgeCut Fillet<br>[3593, 3875, 0]"]
  153["EdgeCut Fillet<br>[3593, 3875, 0]"]
  154["EdgeCut Fillet<br>[5381, 5663, 0]"]
  155["EdgeCut Fillet<br>[5381, 5663, 0]"]
  156["EdgeCut Fillet<br>[5381, 5663, 0]"]
  157["EdgeCut Fillet<br>[5381, 5663, 0]"]
  1 --- 8
  2 --- 9
  2 --- 14
  3 --- 12
  3 --- 16
  4 --- 10
  4 --- 13
  5 --- 11
  5 --- 15
  6 --- 17
  6 --- 18
  6 --- 19
  6 --- 20
  6 --- 21
  113 x--> 7
  8 --- 27
  8 --- 28
  8 --- 29
  8 --- 30
  8 --- 31
  8 --- 67
  8 ---- 77
  9 --- 33
  9 --- 59
  9 ---- 78
  10 --- 32
  10 --- 60
  10 ---- 81
  11 --- 34
  11 --- 66
  11 ---- 79
  12 --- 35
  12 --- 75
  12 ---- 80
  13 --- 37
  13 --- 62
  14 --- 36
  14 --- 70
  15 --- 39
  15 --- 72
  16 --- 38
  16 --- 73
  17 --- 40
  17 --- 41
  17 --- 42
  17 --- 43
  17 --- 44
  17 --- 63
  17 ---- 82
  18 --- 45
  18 --- 74
  19 --- 46
  19 --- 76
  20 --- 47
  20 --- 64
  21 --- 48
  21 --- 61
  22 --- 49
  22 --- 50
  22 --- 51
  22 --- 52
  22 --- 53
  22 --- 65
  22 ---- 83
  113 --- 22
  23 --- 54
  23 --- 58
  113 --- 23
  24 --- 55
  24 --- 71
  113 --- 24
  25 --- 56
  25 --- 68
  113 --- 25
  26 --- 57
  26 --- 69
  113 --- 26
  27 --- 88
  27 x--> 103
  27 --- 115
  27 --- 133
  28 --- 86
  28 x--> 103
  28 --- 118
  28 --- 132
  29 --- 85
  29 x--> 103
  29 --- 117
  29 --- 134
  30 --- 87
  30 x--> 103
  30 --- 116
  30 --- 131
  32 --- 99
  32 x--> 102
  32 --- 129
  32 --- 145
  33 --- 84
  33 x--> 100
  33 --- 114
  33 --- 130
  34 --- 97
  34 x--> 104
  34 --- 127
  34 --- 143
  35 --- 98
  35 x--> 105
  35 --- 128
  35 --- 144
  40 --- 89
  40 x--> 106
  40 --- 121
  40 --- 136
  41 --- 92
  41 x--> 106
  41 --- 120
  41 --- 138
  42 --- 91
  42 x--> 106
  42 --- 122
  42 --- 137
  43 --- 90
  43 x--> 106
  43 --- 119
  43 --- 135
  49 --- 96
  49 x--> 101
  49 --- 123
  49 --- 140
  50 --- 94
  50 x--> 101
  50 --- 124
  50 --- 142
  51 --- 93
  51 x--> 101
  51 --- 125
  51 --- 141
  52 --- 95
  52 x--> 101
  52 --- 126
  52 --- 139
  77 --- 85
  77 --- 86
  77 --- 87
  77 --- 88
  77 --- 103
  77 --- 110
  77 --- 115
  77 --- 116
  77 --- 117
  77 --- 118
  77 --- 131
  77 --- 132
  77 --- 133
  77 --- 134
  78 --- 84
  78 --- 100
  78 --- 107
  78 --- 114
  78 --- 130
  79 --- 97
  79 --- 104
  79 --- 111
  79 --- 127
  79 --- 143
  80 --- 98
  80 --- 105
  80 --- 112
  80 --- 128
  80 --- 144
  81 --- 99
  81 --- 102
  81 --- 109
  81 --- 129
  81 --- 145
  82 --- 89
  82 --- 90
  82 --- 91
  82 --- 92
  82 --- 106
  82 --- 113
  82 --- 119
  82 --- 120
  82 --- 121
  82 --- 122
  82 --- 135
  82 --- 136
  82 --- 137
  82 --- 138
  83 --- 93
  83 --- 94
  83 --- 95
  83 --- 96
  83 --- 101
  83 --- 108
  83 --- 123
  83 --- 124
  83 --- 125
  83 --- 126
  83 --- 139
  83 --- 140
  83 --- 141
  83 --- 142
  114 <--x 84
  130 <--x 84
  117 <--x 85
  118 <--x 86
  116 <--x 87
  115 <--x 88
  121 <--x 89
  119 <--x 90
  122 <--x 91
  120 <--x 92
  125 <--x 93
  124 <--x 94
  126 <--x 95
  123 <--x 96
  127 <--x 97
  143 <--x 97
  128 <--x 98
  144 <--x 98
  129 <--x 99
  145 <--x 99
  114 <--x 107
  123 <--x 108
  124 <--x 108
  125 <--x 108
  126 <--x 108
  129 <--x 109
  115 <--x 110
  116 <--x 110
  117 <--x 110
  118 <--x 110
  127 <--x 111
  128 <--x 112
  119 <--x 113
  120 <--x 113
  121 <--x 113
  122 <--x 113
  131 <--x 146
  132 <--x 149
  133 <--x 148
  134 <--x 147
  135 <--x 150
  136 <--x 152
  137 <--x 153
  138 <--x 151
  139 <--x 155
  140 <--x 154
  141 <--x 156
  142 <--x 157