import { BitbybitOcctModule, Handle_TDocStd_Document, TopoDS_Shape } from "../bitbybit-dev-occt/bitbybit-dev-occt"; import * as Inputs from "./api/inputs"; import { OCCTBooleans } from "./services/booleans"; import { OCCTGeom } from "./services/geom/geom"; import { OCCTIO } from "./services/io"; import { OCCTOperations } from "./services/operations"; import { OCCTShapes } from "./services/shapes/shapes"; import { OCCTTransforms } from "./services/transforms"; import { OCCTFillets } from "./services/fillets"; import { OCCTDimensions } from "./services/dimensions"; import { OCCTAssembly } from "./services/assembly/assembly"; import { OCCTBrepGraph } from "./services/brep-graph/brep-graph"; import { OCCTCorners } from "./services/corners/corners"; import { OCCTDraft } from "./services/draft/draft"; import { OccHelper } from "./occ-helper"; import { OCCTShapeFix } from "./services/shape-fix"; import { OCCTPath } from "./services/path"; import { OCCTSVG } from "./services/svg"; /** * The entry point to the OpenCascade kernel: every OCCT feature is reached through one of its * properties. `shapes` builds and reads vertices, edges, wires, faces, shells, solids and * compounds; `operations`, `booleans`, `fillets`, `transforms`, `corners` and `draft` change * shapes; `geom` handles curves and surfaces; `io` reads and writes STEP, IGES, STL and other * files; `assembly`, `dimensions`, `brepGraph`, `path` and `svg` cover documents, annotations, * topology graphs, machining paths and SVG. The methods on the service itself turn shapes into * triangle meshes for drawing. */ export declare class OCCTService { private readonly och; readonly shapes: OCCTShapes; readonly geom: OCCTGeom; readonly fillets: OCCTFillets; readonly transforms: OCCTTransforms; readonly operations: OCCTOperations; readonly booleans: OCCTBooleans; readonly dimensions: OCCTDimensions; readonly shapeFix: OCCTShapeFix; readonly assembly: OCCTAssembly; readonly brepGraph: OCCTBrepGraph; readonly corners: OCCTCorners; readonly draft: OCCTDraft; readonly io: OCCTIO; readonly path: OCCTPath; readonly svg: OCCTSVG; plugins?: { dependencies: { [key: string]: unknown; }; [key: string]: unknown; }; constructor(occ: BitbybitOcctModule, och: OccHelper); /** * Triangulates a shape and returns every triangle as three points, in one flat list over all * faces. * * `precision` is the meshing tolerance in model units: smaller values follow curved surfaces * more closely and give more triangles. `adjustYtoZ` swaps the Y and Z axes for tools that * treat Z as up, and `reversedPoints` flips the winding of each triangle. * @param inputs - The shape, the meshing precision and the axis and winding options * @returns One list of three points per triangle * @group convert * @shortname faces to polygon points * @drawable false * @example * ```typescript * const triangles = await bitbybit.occt.shapeFacesToPolygonPoints({ shape: sphere, precision: 0.01, adjustYtoZ: false, reversedPoints: false }); * ``` */ shapeFacesToPolygonPoints(inputs: Inputs.OCCT.ShapeFacesToPolygonPointsDto): Inputs.Base.Point3[][]; /** * Triangulates a shape into a mesh for drawing: one entry per face with its vertices, normals, * UVs and triangle indexes, one per edge with its points, and the vertex points. * * `precision` is the meshing tolerance in model units; smaller values follow curved surfaces * more closely and cost more triangles. `adjustYtoZ` swaps Y and Z. A null shape gives empty * lists. * @param inputs - The shape, the meshing precision and the options * @returns The mesh as face, edge and point lists * @group convert * @shortname shape to mesh * @drawable false * @example * ```typescript * const mesh = await bitbybit.occt.shapeToMesh({ shape: sphere, precision: 0.01, adjustYtoZ: false }); * console.log(mesh.faceList.length, mesh.edgeList.length); * ``` */ shapeToMesh(inputs: Inputs.OCCT.ShapeToMeshDto): Inputs.OCCT.DecomposedMeshDto; /** * Triangulates several shapes with the same settings, as `shapeToMesh` does for one. * @param inputs - The shapes, the meshing precision and the options * @returns One mesh per shape, in the same order * @group convert * @shortname shape to mesh * @drawable false * @example * ```typescript * const meshes = await bitbybit.occt.shapesToMeshes({ shapes: [box, sphere], precision: 0.01, adjustYtoZ: false }); * ``` */ shapesToMeshes(inputs: Inputs.OCCT.ShapesToMeshesDto): Inputs.OCCT.DecomposedMeshDto[]; /** * Triangulates the top-level shapes of an assembly document into one combined mesh, with the * face colors of the document collected into the mesh's color groups. * @param inputs - The document and the meshing options * @returns The combined mesh * @ignore true */ docToMesh(inputs: Inputs.OCCT.DocToMeshDto): Inputs.OCCT.DecomposedMeshDto; /** * Triangulates the top-level shapes of an assembly document into one mesh per shape, with the * face colors of the document collected into each mesh's color groups. * @param inputs - The document and the meshing options * @returns One mesh per top-level shape * @ignore true */ docToMeshes(inputs: Inputs.OCCT.DocToMeshesDto): Inputs.OCCT.DecomposedMeshDto[]; }