@huukhanhnguyen/geometry / namespaces/Collision
namespaces/Collision
aabbOverlap
constaabbOverlap: (a,b) =>boolean=wasm.collision_aabb_overlap
The prefilter on its own: strict overlap on all three axes, so exactly touching boxes are NOT a candidate pair.
Parameters
a
Float64Array
b
Float64Array
Returns
boolean
findClashes
constfindClashes: (parts_json,options_json) =>string=wasm.collision_find_clashes
Two-phase clash detection over a placed part list. parts_json is [{ id, document, matrix? }], options_json a partial { minimumOverlapVolume?, ignorePairs? } ("{}" for the defaults). Returns [{ partA, partB, overlapBoundingBox: [min(3), max(3)] }].
The confirmed overlap SOLID does not cross: it lives in the arena this call builds and dies with it. A caller that needs the overlap geometry rebuilds it with brep_boolean_intersect on the reported pair — which is the same boolean this ran, on the same two solids.
Parameters
parts_json
string
options_json
string
Returns
string