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