Create a reusable distance query from a reference shape.
Keeps the reference shape loaded in the OCCT distance tool so that multiple distanceTo calls avoid re-loading overhead.
distanceTo
The shape to measure distances from.
An object with distanceTo(other) and dispose() methods.
distanceTo(other)
dispose()
Call dispose() when done to free the WASM-allocated distance tool.
const query = createDistanceQuery(referenceBox);const d1 = query.distanceTo(otherBox);const d2 = query.distanceTo(sphere);query.dispose(); Copy
const query = createDistanceQuery(referenceBox);const d1 = query.distanceTo(otherBox);const d2 = query.distanceTo(sphere);query.dispose();
Create a reusable distance query from a reference shape.
Keeps the reference shape loaded in the OCCT distance tool so that multiple
distanceTocalls avoid re-loading overhead.