@achirita/blox
Version:
A CAD library for building 3D models in the browser.
18 lines (17 loc) • 755 B
TypeScript
import { Plane, Vector } from '../math';
import { Solid } from '../modeling';
/**
* Creates a cylinder based on the specified parameters.
* @param {Object} parameters - The parameters for the cylinder.
* @param {Plane} [parameters.plane=Plane.XY] - The plane in which the cylinder is constructed.
* @param {Vector} [parameters.center=Vector.ZERO] - The center of the cylinder.
* @param {number} parameters.radius - The radius of the cylinder's base.
* @param {number} parameters.height - The height of the cylinder.
* @returns {Solid} A `Solid` object representing the constructed cylinder.
*/
export function Cylinder({ plane, center, radius, height }: {
plane?: Plane;
center?: Vector;
radius: number;
height: number;
}): Solid;