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

@ -10,41 +10,41 @@ let corner_radius = 5.0
let brace_base = startSketchOn(XY)
|> startProfileAt([corner_radius, 0], %)
|> line(end = [width - corner_radius, 0.0])
|> tangentialArcToRelative([corner_radius, corner_radius], %)
|> tangentialArc(end = [corner_radius, corner_radius])
|> yLine(length = 25.0 - corner_radius)
|> tangentialArcToRelative([-corner_radius, corner_radius], %)
|> tangentialArc(end = [-corner_radius, corner_radius])
|> xLine(length = -(d_wrist_circumference[0] - (corner_radius * 2)))
|> tangentialArcToRelative([-corner_radius, corner_radius], %)
|> tangentialArc(end = [-corner_radius, corner_radius])
|> yLine(length = length - 25.0 - 23.0 - (corner_radius * 2))
|> tangentialArcToRelative([corner_radius, corner_radius], %)
|> tangentialArc(end = [corner_radius, corner_radius])
|> xLine(length = 15.0 - (corner_radius * 2))
|> tangentialArcToRelative([corner_radius, corner_radius], %)
|> tangentialArc(end = [corner_radius, corner_radius])
|> yLine(length = 23.0 - corner_radius)
|> tangentialArcToRelative([-corner_radius, corner_radius], %)
|> tangentialArc(end = [-corner_radius, corner_radius])
|> xLine(length = -(hand_thickness + 15.0 + 15.0 - (corner_radius * 2)))
|> tangentialArcToRelative([-corner_radius, -corner_radius], %)
|> tangentialArc(end = [-corner_radius, -corner_radius])
|> yLine(length = -(23.0 - corner_radius))
|> tangentialArcToRelative([corner_radius, -corner_radius], %)
|> tangentialArc(end = [corner_radius, -corner_radius])
|> xLine(length = 15.0 - (corner_radius * 2))
|> tangentialArcToRelative([corner_radius, -corner_radius], %)
|> tangentialArc(end = [corner_radius, -corner_radius])
|> yLine(length = -(length - 25.0 - 23.0 - (corner_radius * 2)))
|> tangentialArcToRelative([-corner_radius, -corner_radius], %)
|> tangentialArc(end = [-corner_radius, -corner_radius])
|> xLine(length = -(d_wrist_circumference[1] + d_wrist_circumference[2] + d_wrist_circumference[3] - hand_thickness - corner_radius))
|> tangentialArcToRelative([-corner_radius, -corner_radius], %)
|> tangentialArc(end = [-corner_radius, -corner_radius])
|> yLine(length = -(25.0 - corner_radius))
|> tangentialArcToRelative([corner_radius, -corner_radius], %)
|> tangentialArc(end = [corner_radius, -corner_radius])
|> close()
let inner = startSketchOn(XY)
|> startProfileAt([0, 0], %)
|> xLine(length = 1.0)
|> tangentialArcToRelative([corner_radius, corner_radius], %)
|> tangentialArc(end = [corner_radius, corner_radius])
|> yLine(length = 25.0 - (corner_radius * 2))
|> tangentialArcToRelative([-corner_radius, corner_radius], %)
|> tangentialArc(end = [-corner_radius, corner_radius])
|> xLine(length = -1.0)
|> tangentialArcToRelative([-corner_radius, -corner_radius], %)
|> tangentialArc(end = [-corner_radius, -corner_radius])
|> yLine(length = -(25.0 - (corner_radius * 2)))
|> tangentialArcToRelative([corner_radius, -corner_radius], %)
|> tangentialArc(end = [corner_radius, -corner_radius])
|> close()
let final = brace_base

View File

@ -11,17 +11,17 @@ const wallMountL = 8
const 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

