Bitbybit Docs
    Preparing search index...

    Class OCCTShell

    Shells in OpenCascade: sets of faces joined along their edges. A shell that closes on itself with no gaps bounds a volume and can become a solid with shapes.solid.fromClosedShell; an open shell is a surface with a rim. Build one by sewing faces together, check whether it is closed and measure its area.

    Index

    Constructors

    create

    • Joins faces into a shell by sewing their edges together where they meet within the tolerance.

      Faces further apart than the tolerance stay unjoined, so a closed shell may come out open; a larger tolerance sews more. A lone face comes back as that face, and faces that do not all join as a compound of what did.

      Parameters

      Returns Promise<TopoDSShellPointer>

      The shell, or the face or compound when the faces do not join into one

      const shell = await bitbybit.occt.shapes.shell.sewFaces({ shapes: [top, bottom, side], tolerance: 1e-7 });
      
    • Sews faces and shells as sewFaces does, and reports per shape given which faces of the sewn shape each of its faces became.

      histories[i].faces[j] lists the result faces face j of shape i became, as shapes.face.getFaces numbers both.

      Parameters

      Returns Promise<ShapeWithHistories<TopoDSShapePointer>>

      The sewn shape and one history per shape given

      const { shape, histories } = await bitbybit.occt.shapes.shell.sewFacesWithHistory({ shapes: [top, bottom, side], tolerance: 1e-7 });
      const sewnTop = histories[0].faces[0];

    debug

    • Collects diagnostic facts about a shell: whether it is valid, how many faces and edges it has, its total area and, for every face, the surface type, degrees, control point counts, bounds and area.

      An empty or null shape gives a report marked invalid with zero counts.

      Parameters

      Returns Promise<ShellDebugInfo>

      The report with counts, area and one entry per face

      const info = await bitbybit.occt.shapes.shell.debugInfo({ shape: shell });
      

    get

    • Measures the total area of all the faces of a shell, in square model units.

      Parameters

      Returns Promise<number>

      The surface area

      const area = await bitbybit.occt.shapes.shell.getShellSurfaceArea({ shape: shell });