Bitbybit Docs
    Preparing search index...

    Class OCCTDraft

    Draft angles for OpenCascade shapes: the slight taper cast and molded parts need so they slide out of the mold. draftAngle tilts chosen faces of a solid about a neutral plane, while makeDraft and makeDraftToShape grow a tapered skirt from a wire or the edges of a shape along a pull direction. Angles are in degrees.

    Index

    Constructors

    draft

    • Tilts the selected faces of a shape by a draft angle so the part can be pulled out of a mold along direction.

      The faces pivot about the neutral plane, given by a point and a normal, which stays put; angle is in degrees. flag keeps the standard draft side, false tapers the other way. Undraftable faces throw.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with drafted faces

      const drafted = await bitbybit.occt.draft.draftAngle({
      shape: box,
      faces: sideFaces,
      direction: [0, 1, 0],
      angle: 5,
      neutralPlaneOrigin: [0, 0, 0],
      neutralPlaneDirection: [0, 1, 0],
      flag: true,
      });
    • Grows a tapered skirt from a wire, or the edges of a shape, along a direction: each edge is swept along direction, leaning outward or inward by angle degrees, until the skirt is lengthMax long.

      internal leans the skirt inward instead of outward. A draft the kernel cannot build throws an error.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The drafted skirt

      const skirt = await bitbybit.occt.draft.makeDraft({ shape: outlineWire, direction: [0, 1, 0], angle: 5, lengthMax: 10, internal: false });
      
    • Grows a tapered skirt from a wire, or the edges of a shape, along a direction like makeDraft, but stops it where it meets stopShape instead of at a fixed length.

      keepOut keeps the part of the stop shape outside the draft; internal leans the skirt inward. A draft the kernel cannot build throws an error.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The drafted skirt

      const skirt = await bitbybit.occt.draft.makeDraftToShape({ shape: outlineWire, direction: [0, 1, 0], angle: 5, stopShape: ceilingFace, keepOut: false, internal: false });