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

@ -188,9 +188,9 @@ example = extrude(exampleSketch, length = 1)
sweepPath = startSketchOn(XZ)
|> startProfileAt([0.05, 0.05], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
|> tangentialArc(angle = 90, radius = 5)
|> line(end = [-3, 0])
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> tangentialArc(angle = -90, radius = 5)
|> line(end = [0, 7])
pipeHole = startSketchOn(XY)

View File

@ -65,7 +65,7 @@ case = startSketchOn(-XZ)
|> startProfileAt([-size, -size], %)
|> line(end = [2 * size, 0])
|> line(end = [0, 2 * size])
|> tangentialArcTo([-size, size], %)
|> tangentialArc(endAbsolute = [-size, size])
|> close()
|> extrude(length = 65)

View File

@ -128,8 +128,6 @@ layout: manual
* [`sweep`](kcl/sweep)
* [`tangentToEnd`](kcl/tangentToEnd)
* [`tangentialArc`](kcl/tangentialArc)
* [`tangentialArcTo`](kcl/tangentialArcTo)
* [`tangentialArcToRelative`](kcl/tangentialArcToRelative)
* [`toDegrees`](kcl/toDegrees)
* [`toRadians`](kcl/toRadians)
* [`translate`](kcl/translate)

View File

@ -57,7 +57,7 @@ case = startSketchOn(XY)
|> startProfileAt([-size, -size], %)
|> line(end = [2 * size, 0])
|> line(end = [0, 2 * size])
|> tangentialArcTo([-size, size], %)
|> tangentialArc(endAbsolute = [-size, size])
|> close(%)
|> extrude(length = 65)
@ -88,7 +88,7 @@ case = startSketchOn(XY)
|> startProfileAt([-size, -size], %)
|> line(end = [2 * size, 0])
|> line(end = [0, 2 * size])
|> tangentialArcTo([-size, size], %)
|> tangentialArc(endAbsolute = [-size, size])
|> close(%)
|> extrude(length = 65)

View File

@ -65,9 +65,9 @@ rotate(
sweepPath = startSketchOn(XZ)
|> startProfileAt([0.05, 0.05], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
|> tangentialArc(angle = 90, radius = 5)
|> line(end = [-3, 0])
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> tangentialArc(angle = -90, radius = 5)
|> line(end = [0, 7])
// Create a hole for the pipe.
@ -90,9 +90,9 @@ sweepSketch = startSketchOn(XY)
sweepPath = startSketchOn(XZ)
|> startProfileAt([0.05, 0.05], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
|> tangentialArc(angle = 90, radius = 5)
|> line(end = [-3, 0])
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> tangentialArc(angle = -90, radius = 5)
|> line(end = [0, 7])
// Create a hole for the pipe.
@ -115,9 +115,9 @@ sweepSketch = startSketchOn(XY)
sweepPath = startSketchOn(XZ)
|> startProfileAt([0.05, 0.05], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
|> tangentialArc(angle = 90, radius = 5)
|> line(end = [-3, 0])
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> tangentialArc(angle = -90, radius = 5)
|> line(end = [0, 7])
// Create a hole for the pipe.
@ -162,7 +162,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
sketch002 = startSketchOn(YZ)
sweepPath = startProfileAt([0, 0], sketch002)
|> yLine(length = 231.81)
|> tangentialArc({ radius = 80, offset = -90 }, %)
|> tangentialArc(radius = 80, angle = -90)
|> xLine(length = 384.93)
parts = sweep([rectangleSketch, circleSketch], path = sweepPath)

View File

@ -49,9 +49,9 @@ scale(
sweepPath = startSketchOn(XZ)
|> startProfileAt([0.05, 0.05], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
|> tangentialArc(angle = 90, radius = 5)
|> line(end = [-3, 0])
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> tangentialArc(angle = -90, radius = 5)
|> line(end = [0, 7])
// Create a hole for the pipe.
@ -96,7 +96,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
sketch002 = startSketchOn(YZ)
sweepPath = startProfileAt([0, 0], sketch002)
|> yLine(length = 231.81)
|> tangentialArc({ radius = 80, offset = -90 }, %)
|> tangentialArc(radius = 80, angle = -90)
|> xLine(length = 384.93)
parts = sweep([rectangleSketch, circleSketch], path = sweepPath)

View File

@ -30,7 +30,7 @@ segLen(tag: TagIdentifier): number
exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %)
|> angledLine(angle = 60, length = 10, tag = $thing)
|> tangentialArc({ offset = -120, radius = 5 }, %)
|> tangentialArc(angle = -120, radius = 5)
|> angledLine(angle = -60, length = segLen(thing))
|> close()

View File

@ -103,7 +103,7 @@ case = startSketchOn(-XZ)
|> startProfileAt([-size, -size], %)
|> line(end = [2 * size, 0])
|> line(end = [0, 2 * size])
|> tangentialArcTo([-size, size], %)
|> tangentialArc(endAbsolute = [-size, size])
|> close()
|> extrude(length = 65)
@ -128,7 +128,7 @@ case = startSketchOn(XY)
|> startProfileAt([-size, -size], %)
|> line(end = [2 * size, 0])
|> line(end = [0, 2 * size])
|> tangentialArcTo([-size, size], %)
|> tangentialArc(endAbsolute = [-size, size])
|> close()
|> extrude(length = 65)
@ -156,7 +156,7 @@ case = startSketchOn(XY)
|> startProfileAt([-size, -size], %)
|> line(end = [2 * size, 0])
|> line(end = [0, 2 * size])
|> tangentialArcTo([-size, size], %)
|> tangentialArc(endAbsolute = [-size, size])
|> close()
|> extrude(length = 65)

View File

@ -103,9 +103,9 @@ example = extrude(sketch001, length = 10)
sketch0011 = startSketchOn(XY)
|> startProfileAt([6.77, 0], %)
|> yLine(length = 1.27)
|> tangentialArcTo([5.96, 2.37], %)
|> tangentialArcTo([-6.2, 2.44], %)
|> tangentialArcTo([-6.6, 1.82], %)
|> tangentialArc(endAbsolute = [5.96, 2.37])
|> tangentialArc(endAbsolute = [-6.2, 2.44])
|> tangentialArc(endAbsolute = [-6.6, 1.82])
|> yLine(length = -1.82)
|> mirror2d( axis = X )
|> extrude(length = 10)

File diff suppressed because it is too large Load Diff

View File

@ -47,9 +47,9 @@ sweep(
sweepPath = startSketchOn(XZ)
|> startProfileAt([0.05, 0.05], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
|> tangentialArc(angle = 90, radius = 5)
|> line(end = [-3, 0])
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> tangentialArc(angle = -90, radius = 5)
|> line(end = [0, 7])
// Create a hole for the pipe.
@ -102,7 +102,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
sketch002 = startSketchOn(YZ)
sweepPath = startProfileAt([0, 0], sketch002)
|> yLine(length = 231.81)
|> tangentialArc({ radius = 80, offset = -90 }, %)
|> tangentialArc(radius = 80, angle = -90)
|> xLine(length = 384.93)
sweep([rectangleSketch, circleSketch], path = sweepPath)
@ -120,7 +120,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
sketch002 = startSketchOn(YZ)
sweepPath = startProfileAt([0, 0], sketch002)
|> yLine(length = 231.81)
|> tangentialArc({ radius = 80, offset = -90 }, %)
|> tangentialArc(radius = 80, angle = -90)
|> xLine(length = 384.93)
sweep(circleSketch, path = sweepPath, sectional = true)

View File

@ -31,9 +31,9 @@ tangentToEnd(tag: TagIdentifier): number
pillSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %)
|> line(end = [20, 0])
|> tangentialArcToRelative([0, 10], %, $arc1)
|> tangentialArc(end = [0, 10], tag = $arc1)
|> angledLine(angle = tangentToEnd(arc1), length = 20)
|> tangentialArcToRelative([0, -10], %)
|> tangentialArc(end = [0, -10])
|> close()
pillExtrude = extrude(pillSketch, length = 10)
@ -46,9 +46,9 @@ pillExtrude = extrude(pillSketch, length = 10)
pillSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %)
|> line(end = [0, 20])
|> tangentialArcTo([10, 20], %, $arc1)
|> tangentialArc(endAbsolute = [10, 20], tag = $arc1)
|> angledLine(angle = tangentToEnd(arc1), length = 20)
|> tangentialArcToRelative([-10, 0], %)
|> tangentialArc(end = [-10, 0])
|> close()
pillExtrude = extrude(pillSketch, length = 10)

File diff suppressed because one or more lines are too long

View File

@ -45,9 +45,9 @@ translate(
sweepPath = startSketchOn(XZ)
|> startProfileAt([0.05, 0.05], %)
|> line(end = [0, 7])
|> tangentialArc({ offset = 90, radius = 5 }, %)
|> tangentialArc(angle = 90, radius = 5)
|> line(end = [-3, 0])
|> tangentialArc({ offset = -90, radius = 5 }, %)
|> tangentialArc(angle = -90, radius = 5)
|> line(end = [0, 7])
// Create a hole for the pipe.
@ -97,7 +97,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
sketch002 = startSketchOn(YZ)
sweepPath = startProfileAt([0, 0], sketch002)
|> yLine(length = 231.81)
|> tangentialArc({ radius = 80, offset = -90 }, %)
|> tangentialArc(radius = 80, angle = -90)
|> xLine(length = 384.93)
parts = sweep([rectangleSketch, circleSketch], path = sweepPath)