UNPKG

@bitbybit-dev/manifold-worker

Version:

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

75 lines (74 loc) 3.02 kB
import { ManifoldWorkerManager } from "../../manifold-worker/manifold-worker-manager"; import * as Inputs from "@bitbybit-dev/manifold/lib/api/inputs"; import { CrossSectionOperations } from "./operations"; import { CrossSectionShapes } from "./shapes"; import { CrossSectionTransforms } from "./transforms"; import { CrossSectionBooleans } from "./booleans"; import { CrossSectionEvaluate } from "./evaluate"; /** * Contains various functions for Solid meshes from Manifold library https://github.com/elalish/manifold * Thanks Manifold community for developing this kernel */ export declare class ManifoldCrossSection { private readonly manifoldWorkerManager; shapes: CrossSectionShapes; operations: CrossSectionOperations; booleans: CrossSectionBooleans; transforms: CrossSectionTransforms; evaluate: CrossSectionEvaluate; constructor(manifoldWorkerManager: ManifoldWorkerManager); /** * Creates a cross section from a single polygon points * @param inputs polygon points * @returns cross section * @group create * @shortname cross section from points * @drawable true */ crossSectionFromPoints(inputs: Inputs.Manifold.CrossSectionFromPolygonPointsDto): Promise<Inputs.Manifold.CrossSectionPointer>; /** * Creates a cross section from multiple polygons points * @param inputs polygons points * @returns cross section * @group create * @shortname cross section from polygons * @drawable true */ crossSectionFromPolygons(inputs: Inputs.Manifold.CrossSectionFromPolygonsPointsDto): Promise<Inputs.Manifold.CrossSectionPointer>; /** * Turns cross section into polygons * @param inputs cross section * @returns polygons * @group decompose * @shortname cross section to polygons * @drawable false */ crossSectionToPolygons(inputs: Inputs.Manifold.CrossSectionDto<Inputs.Manifold.CrossSectionPointer>): Promise<Inputs.Base.Vector2[][]>; /** * Extracts points from a cross section * @param inputs cross section * @returns points * @group decompose * @shortname cross section to points * @drawable false */ crossSectionToPoints(inputs: Inputs.Manifold.CrossSectionDto<Inputs.Manifold.CrossSectionPointer>): Promise<number[][][]>; /** * Turns cross sections into polygons * @param inputs cross sections * @returns polygons * @group decompose * @shortname cross sections to polygons * @drawable false */ crossSectionsToPolygons(inputs: Inputs.Manifold.CrossSectionsDto<Inputs.Manifold.CrossSectionPointer>): Promise<Inputs.Base.Vector2[][][]>; /** * Extracts points from cross sections * @param inputs cross sections * @returns points * @group decompose * @shortname cross sections to points * @drawable false */ crossSectionsToPoints(inputs: Inputs.Manifold.CrossSectionsDto<Inputs.Manifold.CrossSectionPointer>): Promise<number[][][][]>; }