Fix tanArcTo (#3318)

* updated tangentArc math

* Add a test case showing tan arc then xLineTo

* Fix compile errors

* Tweaking the math

* Use + on angles

* atan2 outputs radians, not degrees

* Track ccw and center of all tan arcs

* re-sequenced atan2 arcTan

* Remove print statements

* Update the test

* Update kittycad in tauri

* New arc fields

---------

Co-authored-by: Jordan Noone <jordan@kittycad.io>
This commit is contained in:
Adam Chalmers
2024-08-07 18:35:41 -05:00
committed by GitHub
parent 6773dbe7ff
commit 6f4bbdb79e
49 changed files with 2700 additions and 26 deletions

View File

@ -172,6 +172,10 @@ const example = extrude(10, exampleSketch)
type: "TangentialArcTo",
} |
{
// arc's direction
ccw: string,
// the arc's center
center: [number, number],
// The from point.
from: [number, number],
// The tag of the path.
@ -377,6 +381,10 @@ const example = extrude(10, exampleSketch)
type: "TangentialArcTo",
} |
{
// arc's direction
ccw: string,
// the arc's center
center: [number, number],
// The from point.
from: [number, number],
// The tag of the path.
@ -584,6 +592,10 @@ const example = extrude(10, exampleSketch)
type: "TangentialArcTo",
} |
{
// arc's direction
ccw: string,
// the arc's center
center: [number, number],
// The from point.
from: [number, number],
// The tag of the path.
@ -789,6 +801,10 @@ const example = extrude(10, exampleSketch)
type: "TangentialArcTo",
} |
{
// arc's direction
ccw: string,
// the arc's center
center: [number, number],
// The from point.
from: [number, number],
// The tag of the path.