Returns the current pen angle in degrees
The angle represents the tangent direction at the current pen position, based on the last drawing operation (line, arc, bezier, etc.). Returns 0 if nothing has been drawn yet.
Returns the current pen position as [x, y] coordinates
Protected_ProtectedfirstProtectedpendingProtectedplaneProtectedpointerProtected_Protected_Protected_Protected_Protected_Protected_Return the last curve in the pending list, or null if empty.
Protected_Require that a previous curve exists, returning it or throwing.
Protected_Resolve a relative offset from the current pointer position.
Protected_ProtectedbuildDraw an arc to a relative end point using a bulge factor.
Draw an arc to an absolute end point using a bulge factor (sagitta as fraction of half-chord).
Close the path with a straight line to the start point and return the Sketch.
Close the path by mirroring all edges about the line from first to last point.
Mirrors in 3D after assembling the partial wire to ensure exact endpoint matching across kernels.
Release resources held by this sketcher (lightweight — no kernel handles during drawing).
Finish drawing and return the open-wire Sketch (does not close the path).
Draw an elliptical arc to a relative end point (SVG-style parameters).
Draw an elliptical arc to an absolute end point (SVG-style parameters).
Draw a half-ellipse arc to a relative end point with a given minor radius.
Draw a half-ellipse arc to an absolute end point with a given minor radius.
Draw a horizontal bulge arc of the given distance and bulge factor.
Draw a horizontal line of the given signed distance.
Draw a horizontal line to an absolute X coordinate.
Draw a horizontal sagitta arc of the given distance and bulge.
Draw a straight line by relative horizontal and vertical distances.
Move the pen to an absolute 2D position before drawing any curves.
Draw a line in polar coordinates (distance and angle in degrees) from the current point.
Draw a line to a point given in polar coordinates [r, theta] from the origin.
Draw a circular arc to a relative end point, bulging by the given sagitta.
Override to preserve the original Sketcher's sagitta direction convention.
BaseSketcher2d computes the perpendicular as [-dy, dx] (counter-clockwise rotation),
but the original Sketcher used cross(diff, plane.zDir) which produces [dy, -dx]
(clockwise rotation) for standard planes. Negating the sagitta compensates for this,
ensuring all sagitta/bulge arcs curve the same way as the original 3D implementation.
ProtectedsaveDraw a smooth cubic Bezier spline to a relative end point, blending tangent with the previous curve.
OptionalsplineConfig: SplineOptionsDraw a smooth cubic Bezier spline to an absolute end point, blending tangent with the previous curve.
Optionalconfig: SplineOptionsDraw a circular arc tangent to the previous curve, ending at a relative offset.
Draw a circular arc tangent to the previous curve, ending at an absolute point.
Draw a line tangent to the previous curve, extending by the given distance.
Draw a circular arc through a via-point to an end point, both as relative distances.
Draw a vertical bulge arc of the given distance and bulge factor.
Draw a vertical line of the given signed distance.
Draw a vertical line to an absolute Y coordinate.
Draw a vertical sagitta arc of the given distance and bulge.
Build 2D wire profiles on a 3D plane using a builder-pen API.
The Sketcher accumulates 2D curves in the local coordinate system of the chosen plane, then lifts them to 3D edges at finalization.
Example
See