UNPKG

@bitbybit-dev/manifold-worker

Version:

Bit By Bit Developers Manifold Based CAD Library to Program Geometry Via WebWorker

50 lines (49 loc) 1.91 kB
import { ManifoldWorkerManager } from "../../manifold-worker/manifold-worker-manager"; import * as Inputs from "@bitbybit-dev/manifold/lib/api/inputs"; /** * Contains various functions for making shapes Manifold library https://github.com/elalish/manifold * Thanks Manifold community for developing this kernel */ export declare class CrossSectionShapes { private readonly manifoldWorkerManager; constructor(manifoldWorkerManager: ManifoldWorkerManager); /** * Create a 2d cross-section from a set of contours (complex polygons). A * boolean union operation (with Positive filling rule by default) is * performed to combine overlapping polygons and ensure the resulting * CrossSection is free of intersections. * @param inputs polygons and fill rule * @returns cross section * @group base * @shortname create * @drawable true */ create(inputs: Inputs.Manifold.CreateContourSectionDto): Promise<Inputs.Manifold.CrossSectionPointer>; /** * Create a 2D square cross section * @param inputs Square parameters * @returns square cross section * @group primitives * @shortname square * @drawable true */ square(inputs: Inputs.Manifold.SquareDto): Promise<Inputs.Manifold.CrossSectionPointer>; /** * Create a 2D circle cross section * @param inputs Circle parameters * @returns circle cross section * @group primitives * @shortname circle * @drawable true */ circle(inputs: Inputs.Manifold.CircleDto): Promise<Inputs.Manifold.CrossSectionPointer>; /** * Create a 2D rectangle cross section * @param inputs Rectangle parameters * @returns rectangle cross section * @group primitives * @shortname rectangle * @drawable true */ rectangle(inputs: Inputs.Manifold.RectangleDto): Promise<Inputs.Manifold.CrossSectionPointer>; }