@bitbybit-dev/jscad-worker
Version:
Bit By Bit Developers JSCAD Based CAD Library to Program Geometry Via WebWorker
85 lines (84 loc) • 3.2 kB
TypeScript
import { JSCADWorkerManager } from "../jscad-worker/jscad-worker-manager";
import * as Inputs from "@bitbybit-dev/jscad/lib/api/inputs/inputs";
import { JSCADBooleans } from "./booleans";
import { JSCADExpansions } from "./expansions";
import { JSCADExtrusions } from "./extrusions";
import { JSCADHulls } from "./hulls";
import { JSCADPath } from "./path";
import { JSCADPolygon } from "./polygon";
import { JSCADShapes } from "./shapes";
import { JSCADText } from "./text";
import { JSCADColors } from "./colors";
/**
* Contains various functions for Solid meshes from JSCAD library https://github.com/jscad/OpenJSCAD.org
* Thanks JSCAD community for developing this kernel
*/
export declare class JSCAD {
private readonly jscadWorkerManager;
readonly booleans: JSCADBooleans;
readonly expansions: JSCADExpansions;
readonly extrusions: JSCADExtrusions;
readonly hulls: JSCADHulls;
readonly path: JSCADPath;
readonly polygon: JSCADPolygon;
readonly shapes: JSCADShapes;
readonly text: JSCADText;
readonly colors: JSCADColors;
constructor(jscadWorkerManager: JSCADWorkerManager);
/**
* Converts the Jscad mesh to polygon points representing triangles of the mesh.
* @param inputs Jscad mesh
* @returns polygon points
* @group conversions
* @shortname to polygon points
* @drawable false
*/
toPolygonPoints(inputs: Inputs.JSCAD.MeshDto): Promise<Inputs.Base.Mesh3>;
/**
* Transforms the Jscad solid meshes with a given list of transformations.
* @param inputs Solids with the transformation matrixes
* @returns Solids with a transformation
* @group transforms
* @shortname transform solids
* @drawable true
*/
transformSolids(inputs: Inputs.JSCAD.TransformSolidsDto): Promise<Inputs.JSCAD.JSCADEntity[]>;
/**
* Transforms the Jscad solid mesh with a given list of transformations.
* @param inputs Solid with the transformation matrixes
* @returns Solid with a transformation
* @group transforms
* @shortname transform solid
* @drawable true
*/
transformSolid(inputs: Inputs.JSCAD.TransformSolidDto): Promise<Inputs.JSCAD.JSCADEntity>;
/**
* Downloads the binary STL file from a 3D solid
* @param inputs 3D Solid
* @group io
* @shortname solid to stl
*/
downloadSolidSTL(inputs: Inputs.JSCAD.DownloadSolidDto): Promise<void>;
/**
* Downloads the binary STL file from a 3D solids
* @param inputs 3D Solid
* @group io
* @shortname solids to stl
*/
downloadSolidsSTL(inputs: Inputs.JSCAD.DownloadSolidsDto): Promise<void>;
/**
* Downloads the dxf file from jscad geometry. Supports paths and meshes in array.
* @param inputs 3D geometry
* @group io
* @shortname geometry to dxf
*/
downloadGeometryDxf(inputs: Inputs.JSCAD.DownloadGeometryDto): Promise<void>;
/**
* Downloads the 3MF file from jscad geometry.
* @param inputs 3D geometry
* @group io
* @shortname geometry to 3mf
*/
downloadGeometry3MF(inputs: Inputs.JSCAD.DownloadGeometryDto): Promise<void>;
private downloadFile;
}