BREAKING: Change tangential arc to keyword args (#6266)

* Change tangentialArc, tangentialArcTo, and tangentialArcToRelative to keyword args

* Change tangentialArc offset to angle and convert to kw arg calls

* Fix lints

* Fix sketch errors and all unit tests passing

* Fix tangentialArcTo calls in KCL samples

* Update tangentialArc in samples

* Update sim test output

* Fix formatting

* Fix mistake in merge

* Fix gear rack sample

* Update output after more samples fixes

* Update gear rack output

* Add end label to docs snippet

* Fix to not add endAbsolute for an arc with radius or angle arguments

* Update docs outputs

* Fix formatting

* Fix executor tests

* Fix formatting

* Fix bench input files

* Fix spelling

* Improve error messages

---------

Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
This commit is contained in:
Jonathan Tran
2025-04-11 14:17:20 -04:00
committed by GitHub
parent 66f95d25f6
commit 319c60d4fa
129 changed files with 13063 additions and 17144 deletions

View File

@ -3,17 +3,17 @@ flowchart LR
subgraph path2 [Path]
2["Path<br>[262, 287, 0]"]
3["Segment<br>[293, 320, 0]"]
4["Segment<br>[326, 377, 0]"]
5["Segment<br>[383, 412, 0]"]
6["Segment<br>[418, 445, 0]"]
7["Segment<br>[451, 479, 0]"]
8["Segment<br>[485, 568, 0]"]
9["Segment<br>[574, 602, 0]"]
10["Segment<br>[608, 616, 0]"]
4["Segment<br>[326, 369, 0]"]
5["Segment<br>[375, 404, 0]"]
6["Segment<br>[410, 437, 0]"]
7["Segment<br>[443, 471, 0]"]
8["Segment<br>[477, 533, 0]"]
9["Segment<br>[539, 567, 0]"]
10["Segment<br>[573, 581, 0]"]
11[Solid2d]
end
1["Plane<br>[239, 256, 0]"]
12["Sweep Extrusion<br>[622, 645, 0]"]
12["Sweep Extrusion<br>[587, 610, 0]"]
13[Wall]
14[Wall]
15[Wall]

View File

@ -663,74 +663,52 @@ description: Result of parsing parametric_with_tan_arc.kcl
{
"arguments": [
{
"commentStart": 0,
"end": 0,
"properties": [
{
"type": "LabeledArg",
"label": {
"commentStart": 0,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 0,
"end": 0,
"name": {
"commentStart": 0,
"end": 0,
"key": {
"commentStart": 0,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"name": "filletR",
"start": 0,
"type": "ObjectProperty",
"value": {
"abs_path": false,
"commentStart": 0,
"end": 0,
"name": {
"commentStart": 0,
"end": 0,
"name": "filletR",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
"type": "Identifier"
},
{
"commentStart": 0,
"end": 0,
"key": {
"commentStart": 0,
"end": 0,
"name": "offset",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ObjectProperty",
"value": {
"commentStart": 0,
"end": 0,
"raw": "90",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 90.0,
"suffix": "None"
}
}
}
],
"start": 0,
"type": "ObjectExpression",
"type": "ObjectExpression"
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
},
{
"commentStart": 0,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
"type": "LabeledArg",
"label": {
"commentStart": 0,
"end": 0,
"name": "angle",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 0,
"end": 0,
"raw": "90",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 90.0,
"suffix": "None"
}
}
}
],
"callee": {
@ -751,8 +729,9 @@ description: Result of parsing parametric_with_tan_arc.kcl
"commentStart": 0,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
@ -989,106 +968,84 @@ description: Result of parsing parametric_with_tan_arc.kcl
{
"arguments": [
{
"commentStart": 0,
"end": 0,
"properties": [
{
"type": "LabeledArg",
"label": {
"commentStart": 0,
"end": 0,
"name": "radius",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 0,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 0,
"end": 0,
"key": {
"name": {
"commentStart": 0,
"end": 0,
"name": "radius",
"name": "filletR",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "ObjectProperty",
"value": {
"commentStart": 0,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 0,
"end": 0,
"name": {
"commentStart": 0,
"end": 0,
"name": "filletR",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 0,
"end": 0,
"name": {
"commentStart": 0,
"end": 0,
"name": "thickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
"type": "Name",
"type": "Name"
},
{
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 0,
"end": 0,
"key": {
"name": {
"commentStart": 0,
"end": 0,
"name": "offset",
"name": "thickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "ObjectProperty",
"value": {
"argument": {
"commentStart": 0,
"end": 0,
"raw": "90",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 90.0,
"suffix": "None"
}
},
"commentStart": 0,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
}
],
"start": 0,
"type": "ObjectExpression",
"type": "ObjectExpression"
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"commentStart": 0,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
"type": "LabeledArg",
"label": {
"commentStart": 0,
"end": 0,
"name": "angle",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 0,
"end": 0,
"raw": "90",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 90.0,
"suffix": "None"
}
},
"commentStart": 0,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
}
],
"callee": {
@ -1109,8 +1066,9 @@ description: Result of parsing parametric_with_tan_arc.kcl
"commentStart": 0,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [

View File

@ -11,14 +11,11 @@ wallMountL = 8
bracket = startSketchOn(XY)
|> startProfileAt([0, 0], %)
|> line(end = [0, wallMountL])
|> tangentialArc({ radius = filletR, offset = 90 }, %)
|> tangentialArc(radius = filletR, angle = 90)
|> line(end = [-shelfMountL, 0])
|> line(end = [0, -thickness])
|> line(end = [shelfMountL, 0])
|> tangentialArc({
radius = filletR - thickness,
offset = -90
}, %)
|> tangentialArc(radius = filletR - thickness, angle = -90)
|> line(end = [0, -wallMountL])
|> close(%)
|> extrude(length = width)

View File

@ -15,14 +15,11 @@ wallMountL = 8
bracket = startSketchOn(XY)
|> startProfileAt([0, 0], %)
|> line(end = [0, wallMountL])
|> tangentialArc({ radius = filletR, offset = 90 }, %)
|> tangentialArc(radius = filletR, angle = 90)
|> line(end = [-shelfMountL, 0])
|> line(end = [0, -thickness])
|> line(end = [shelfMountL, 0])
|> tangentialArc({
radius = filletR - thickness,
offset = -90
}, %)
|> tangentialArc(radius = filletR - thickness, angle = -90)
|> line(end = [0, -wallMountL])
|> close(%)
|> extrude(length = width)