@bitbybit-dev/manifold-worker
Version:
Bit By Bit Developers Manifold Based CAD Library to Program Geometry Via WebWorker
56 lines (55 loc) • 2.19 kB
TypeScript
import { ManifoldWorkerManager } from "../../manifold-worker/manifold-worker-manager";
import * as Inputs from "@bitbybit-dev/manifold/lib/api/inputs";
/**
* Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold
* Thanks Manifold community for developing this kernel
*/
export declare class CrossSectionEvaluate {
private readonly manifoldWorkerManager;
constructor(manifoldWorkerManager: ManifoldWorkerManager);
/**
* Get area of cross section
* @param inputs cross section
* @returns area of cross section
* @group basic
* @shortname area
* @drawable false
*/
area(inputs: Inputs.Manifold.CrossSectionDto<Inputs.Manifold.CrossSectionPointer>): Promise<number>;
/**
* Check if cross section is empty
* @param inputs cross section
* @returns boolean indicating emptyness
* @group basic
* @shortname is empty
* @drawable false
*/
isEmpty(inputs: Inputs.Manifold.CrossSectionDto<Inputs.Manifold.CrossSectionPointer>): Promise<boolean>;
/**
* Get number of vertices in cross section
* @param inputs cross section
* @returns number of vertices of cross section
* @group basic
* @shortname num vert
* @drawable false
*/
numVert(inputs: Inputs.Manifold.CrossSectionDto<Inputs.Manifold.CrossSectionPointer>): Promise<number>;
/**
* Get number of contours in cross section
* @param inputs cross section
* @returns number of contour of cross section
* @group basic
* @shortname num contour
* @drawable false
*/
numContour(inputs: Inputs.Manifold.CrossSectionDto<Inputs.Manifold.CrossSectionPointer>): Promise<number>;
/**
* Get the bounds of the contour as a rectangle. Output is given in two vec2 points in the array. First array is the min point and second array is the max point.
* @param inputs cross section
* @returns bounds of cross section
* @group basic
* @shortname bounds
* @drawable false
*/
bounds(inputs: Inputs.Manifold.CrossSectionDto<Inputs.Manifold.CrossSectionPointer>): Promise<Inputs.Base.Vector2[]>;
}