Bitbybit Docs
    Preparing search index...

    Class OCCTAnalysisClashes

    Finding shapes and faces that overlap or come closer than a clearance: pairs among a list of placed shapes, faces of two shapes within a distance of each other, and faces of one shape that cut through each other. Each clash names the two items by index with the distance between them and, for solids, the volume they share.

    Index

    Constructors

    clashes

    • Finds every pair among a list of shapes that overlap, touch or come within a clearance of each other, such as colliding parts.

      A clash names the two by their positions in the list, from 0, with their distance, 0 where they touch, overlap or nest, and the volume two solids share.

      Parameters

      Returns Promise<Clash[]>

      The clashing pairs, in list order

      const clashes = await bitbybit.occt.analysis.clashes.betweenShapes({ shapes: [bracket, bolt, plate], clearance: 0.5 });
      const overlapping = clashes.filter(clash => clash.volume > 0);
    • Finds the faces of one shape that come within a clearance of faces of another, each pair measured exactly.

      A clash names a face of each as shapes.face.getFaces numbers them, sorted by the first shape's face. Candidates come from meshes of copies at precision, so the shapes given stay unmeshed; faces without a surface take no part.

      Parameters

      Returns Promise<Clash[]>

      The pairs of faces within the clearance

      const tooClose = await bitbybit.occt.analysis.clashes.facesWithin({ shapeA: housing, shapeB: board, clearance: 0.2, precision: 0.01 });
      
    • Finds the pairs of faces of one shape that cross each other anywhere but along an edge they share.

      A clash names the two faces as shapes.face.getFaces numbers them, with both points at one place on their crossing. Candidates come from a mesh of a copy at precision and are confirmed exactly; a mere touch can be missed.

      Parameters

      Returns Promise<Clash[]>

      The pairs of crossing faces

      const crossings = await bitbybit.occt.analysis.clashes.selfIntersections({ shape: sweep, precision: 0.01 });
      const isClean = crossings.length === 0;