primitives-2D

Methods

Circle(parameters) → {Face}

Creates a circle based on the specified parameters.

Parameters:
NameTypeDescription
parametersObject

The parameters for the circle.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the circle is constructed.

centerVector<optional>
Vector.ZERO

The center of the circle.

radiusnumber

The radius of the circle.

Returns:

A Face object representing the constructed circle.

Type: 
Face

Ellipse(parameters) → {Face}

Creates a ellipse based on the specified parameters.

Parameters:
NameTypeDescription
parametersObject

The parameters for the ellipse.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the ellipse is constructed.

centerVector<optional>
Vector.ZERO

The center of the ellipse.

xRadiusnumber

The radius of the ellipse along the X-axis.

yRadiusnumber

The radius of the ellipse along the Y-axis.

Returns:

A Face object representing the constructed ellipse.

Type: 
Face

Polygon(parameters) → {Face}

Creates a polygon based on the specified parameters.

Parameters:
NameTypeDescription
parametersObject

The parameters for the polygon.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the polygon is constructed.

verticesArray.<Vector>

An array of vertices defining the polygon.

Returns:

A Face object representing the constructed polygon.

Type: 
Face

Rectangle(parameters) → {Face}

Creates a rectangle based on the specified parameters.

Parameters:
NameTypeDescription
parametersObject

The parameters for the rectangle.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the rectangle is constructed.

centerVector<optional>
Vector.ZERO

The center of the rectangle.

widthnumber

The width of the rectangle.

heightnumber

The height of the rectangle.

Returns:

A Face object representing the constructed rectangle.

Type: 
Face

RegularPolygon(parameters) → {Face}

Creates a regular polygon based on the specified parameters.

Parameters:
NameTypeDescription
parametersObject

The parameters for the regular polygon.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the polygon is constructed.

centerVector<optional>
Vector.ZERO

The center of the polygon.

radiusnumber

The radius of the circumscribed circle of the polygon.

verticesnumber

The number of vertices of the polygon.

Returns:

A Face object representing the constructed regular polygon.

Type: 
Face

Square(parameters) → {Face}

Creates a square based on the specified parameters.

Parameters:
NameTypeDescription
parametersObject

The parameters for the square.

Properties
NameTypeAttributesDefaultDescription
planePlane<optional>
Plane.XY

The plane in which the square is constructed.

centerVector<optional>
Vector.ZERO

The center of the square.

sizenumber

The length of the square's sides.

Returns:

A Face object representing the constructed square.

Type: 
Face