@ -763,9 +763,9 @@ const sketch010fl = startSketchOn(extrude001fl, 'START')
originStart[2] + .81 - (.438 / 2)
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([-0.66 - originStart[0],originStart[2] + .81 + .438 / 2], %)
|> tangentialArc(endAbsolute = [-0.66 - originStart[0],originStart[2] + .81 + .438 / 2])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, 1],
@ -781,12 +781,12 @@ const sketch011fl = startSketchOn(extrude001fl, 'START')
originStart[2] + railHeight * 1.75 / 2 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
-0.66 - originStart[0],originStart[2]+
railHeight * 1.75 / 2 - (.438 / 2)
], %)
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + railHeight * 1.75 / 2 - (.438 / 2)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
const extrude011fl = extrude(sketch011fl, length = -thickness)
@ -798,12 +798,12 @@ const sketch012fl = startSketchOn(extrude001fl, 'START')
railHeight * 1.75 - .81 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0], originStart[2]+
railHeight * 1.75 - .81 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, -1],
@ -1006,12 +1006,12 @@ const sketch010fr = startSketchOn(extrude001fr, 'START')
originStart[2] + .81 - (.438 / 2)
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + .81 + .438 / 2
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, 1],
@ -1027,12 +1027,12 @@ const sketch011fr = startSketchOn(extrude001fr, 'START')
originStart[2] + railHeight * 1.75 / 2 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + railHeight * 1.75 / 2 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
const extrude011fr = extrude(sketch011fr, length = -thickness)
@ -1044,12 +1044,12 @@ const sketch012fr = startSketchOn(extrude001fr, 'START')
originStart[2] + railHeight * 1.75 - .81 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + railHeight * 1.75 - .81 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, -1],
@ -1252,12 +1252,12 @@ const sketch010rr = startSketchOn(extrude001rr, 'START')
originStart[2] + .81 - (.438 / 2)
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0]+1.5-serverDepth,
originStart[2] + .81 + .438 / 2
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, 1],
@ -1273,12 +1273,12 @@ const sketch011rr = startSketchOn(extrude001rr, 'START')
originStart[2] + railHeight * 1.75 / 2 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0]+1.5-serverDepth,
originStart[2] + railHeight * 1.75 / 2 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
const extrude011rr = extrude(sketch011rr, length = -thickness)
@ -1290,12 +1290,12 @@ const sketch012rr = startSketchOn(extrude001rr, 'START')
originStart[2] + railHeight * 1.75 - .81 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0]+1.5-serverDepth,
originStart[2] + railHeight * 1.75 - .81 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, -1],
@ -1497,12 +1497,12 @@ const sketch010rl = startSketchOn(extrude001rl, 'START')
originStart[2] + .81 - (.438 / 2)
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0] - serverDepth + 1.5,
originStart[2] + .81 + .438 / 2
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, 1],
@ -1518,12 +1518,12 @@ const sketch011rl = startSketchOn(extrude001rl, 'START')
originStart[2] + railHeight * 1.75 / 2 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0] - serverDepth + 1.5,
originStart[2] + railHeight * 1.75 / 2 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
const extrude011rl = extrude(sketch011rl, length = -thickness)
@ -1535,12 +1535,12 @@ const sketch012rl = startSketchOn(extrude001rl, 'START')
originStart[2] + railHeight * 1.75 - .81 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0] - serverDepth + 1.5,
originStart[2] + railHeight * 1.75 - .81 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, -1],
@ -1593,15 +1593,15 @@ fn streamServer = (serverPos) => {
|> xLine(length = 0.2)
|> yLine(length = -0.36)
|> xLine(length = 0.5)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
0.3,
17.15 + 4.114 + 1 + serverPos * 1.75 - 11.114
], %)
])
|> yLine(length = -1.77)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.13,
14.89 + 4.114 + 1 + serverPos * 1.75 - 11.114
], %)
])
|> xLine(length = -0.52)
|> yLine(length = -0.42)
|> line(end = [0.34, -0.15])
@ -1617,15 +1617,15 @@ fn streamServer = (serverPos) => {
|> xLine(length = 0.2)
|> yLine(length = -0.36)
|> xLine(length = 0.5)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
0.3,
17.15 + 4.114 + 1 + serverPos * 1.75 - 11.114
], %)
])
|> yLine(length = -1.77)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.13,
14.89 + 4.114 + 1 + serverPos * 1.75 - 11.114
], %)
])
|> xLine(length = -0.52)
|> yLine(length = -0.42)
|> line(end = [0.34, -0.15])

View File

