The SolidBuilder class provides static methods for creating various solid shapes.
Constructors
new SolidBuilder()
new SolidBuilder():
SolidBuilder
Returns
Methods
box()
static
box(origin
,width
,length
,height
):Solid
Creates a box solid with the specified dimensions.
Parameters
• origin: Vector
The origin point of the box.
• width: number
The width of the box.
• length: number
The length of the box.
• height: number
The height of the box.
Returns
A Solid object representing the box.
box2Pnt()
static
box2Pnt(point1
,point2
):Solid
Creates a solid box between two points.
Parameters
• point1: Vector
The first point defining the box.
• point2: Vector
The second point defining the box.
Returns
A Solid object representing the created box.
cone()
static
cone(origin
,radius1
,radius2
,height
):Solid
Creates a cone solid.
Parameters
• origin: Vector
The origin point of the cone.
• radius1: number
The radius of the base of the cone.
• radius2: number
The radius of the top of the cone.
• height: number
The height of the cone.
Returns
A Solid object representing the cone.
cylinder()
static
cylinder(origin
,radius
,height
):Solid
Creates a cylinder solid with the specified origin, radius, and height.
Parameters
• origin: Vector
The origin point of the cylinder.
• radius: number
The radius of the cylinder.
• height: number
The height of the cylinder.
Returns
A Solid object representing the cylinder.
loft()
static
loft(surfaces
,degree
):Solid
Creates a lofted solid from the given array of surfaces.
Parameters
• surfaces: Surface
[]
The array of surfaces to loft.
• degree: number
The degree of the lofted solid.
Returns
A new Solid object representing the lofted solid.
sphere()
static
sphere(origin
,radius
):Solid
Creates a sphere solid with the given origin and radius.
Parameters
• origin: Vector
The origin point of the sphere.
• radius: number
The radius of the sphere.
Returns
A Solid object representing the sphere.
torus()
static
torus(origin
,radius1
,radius2
):Solid
Creates a torus solid.
Parameters
• origin: Vector
The origin of the torus.
• radius1: number
The major radius of the torus.
• radius2: number
The minor radius of the torus.
Returns
A Solid object representing the torus.