Do multiple chamfer/fillet in one API call (#6750)

KCL's `fillet` function takes an array of edges to fillet. Previously this would do `n` fillet API commands, one per edge. This PR combines them all into one call, which should improve performance. You can see the effect in the  artifact_commands snapshots, e.g. `rust/kcl-lib/tests/kcl_samples/axial-fan/artifact_commands.snap` 

Besides performance, this should fix a bug where some KCL fillets would fail, when they should have succeeded. Example from @max-mrgrsk:

```kcl
sketch001 = startSketchOn(XY)
  |> startProfile(at = [-12, -6])
  |> line(end = [0, 12], tag = $seg04)
  |> line(end = [24, 0], tag = $seg03)
  |> line(end = [0, -12], tag = $seg02)
  |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg01)
  |> close()
extrude001 = extrude(
       sketch001,
       length = 12,
       tagEnd = $capEnd001,
       tagStart = $capStart001,
     )
  |> fillet(
       radius = 5,
       tags = [
         getCommonEdge(faces = [seg02, capEnd001]),
         getCommonEdge(faces = [seg01, capEnd001]),
         getCommonEdge(faces = [seg03, capEnd001]),
         getCommonEdge(faces = [seg04, capEnd001])
       ],
     )
```

This program fails on main, but succeeds on this branch.
This commit is contained in:
Adam Chalmers
2025-05-22 16:25:55 -05:00
committed by GitHub
parent 4e2deca5d8
commit 85ccc6900c
58 changed files with 419 additions and 2499 deletions

View File

@ -370,15 +370,7 @@ flowchart LR
265["SweepEdge Adjacent"]
266["SweepEdge Adjacent"]
267["EdgeCut Fillet<br>[5131, 5642, 1]"]
268["EdgeCut Fillet<br>[5131, 5642, 1]"]
269["EdgeCut Fillet<br>[5131, 5642, 1]"]
270["EdgeCut Fillet<br>[5131, 5642, 1]"]
271["EdgeCut Fillet<br>[5131, 5642, 1]"]
272["EdgeCut Fillet<br>[5131, 5642, 1]"]
273["EdgeCut Fillet<br>[5131, 5642, 1]"]
274["EdgeCut Fillet<br>[5131, 5642, 1]"]
275["EdgeCut Fillet<br>[412, 470, 3]"]
276["EdgeCut Fillet<br>[412, 470, 3]"]
268["EdgeCut Fillet<br>[412, 470, 3]"]
1 --- 8
1 --- 9
1 --- 10
@ -619,7 +611,6 @@ flowchart LR
71 x--> 178
71 --- 220
71 --- 264
71 --- 276
72 --- 149
72 x--> 181
72 --- 194
@ -959,13 +950,6 @@ flowchart LR
213 <--x 189
214 <--x 189
215 <--x 189
220 <--x 275
223 <--x 270
224 <--x 274
225 <--x 273
226 <--x 267
260 <--x 271
261 <--x 268
262 <--x 269
263 <--x 272
220 <--x 268
223 <--x 267
```