@ -676,12 +676,12 @@ const sketch010fl = startSketchOn(extrude001fl, 'START')
originStart[2] + .81 - (.438 / 2)
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + .81 + .438 / 2
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, 1],
@ -697,12 +697,12 @@ const sketch011fl = startSketchOn(extrude001fl, 'START')
originStart[2] + railHeight * 1.75 / 2 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + railHeight * 1.75 / 2 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
const extrude011fl = extrude(sketch011fl, length = -thickness)
@ -714,12 +714,12 @@ const sketch012fl = startSketchOn(extrude001fl, 'START')
originStart[2] + railHeight * 1.75 - .81 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + railHeight * 1.75 - .81 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, -1],
@ -814,12 +814,12 @@ const sketch010fr = startSketchOn(extrude001fr, 'START')
originStart[2] + .81 - (.438 / 2)
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + .81 + .438 / 2
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, 1],
@ -835,12 +835,12 @@ const sketch011fr = startSketchOn(extrude001fr, 'START')
originStart[2] + railHeight * 1.75 / 2 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + railHeight * 1.75 / 2 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
const extrude011fr = extrude(sketch011fr, length = -thickness)
@ -852,12 +852,12 @@ const sketch012fr = startSketchOn(extrude001fr, 'START')
originStart[2] + railHeight * 1.75 - .81 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0],
originStart[2] + railHeight * 1.75 - .81 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, -1],
@ -952,12 +952,12 @@ const sketch010rr = startSketchOn(extrude001rr, 'START')
originStart[2] + .81 - (.438 / 2)
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0] + 1.5 - serverDepth,
originStart[2] + .81 + .438 / 2
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, 1],
@ -973,12 +973,12 @@ const sketch011rr = startSketchOn(extrude001rr, 'START')
originStart[2] + railHeight * 1.75 / 2 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0] + 1.5 - serverDepth,
originStart[2] + railHeight * 1.75 / 2 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
const extrude011rr = extrude(sketch011rr, length = -thickness)
@ -990,12 +990,12 @@ const sketch012rr = startSketchOn(extrude001rr, 'START')
originStart[2] + railHeight * 1.75 - .81 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0] + 1.5 - serverDepth,
originStart[2] + railHeight * 1.75 - .81 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, -1],
@ -1089,12 +1089,12 @@ const sketch010rl = startSketchOn(extrude001rl, 'START')
originStart[2] + .81 - (.438 / 2)
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0] - serverDepth + 1.5,
originStart[2] + .81 + .438 / 2
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, 1],
@ -1110,12 +1110,12 @@ const sketch011rl = startSketchOn(extrude001rl, 'START')
originStart[2] + railHeight * 1.75 / 2 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0] - serverDepth + 1.5,
originStart[2] + railHeight * 1.75 / 2 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
const extrude011rl = extrude(sketch011rl, length = -thickness)
@ -1127,12 +1127,12 @@ const sketch012rl = startSketchOn(extrude001rl, 'START')
originStart[2] + railHeight * 1.75 - .81 + .438 / 2
], %)
|> xLine(length = 0.75 - .438)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.66 - originStart[0] - serverDepth + 1.5,
originStart[2] + railHeight * 1.75 - .81 - (.438 / 2)
], %)
])
|> xLine(length = -0.75 + .438)
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> patternLinear2d(
axis = [0, -1],
@ -1184,15 +1184,15 @@ fn streamServer = (serverPos) => {
|> xLine(length = 0.2)
|> yLine(length = -0.36)
|> xLine(length = 0.5)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
0.3,
17.15 + 4.114 + 1 + serverPos * 1.75 - 11.114
], %)
])
|> yLine(length = -1.77)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.13,
14.89 + 4.114 + 1 + serverPos * 1.75 - 11.114
], %)
])
|> xLine(length = -0.52)
|> yLine(length = -0.42)
|> line(end = [0.34, -0.15])
@ -1208,15 +1208,15 @@ fn streamServer = (serverPos) => {
|> xLine(length = 0.2)
|> yLine(length = -0.36)
|> xLine(length = 0.5)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
0.3,
17.15 + 4.114 + 1 + serverPos * 1.75 - 11.114
], %)
])
|> yLine(length = -1.77)
|> tangentialArcTo([
|> tangentialArc(endAbsolute = [
-0.13,
14.89 + 4.114 + 1 + serverPos * 1.75 - 11.114
], %)
])
|> xLine(length = -0.52)
|> yLine(length = -0.42)
|> line(end = [0.34, -0.15])

