brepjs API Reference
    Preparing search index...

    Function createDistanceQuery

    • Create a reusable distance query from a reference shape.

      Keeps the reference shape loaded in the kernel distance tool so that multiple distanceTo calls avoid re-loading overhead.

      Parameters

      Returns Result<
          {
              dispose: () => void;
              distanceTo: (other: AnyShape<Dimension>) => Result<number>;
          },
      >

      Call dispose() when done to free the WASM-allocated distance tool.