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:
@ -253,6 +253,10 @@ const extrusion = extrude(5, sketch001)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -458,6 +462,10 @@ const extrusion = extrude(5, sketch001)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -257,6 +257,10 @@ const extrusion = extrude(5, sketch001)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -462,6 +466,10 @@ const extrusion = extrude(5, sketch001)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -172,6 +172,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -377,6 +381,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -584,6 +592,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -789,6 +801,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -171,6 +171,10 @@ const extrusion = extrude(10, sketch001)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -376,6 +380,10 @@ const extrusion = extrude(10, sketch001)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -583,6 +591,10 @@ const extrusion = extrude(10, sketch001)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -788,6 +800,10 @@ const extrusion = extrude(10, sketch001)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -173,6 +173,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -378,6 +382,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -585,6 +593,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -790,6 +802,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -265,6 +265,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -470,6 +474,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -677,6 +685,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -882,6 +894,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -170,6 +170,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -375,6 +379,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -582,6 +590,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -787,6 +799,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -170,6 +170,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -375,6 +379,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -582,6 +590,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -787,6 +799,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -183,6 +183,10 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -388,6 +392,10 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -595,6 +603,10 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -800,6 +812,10 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -176,6 +176,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -381,6 +385,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -588,6 +596,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -793,6 +805,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -398,6 +398,10 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -798,6 +802,10 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -169,6 +169,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -541,6 +545,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -748,6 +756,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -953,6 +965,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -171,6 +171,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -376,6 +380,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -583,6 +591,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -788,6 +800,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -196,6 +196,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -402,6 +406,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -728,6 +736,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -398,6 +398,10 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -798,6 +802,10 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -299,6 +299,10 @@ const part001 = startSketchOn('XY')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -690,6 +694,10 @@ const part001 = startSketchOn('XY')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -182,6 +182,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -388,6 +392,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -586,6 +594,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -791,6 +803,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -989,6 +1005,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -1194,6 +1214,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -162,6 +162,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -367,6 +371,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -162,6 +162,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -367,6 +371,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -175,6 +175,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -380,6 +384,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -587,6 +595,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -792,6 +804,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -162,6 +162,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -367,6 +371,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -574,6 +582,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -779,6 +791,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -180,6 +180,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -386,6 +390,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -304,6 +304,10 @@ const example = extrude(-5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -173,6 +173,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -379,6 +383,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -302,6 +302,10 @@ const example = extrude(1, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -304,6 +304,10 @@ let vase = layer()
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -163,6 +163,10 @@ const sketch001 = startSketchOn('XY')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -368,6 +372,10 @@ const sketch001 = startSketchOn('XY')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -158,6 +158,10 @@ const sketch001 = startSketchOn('XY')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -363,6 +367,10 @@ const sketch001 = startSketchOn('XY')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -157,6 +157,10 @@ const sketch001 = startSketchOn('XY')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -362,6 +366,10 @@ const sketch001 = startSketchOn('XY')
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -379,6 +379,10 @@ uuid |
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -584,6 +588,10 @@ uuid |
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -907,6 +915,10 @@ uuid |
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -386,6 +386,10 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -777,6 +781,10 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -241,6 +241,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -540,6 +544,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -745,6 +753,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -188,6 +188,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -393,6 +397,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -310,6 +310,10 @@ const a1 = startSketchOn({
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -722,6 +726,10 @@ const a1 = startSketchOn({
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
2128
docs/kcl/std.json
2128
docs/kcl/std.json
File diff suppressed because it is too large
Load Diff
@ -172,6 +172,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -377,6 +381,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -584,6 +592,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -789,6 +801,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -162,6 +162,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -367,6 +371,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -574,6 +582,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -779,6 +791,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -165,6 +165,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -370,6 +374,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -577,6 +585,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -782,6 +794,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -165,6 +165,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -370,6 +374,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -577,6 +585,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -782,6 +794,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -163,6 +163,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -368,6 +372,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -575,6 +583,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -780,6 +792,10 @@ const example = extrude(10, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
@ -161,6 +161,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -366,6 +370,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -573,6 +581,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
@ -778,6 +790,10 @@ const example = extrude(5, exampleSketch)
|
|||||||
type: "TangentialArcTo",
|
type: "TangentialArcTo",
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
|
// arc's direction
|
||||||
|
ccw: string,
|
||||||
|
// the arc's center
|
||||||
|
center: [number, number],
|
||||||
// The from point.
|
// The from point.
|
||||||
from: [number, number],
|
from: [number, number],
|
||||||
// The tag of the path.
|
// The tag of the path.
|
||||||
|
4
src-tauri/Cargo.lock
generated
4
src-tauri/Cargo.lock
generated
@ -2672,9 +2672,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kittycad"
|
name = "kittycad"
|
||||||
version = "0.3.9"
|
version = "0.3.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "36b87a9cca545825ba18005c1944b8525fac28867d99984178bf22c79fb5ec25"
|
checksum = "3d798c82f6e62d786fca0a7ec073675bbe9550c885efb99390d2701ca557ec69"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
6
src/wasm-lib/Cargo.lock
generated
6
src/wasm-lib/Cargo.lock
generated
@ -1480,9 +1480,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kittycad"
|
name = "kittycad"
|
||||||
version = "0.3.9"
|
version = "0.3.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "36b87a9cca545825ba18005c1944b8525fac28867d99984178bf22c79fb5ec25"
|
checksum = "3d798c82f6e62d786fca0a7ec073675bbe9550c885efb99390d2701ca557ec69"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -1858,7 +1858,7 @@ dependencies = [
|
|||||||
"bincode",
|
"bincode",
|
||||||
"either",
|
"either",
|
||||||
"fnv",
|
"fnv",
|
||||||
"itertools 0.12.1",
|
"itertools 0.10.5",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"nom",
|
"nom",
|
||||||
"quick-xml",
|
"quick-xml",
|
||||||
|
@ -1017,6 +1017,11 @@ impl SketchGroup {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
match path {
|
match path {
|
||||||
|
Path::TangentialArc { center, ccw, .. } => GetTangentialInfoFromPathsResult {
|
||||||
|
center_or_tangent_point: *center,
|
||||||
|
is_center: true,
|
||||||
|
ccw: *ccw,
|
||||||
|
},
|
||||||
Path::TangentialArcTo { center, ccw, .. } => GetTangentialInfoFromPathsResult {
|
Path::TangentialArcTo { center, ccw, .. } => GetTangentialInfoFromPathsResult {
|
||||||
center_or_tangent_point: *center,
|
center_or_tangent_point: *center,
|
||||||
is_center: true,
|
is_center: true,
|
||||||
@ -1346,6 +1351,11 @@ pub enum Path {
|
|||||||
TangentialArc {
|
TangentialArc {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
base: BasePath,
|
base: BasePath,
|
||||||
|
/// the arc's center
|
||||||
|
#[ts(type = "[number, number]")]
|
||||||
|
center: [f64; 2],
|
||||||
|
/// arc's direction
|
||||||
|
ccw: bool,
|
||||||
},
|
},
|
||||||
/// A path that is horizontal.
|
/// A path that is horizontal.
|
||||||
Horizontal {
|
Horizontal {
|
||||||
@ -1378,7 +1388,7 @@ impl Path {
|
|||||||
Path::AngledLineTo { base, .. } => base.geo_meta.id,
|
Path::AngledLineTo { base, .. } => base.geo_meta.id,
|
||||||
Path::Base { base } => base.geo_meta.id,
|
Path::Base { base } => base.geo_meta.id,
|
||||||
Path::TangentialArcTo { base, .. } => base.geo_meta.id,
|
Path::TangentialArcTo { base, .. } => base.geo_meta.id,
|
||||||
Path::TangentialArc { base } => base.geo_meta.id,
|
Path::TangentialArc { base, .. } => base.geo_meta.id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1389,7 +1399,7 @@ impl Path {
|
|||||||
Path::AngledLineTo { base, .. } => base.tag.clone(),
|
Path::AngledLineTo { base, .. } => base.tag.clone(),
|
||||||
Path::Base { base } => base.tag.clone(),
|
Path::Base { base } => base.tag.clone(),
|
||||||
Path::TangentialArcTo { base, .. } => base.tag.clone(),
|
Path::TangentialArcTo { base, .. } => base.tag.clone(),
|
||||||
Path::TangentialArc { base } => base.tag.clone(),
|
Path::TangentialArc { base, .. } => base.tag.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1400,7 +1410,7 @@ impl Path {
|
|||||||
Path::AngledLineTo { base, .. } => base,
|
Path::AngledLineTo { base, .. } => base,
|
||||||
Path::Base { base } => base,
|
Path::Base { base } => base,
|
||||||
Path::TangentialArcTo { base, .. } => base,
|
Path::TangentialArcTo { base, .. } => base,
|
||||||
Path::TangentialArc { base } => base,
|
Path::TangentialArc { base, .. } => base,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1411,7 +1421,7 @@ impl Path {
|
|||||||
Path::AngledLineTo { base, .. } => Some(base),
|
Path::AngledLineTo { base, .. } => Some(base),
|
||||||
Path::Base { base } => Some(base),
|
Path::Base { base } => Some(base),
|
||||||
Path::TangentialArcTo { base, .. } => Some(base),
|
Path::TangentialArcTo { base, .. } => Some(base),
|
||||||
Path::TangentialArc { base } => Some(base),
|
Path::TangentialArc { base, .. } => Some(base),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1681,42 +1681,65 @@ async fn inner_tangential_arc(
|
|||||||
args: Args,
|
args: Args,
|
||||||
) -> Result<Box<SketchGroup>, KclError> {
|
) -> Result<Box<SketchGroup>, KclError> {
|
||||||
let from: Point2d = sketch_group.current_pen_position()?;
|
let from: Point2d = sketch_group.current_pen_position()?;
|
||||||
|
// next set of lines is some undocumented voodoo from get_tangential_arc_to_info
|
||||||
|
let tangent_info = sketch_group.get_tangential_info_from_paths(); //this function desperately needs some documentation
|
||||||
|
let tan_previous_point = if tangent_info.is_center {
|
||||||
|
get_tangent_point_from_previous_arc(tangent_info.center_or_tangent_point, tangent_info.ccw, from.into())
|
||||||
|
} else {
|
||||||
|
tangent_info.center_or_tangent_point
|
||||||
|
};
|
||||||
|
|
||||||
let id = uuid::Uuid::new_v4();
|
let id = uuid::Uuid::new_v4();
|
||||||
|
|
||||||
let to = match &data {
|
let (center, to, ccw) = match data {
|
||||||
TangentialArcData::RadiusAndOffset { radius, offset } => {
|
TangentialArcData::RadiusAndOffset { radius, offset } => {
|
||||||
|
// KCL stdlib types use degrees.
|
||||||
|
let offset = Angle::from_degrees(offset);
|
||||||
|
|
||||||
// Calculate the end point from the angle and radius.
|
// Calculate the end point from the angle and radius.
|
||||||
let end_angle = Angle::from_degrees(*offset);
|
// atan2 outputs radians.
|
||||||
let start_angle = Angle::from_degrees(0.0);
|
let previous_end_tangent = Angle::from_radians(f64::atan2(
|
||||||
let (_, to) = arc_center_and_end(from, start_angle, end_angle, *radius);
|
from.y - tan_previous_point[1],
|
||||||
|
from.x - tan_previous_point[0],
|
||||||
|
));
|
||||||
|
// make sure the arc center is on the correct side to guarantee deterministic behavior
|
||||||
|
// note the engine automatically rejects an offset of zero, if we want to flag that at KCL too to avoid engine errors
|
||||||
|
let ccw = offset.degrees() > 0.0;
|
||||||
|
let tangent_to_arc_start_angle = if ccw {
|
||||||
|
// CCW turn
|
||||||
|
Angle::from_degrees(-90.0)
|
||||||
|
} else {
|
||||||
|
// CW turn
|
||||||
|
Angle::from_degrees(90.0)
|
||||||
|
};
|
||||||
|
// may need some logic and / or modulo on the various angle values to prevent them from going "backwards"
|
||||||
|
// but the above logic *should* capture that behavior
|
||||||
|
let start_angle = previous_end_tangent + tangent_to_arc_start_angle;
|
||||||
|
let end_angle = start_angle + offset;
|
||||||
|
let (center, to) = arc_center_and_end(from, start_angle, end_angle, radius);
|
||||||
|
|
||||||
args.batch_modeling_cmd(
|
args.batch_modeling_cmd(
|
||||||
id,
|
id,
|
||||||
ModelingCmd::ExtendPath {
|
ModelingCmd::ExtendPath {
|
||||||
path: sketch_group.id,
|
path: sketch_group.id,
|
||||||
segment: kittycad::types::PathSegment::TangentialArc {
|
segment: kittycad::types::PathSegment::TangentialArc { radius, offset },
|
||||||
radius: *radius,
|
|
||||||
offset: Angle {
|
|
||||||
unit: kittycad::types::UnitAngle::Degrees,
|
|
||||||
value: *offset,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
to.into()
|
(center, to.into(), ccw)
|
||||||
}
|
}
|
||||||
TangentialArcData::Point(to) => {
|
TangentialArcData::Point(to) => {
|
||||||
args.batch_modeling_cmd(id, tan_arc_to(&sketch_group, to)).await?;
|
args.batch_modeling_cmd(id, tan_arc_to(&sketch_group, &to)).await?;
|
||||||
|
// TODO: Figure out these calculations.
|
||||||
*to
|
let ccw = false;
|
||||||
|
let center = Point2d { x: 0.0, y: 0.0 };
|
||||||
|
(center, to, ccw)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let to = [from.x + to[0], from.y + to[1]];
|
|
||||||
|
|
||||||
let current_path = Path::TangentialArc {
|
let current_path = Path::TangentialArc {
|
||||||
|
ccw,
|
||||||
|
center: center.into(),
|
||||||
base: BasePath {
|
base: BasePath {
|
||||||
from: from.into(),
|
from: from.into(),
|
||||||
to,
|
to,
|
||||||
|
@ -833,6 +833,7 @@ pub fn get_tangent_point_from_previous_arc(
|
|||||||
) -> Coords2d {
|
) -> Coords2d {
|
||||||
let angle_from_old_center_to_arc_start = get_angle(last_arc_center, last_arc_end);
|
let angle_from_old_center_to_arc_start = get_angle(last_arc_center, last_arc_end);
|
||||||
let tangential_angle = angle_from_old_center_to_arc_start + if last_arc_ccw { -90.0 } else { 90.0 };
|
let tangential_angle = angle_from_old_center_to_arc_start + if last_arc_ccw { -90.0 } else { 90.0 };
|
||||||
|
// What is the 10.0 constant doing???
|
||||||
[
|
[
|
||||||
tangential_angle.to_radians().cos() * 10.0 + last_arc_end[0],
|
tangential_angle.to_radians().cos() * 10.0 + last_arc_end[0],
|
||||||
tangential_angle.to_radians().sin() * 10.0 + last_arc_end[1],
|
tangential_angle.to_radians().sin() * 10.0 + last_arc_end[1],
|
||||||
|
25
src/wasm-lib/tests/executor/inputs/tan_arc_x_line.kcl
Normal file
25
src/wasm-lib/tests/executor/inputs/tan_arc_x_line.kcl
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
let startX = 0
|
||||||
|
let startY = 0
|
||||||
|
let angleOffset = 135
|
||||||
|
let r = 1
|
||||||
|
let angleStart = 110
|
||||||
|
|
||||||
|
startSketchOn('XY')
|
||||||
|
|> startProfileAt([startX, startY], %)
|
||||||
|
|> angledLine({
|
||||||
|
angle: angleStart,
|
||||||
|
length: .000001,
|
||||||
|
}, %)
|
||||||
|
|> tangentialArc({
|
||||||
|
offset: angleOffset,
|
||||||
|
radius: r,
|
||||||
|
}, %, $arc1)
|
||||||
|
|> tangentialArc({
|
||||||
|
offset: angleOffset,
|
||||||
|
radius: 0.5*r,
|
||||||
|
}, %, $arc2)
|
||||||
|
|> tangentialArc({
|
||||||
|
offset: -angleOffset,
|
||||||
|
radius: 0.5*r,
|
||||||
|
}, %, $arc3)
|
||||||
|
|> xLineTo(1, %)
|
@ -31,6 +31,13 @@ async fn kcl_test_riddle_small() {
|
|||||||
assert_out("riddle_small", &result);
|
assert_out("riddle_small", &result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tokio::test(flavor = "multi_thread")]
|
||||||
|
async fn kcl_test_tan_arc_x_line() {
|
||||||
|
let code = kcl_input!("tan_arc_x_line");
|
||||||
|
let result = execute_and_snapshot(code, UnitLength::Mm).await.unwrap();
|
||||||
|
assert_out("tan_arc_x_line", &result);
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::test(flavor = "multi_thread")]
|
#[tokio::test(flavor = "multi_thread")]
|
||||||
async fn kcl_test_lego() {
|
async fn kcl_test_lego() {
|
||||||
let code = kcl_input!("lego");
|
let code = kcl_input!("lego");
|
||||||
|
BIN
src/wasm-lib/tests/executor/outputs/tan_arc_x_line.png
Normal file
BIN
src/wasm-lib/tests/executor/outputs/tan_arc_x_line.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
Reference in New Issue
Block a user