View File

@ -10,16 +10,17 @@ startSketchOn(XY)
angle = angleStart,
length = .000001,
)
|> tangentialArc({
offset: angleOffset,
|> tangentialArc(
angle = angleOffset,
radius: r,
}, %, $arc1)
|> tangentialArc({
offset: angleOffset,
radius: 0.5*r,
}, %, $arc2)
|> tangentialArc({
offset: -angleOffset,
radius: 0.5*r,
}, %, $arc3)
tag = $arc1,
)
|> tangentialArc(
angle = angleOffset,
radius = 0.5*r,
tag = $arc2)
|> tangentialArc(
angle = -angleOffset,
radius = 0.5*r,
tag = $arc3)
|> xLine(endAbsolute = 1)

View File

@ -1,6 +1,6 @@
const boxSketch = startSketchOn(XY)
|> startProfileAt([0, 0], %)
|> line(end = [0, 10])
|> tangentialArc({radius: 5, offset: 90}, %)
|> tangentialArc(radius = 5, angle = 90)
|> line(end = [5, -15])
|> extrude(length = 10)

View File

@ -159,7 +159,7 @@ async fn kcl_test_basic_tangential_arc_with_point() {
let code = r#"boxSketch = startSketchOn(XY)
|> startProfileAt([0, 0], %)
|> line(end = [0, 10])
|> tangentialArcToRelative([-5, 5], %)
|> tangentialArc(end = [-5, 5])
|> line(end = [5, -15])
|> extrude(length = 10)
"#;
@ -173,7 +173,7 @@ async fn kcl_test_basic_tangential_arc_to() {
let code = r#"boxSketch = startSketchOn(XY)
|> startProfileAt([0, 0], %)
|> line(end = [0, 10])
|> tangentialArcTo([-5, 15], %)
|> tangentialArc(endAbsolute = [-5, 15])
|> line(end = [5, -15])
|> extrude(length = 10)
"#;
@ -224,14 +224,14 @@ 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)
@ -306,7 +306,7 @@ thing = other_circle([2, 2], 20)
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_rounded_with_holes() {
let code = r#"fn tarc = (to, sktch, tag?) => {
return tangentialArcTo(to, sktch, tag)
return tangentialArc(sktch, endAbsolute = to, tag = tag)
}
fn roundedRectangle = (pos, w, l, cornerRadius) => {
@ -705,7 +705,7 @@ async fn kcl_test_error_sketch_on_arc_face() {
let code = r#"fn cube = (pos, scale) => {
sg = startSketchOn(XY)
|> startProfileAt(pos, %)
|> tangentialArcToRelative([0, scale], %, $here)
|> tangentialArc(end = [0, scale], tag = $here)
|> line(end = [scale, 0])
|> line(end = [0, -scale])
@ -1342,7 +1342,7 @@ async fn kcl_test_error_empty_start_sketch_on_string() {
|> line(end = [190.03, -118.13])
|> line(end = [-33.38, -202.86])
|> line(end = [-315.86, -64.2])
|> tangentialArcTo([-147.66, 121.34], %)
|> tangentialArc(endAbsolute = [-147.66, 121.34])
|> close()
|> extrude(length = 100)
@ -1352,10 +1352,11 @@ secondSketch = startSketchOn(part001, '')
"#;
let result = execute_and_snapshot(code, None).await;
assert!(result.is_err());
let err = result.unwrap_err();
let err = err.as_kcl_error().unwrap();
assert_eq!(
result.err().unwrap().to_string(),
r#"semantic: KclErrorDetails { source_ranges: [SourceRange([297, 299, 0])], message: "Argument at index 1 was supposed to be type Option<FaceTag> but found string (text)" }"#
err.message(),
"Argument at index 1 was supposed to be type Option<FaceTag> but found string (text)"
);
}