Methods
Antiprism(parameters) → {Solid}
Creates an antiprism based on the specified parameters. An antiprism is a polyhedron with two parallel polygonal bases connected by alternating triangular faces.
Parameters:Name | Type | Description |
---|
parameters | Object | The parameters for the antiprism. PropertiesName | Type | Attributes | Default | Description |
---|
plane | Plane | <optional>
| Plane.XY | The plane in which the antiprism is constructed. | center | Vector | <optional>
| Vector.ZERO | The center of the antiprism. | radius | number | | | The radius of the circumscribed circle of the base polygons. | vertices | number | | | The number of vertices for the base polygons. |
|
Returns:A Solid
object representing the constructed antiprism.
- Type:
- Solid
Cone(parameters) → {Solid}
Creates a cone based on the specified parameters.
Parameters:Name | Type | Description |
---|
parameters | Object | The parameters for the cone. PropertiesName | Type | Attributes | Default | Description |
---|
plane | Plane | <optional>
| Plane.XY | The plane in which the cone is constructed. | center | Vector | <optional>
| Vector.ZERO | The center of the cone. | topRadius | number | | | The radius of the cone's top face. | bottomRadius | number | | | The radius of the cone's bottom face. | height | number | | | The height of the cone. |
|
Returns:A Solid
object representing the constructed cone.
- Type:
- Solid
Cube(parameters) → {Solid}
Creates a cube based on the specified parameters.
Parameters:Name | Type | Description |
---|
parameters | Object | The parameters for the cube. PropertiesName | Type | Attributes | Default | Description |
---|
plane | Plane | <optional>
| Plane.XY | The plane in which the cube is constructed. | center | Vector | <optional>
| Vector.ZERO | The center of the cube. | size | number | | | The size of the cube. |
|
Returns:A Solid
object representing the constructed cube.
- Type:
- Solid
Cuboid(parameters) → {Solid}
Creates a cuboid based on the specified parameters.
Parameters:Name | Type | Description |
---|
parameters | Object | The parameters for the cuboid. PropertiesName | Type | Attributes | Default | Description |
---|
plane | Plane | <optional>
| Plane.XY | The plane in which the cuboid is constructed. | center | Vector | <optional>
| Vector.ZERO | The center of the cuboid. | width | number | | | The width of the cuboid (along the X-axis). | height | number | | | The height of the cuboid (along the Y-axis). | depth | number | | | The depth of the cuboid (along the Z-axis). |
|
Returns:A Solid
object representing the constructed cuboid.
- Type:
- Solid
Cylinder(parameters) → {Solid}
Creates a cylinder based on the specified parameters.
Parameters:Name | Type | Description |
---|
parameters | Object | The parameters for the cylinder. PropertiesName | Type | Attributes | Default | Description |
---|
plane | Plane | <optional>
| Plane.XY | The plane in which the cylinder is constructed. | center | Vector | <optional>
| Vector.ZERO | The center of the cylinder. | radius | number | | | The radius of the cylinder's base. | height | number | | | The height of the cylinder. |
|
Returns:A Solid
object representing the constructed cylinder.
- Type:
- Solid
Sphere(parameters) → {Solid}
Creates a sphere based on the specified parameters.
Parameters:Name | Type | Description |
---|
parameters | Object | The parameters for the sphere. PropertiesName | Type | Attributes | Default | Description |
---|
plane | Plane | <optional>
| Plane.XY | The plane in which the sphere is constructed. | center | Vector | <optional>
| Vector.ZERO | The center of the sphere. | radius | number | | | The radius of the sphere. |
|
Returns:A Solid
object representing the constructed sphere.
- Type:
- Solid
Torus(parameters) → {Solid}
Creates a 3D torus solid based on the specified parameters.
Parameters:Name | Type | Description |
---|
parameters | Object | The parameters for the torus. PropertiesName | Type | Attributes | Default | Description |
---|
plane | Plane | <optional>
| Plane.XY | The plane in which the torus is constructed. | center | Vector | <optional>
| Vector.ZERO | The center of the torus. | majorRadius | number | | | The major radius of the torus (distance from the center to the middle of the tube). | minorRadius | number | | | The minor radius of the torus (radius of the tube). |
|
Returns:A Solid
object representing the constructed torus.
- Type:
- Solid