import type { OCCT as BaseOCCT, OCCTWorkerManager } from "@bitbybit-dev/occt-worker"; import { Babylon } from "./bitbybit/babylon/babylon"; import type { Verb, Tag, Time, OCCTW, IFCW, Asset, JSONBitByBit, CSVBitByBit } from "@bitbybit-dev/core"; import type { Color, Dates, Engineering, Frame, IoBitByBit, Line, Lists, Logic, MathBitByBit, MeshBitByBit, Point, Polyline, Recipes, TextBitByBit, Transforms, Vector } from "@bitbybit-dev/base"; import type { JSCAD } from "@bitbybit-dev/jscad-worker"; import type { ManifoldBitByBit } from "@bitbybit-dev/manifold-worker"; import type { IFCWorkerManager } from "@bitbybit-dev/ifc-worker"; import type { BitbybitSettings } from "@bitbybit-dev/base"; import { Draw } from "./bitbybit/draw"; import { Context } from "./context"; import type { JSCADWorkerManager } from "@bitbybit-dev/jscad-worker"; import type { ManifoldWorkerManager } from "@bitbybit-dev/manifold-worker"; import type * as BABYLON from "@babylonjs/core"; /** * The whole library behind one object for a BabylonJS scene: `occt`, `jscad` and `manifold` for the * CAD kernels, `ifc` for IFC building models, `recipes` for geometry as data, `engineering` for the * sizes and outlines of standard parts, `io` for DXF and SVG drawings, `draw` to put anything into * the scene, `babylon` for the engine's meshes, cameras, lights, materials and GUI, and the plain * data helpers `math`, `vector`, `point`, `frame`, `line`, `polyline`, `transforms`, `lists`, * `logic`, `json`, `csv`, `text`, `dates`, `color`, `asset`, `tag` and `time`. Call `init` with the * scene and the kernel workers first. The `bitbybit` object in these docs' examples is one. */ export declare class BitByBitBase { context: Context; jscadWorkerManager: JSCADWorkerManager; manifoldWorkerManager: ManifoldWorkerManager; /** * Sends IFC calls to their worker and reports its state; `initBitByBit` hands it the worker, or * call its `setIfcWorker` with one. */ ifcWorkerManager: IFCWorkerManager; occtWorkerManager: OCCTWorkerManager; private readonly applySettings; private readonly applyConventions; private hostRightHanded; math: MathBitByBit; logic: Logic; lists: Lists; json: JSONBitByBit; csv: CSVBitByBit; vector: Vector; babylon: Babylon; point: Point; frame: Frame; engineering: Engineering; recipes: Recipes; io: IoBitByBit; line: Line; transforms: Transforms; polyline: Polyline; draw: Draw; /** * NURBS curves and surfaces. * * @deprecated Verbnurbs is not maintained upstream and this API is removed in the next major * version. Use the OpenCascade (occt) NURBS operations instead. Existing scripts keep working * until the removal. */ verb: Verb; jscad: JSCAD; manifold: ManifoldBitByBit; /** * IFC building models: read, written and authored in a worker, each method answering with a * promise, and built as OpenCascade shapes or STEP through `geometry`. Experimental, as the IFC * library is. */ ifc: IFCW; text: TextBitByBit; dates: Dates; tag: Tag; time: Time; mesh: MeshBitByBit; occt: OCCTW & BaseOCCT; asset: Asset; color: Color; constructor(); /** * Connects the library to a BabylonJS scene and to the web workers that run the CAD kernels; * nothing works before it is called. * * A kernel whose worker is left out is unavailable, so pass only the ones your application * loads. `havokPlugin` enables physics for `babylon.scene.enablePhysics`. * @param scene - The scene everything is drawn into * @param occt - The worker running the Bitbybit OCCT Kernel, when OCCT is used * @param jscad - The worker running the JSCAD kernel, when JSCAD is used * @param manifold - The worker running the Manifold kernel, when Manifold is used * @param havokPlugin - The Havok physics plugin, when physics is used * @returns Nothing * @example * ```typescript * const bitbybit = new BitByBitBase(); * const occtWorker = new Worker(new URL("./occt.worker", import.meta.url), { name: "OCC", type: "module" }); * bitbybit.init(scene, occtWorker); * ``` */ init(scene: BABYLON.Scene, occt?: Worker, jscad?: Worker, manifold?: Worker, havokPlugin?: BABYLON.HavokPlugin): void; /** * Sets the settings this instance works by, such as the coordinate system that files, drawings * and text map by. * * They reach the kernel workers without waiting for a kernel to load, so every later call works * by them. A setting left out keeps the earlier behaviour; one it does not take rejects. * `engineSettings` gives those that fit the scene. * @param settings - The settings to work by; an empty object for none * @returns The settings now in force * @example * ```typescript * await bitbybit.setSettings(bitbybit.engineSettings()); * ``` */ setSettings(settings: BitbybitSettings): Promise; /** * Sets the settings that content saved with a conventions level runs by: 0 for the behaviour * from before settings existed, 1 for the scene's own coordinate system. Save the level with * your content, so content made earlier keeps running as it did. A level that is no * whole number from 0 rejects, and the earlier settings stay. * @param level - The conventions level the content was saved with * @returns The settings now in force * @example * ```typescript * await bitbybit.setConventions(1); * ``` */ setConventions(level: number): Promise; /** * The settings that fit the scene given to `init`, as it was then: its numbers are left-handed * coordinates unless the scene was made right-handed (`scene.useRightHandedSystem`). The code that * creates the scene decides; code that switches it later sets the settings to match itself. * @returns The settings for `setSettings` * @example * ```typescript * const settings = bitbybit.engineSettings(); * ``` */ engineSettings(): BitbybitSettings; }