sketch# Sketch

Represents a 2D sketch on a specified plane.

Constructor

new Sketch(planeopt)

Creates a new Sketch on the given plane.

Parameters:
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The sketch plane.

Members

pointer

Returns the current pointer position.

Methods

bezierCurveTo(points) → {Sketch}

Adds a Bezier curve from the pointer through the given points.

Parameters:
NameTypeDescription
pointsArray.<Vector>

Control points (excluding start).

Returns:

The current Sketch instance.

Type: 
Sketch

line(offset) → {Sketch}

Adds a line from the pointer by the given offset.

Parameters:
NameTypeDescription
offsetVector

The offset vector.

Returns:

The current Sketch instance.

Type: 
Sketch

lineAtAngle(params) → {Sketch}

Adds a line at a given angle and length from the pointer.

Parameters:
NameTypeDescription
paramsObject

Parameters.

Properties
NameTypeDescription
lengthnumber

The line length.

anglenumber

The angle in radians.

Returns:

The current Sketch instance.

Type: 
Sketch

lineTo(point) → {Sketch}

Adds a line from the current pointer to the given point.

Parameters:
NameTypeDescription
pointVector

The end point of the line.

Returns:

The current Sketch instance.

Type: 
Sketch

movePointerTo(point) → {Sketch}

Moves the pointer to a given point (only if no edges exist).

Parameters:
NameTypeDescription
pointVector

The new pointer position.

Returns:

The current Sketch instance.

Type: 
Sketch

tangentArc(offset) → {Sketch}

Adds a tangent arc from the pointer by the given offset.

Parameters:
NameTypeDescription
offsetVector

The offset vector.

Returns:

The current Sketch instance.

Type: 
Sketch

tangentArcTo(point) → {Sketch}

Adds a tangent arc from the last edge to the given point.

Parameters:
NameTypeDescription
pointVector

The arc end point.

Returns:

The current Sketch instance.

Type: 
Sketch

tangentLine(length) → {Sketch}

Adds a line tangent to the last edge, with the given length.

Parameters:
NameTypeDescription
lengthnumber

The tangent line length.

Returns:

The current Sketch instance.

Type: 
Sketch

threePointsArcTo(params) → {Sketch}

Adds a three-point arc from the pointer, through a point, to an end point.

Parameters:
NameTypeDescription
paramsObject

Parameters.

Properties
NameTypeDescription
throughVector

The through point.

endVector

The arc end point.

Returns:

The current Sketch instance.

Type: 
Sketch

toFace() → {Face}

Converts the sketch to a planar face.

Returns:

The resulting Face.

Type: 
Face

toWire() → {Wire}

Converts the sketch to a Wire.

Returns:

The resulting Wire.

Type: 
Wire