primitives-1D

Methods

BSplineCurve(parameters) → {Edge}

Creates a BSpline curve passing through a set of points.

Parameters:
NameTypeDescription
parametersObject

The parameters for the BSpline curve.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the curve is constructed.

pointsArray.<Vector>

The points through which the curve passes.

minDegreenumber<optional>
1

The minimum degree of the BSpline curve.

maxDegreenumber<optional>
6

The maximum degree of the BSpline curve.

continuityType'c0' | 'c1' | 'c2' | 'c3' | 'cn' | 'g1' | 'g2'<optional>
"c2"

The continuity type of the curve.

Returns:

An Edge object representing the constructed BSpline curve.

Type: 
Edge

BezierCurve(parameters) → {Edge}

Creates a Bezier curve from the given control points.

Parameters:
NameTypeDescription
parametersObject

The parameters for the Bezier curve.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the curve is constructed.

pointsArray.<Vector>

The control points for the Bezier curve.

Returns:

An Edge object representing the constructed Bezier curve.

Type: 
Edge

Line(parameters) → {Edge}

Creates a line based on the start and end points.

Parameters:
NameTypeDescription
parametersObject

The parameters for the line.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the line is constructed.

startVector

The start point of the line.

endVector

The end point of the line.

Returns:

An Edge object representing the constructed line.

Type: 
Edge

Polyline(parameters) → {Wire}

Creates a polyline that connects all points into a single object.

Parameters:
NameTypeDescription
parametersObject

The parameters for the polyline.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the polyline is constructed.

pointsArray.<Vector>

The points connected by the polyline.

Returns:

An Wire object representing the constructed Polyline.

Type: 
Wire

TangentArc(parameters) → {Edge}

Creates an arc between the start and end points with a specified tangent vector at the start point.

Parameters:
NameTypeDescription
parametersObject

The parameters for the arc.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the arc is constructed.

startVector

The start point of the arc.

tangentVector

The tangent vector at the start point.

endVector

The end point of the arc.

Returns:

An Edge object representing the constructed arc.

Type: 
Edge

ThreePointsArc(parameters) → {Edge}

Creates an arc between the start and end points that goes through the through point.

Parameters:
NameTypeDescription
parametersObject

The parameters for the arc.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the arc is constructed.

startVector

The start point of the arc.

throughVector

The point through which the arc must pass.

endVector

The end point of the arc.

Returns:

An Edge object representing the constructed arc.

Type: 
Edge