brepjs API Reference
    Preparing search index...

    Function init

    brepjs — Public API

    • Auto-detect and initialise the best available kernel.

      Tries brepjs-opencascade (OCCT) first, then falls back to brepkit-wasm. For occt-wasm, use registerKernel directly (see tests/helpers/kernelInit.ts).

      Idempotent — calling it again after a kernel is registered is a no-op that returns the current kernel ID immediately.

      Returns Promise<string>

      The kernel ID that was initialised ('occt' or 'brepkit').

      If no kernel package can be imported.

      import { init, box } from 'brepjs';

      await init();
      const myBox = box(10, 10, 10);