Bitbybit Docs
    Preparing search index...

    Class OCCTGears

    Involute gears, made from their sizes rather than drawn: spur and helical gears with their teeth outside, ring gears with their teeth inside, racks and straight bevel gears, as solids whose faces can be named tips, flanks and roots. Gears sharing module and pressureAngle mesh: spur gears half the module times their teeth together apart, a spur gear in a ring half the module times the difference. Flanks are not undercut, so a pinion under 17 teeth at 20 degrees wants a profileShift, and a ring near its pinion's count can touch at the tips: check a pair with analysis.clashes through a pitch.

    Index

    Constructors

    bevel

    • Makes a straight bevel gear as a solid by Tredgold's approximation: teeth that run straight to the apex, between a back cone and a front cone faceWidth nearer the apex, on a body with flat ends.

      It meshes a bevel gear of the mate's teeth that shares its frame's origin, the two normals at shaftAngle, turned half a tooth.

      Parameters

      • inputs: BevelGearDto

        The teeth, the mate's teeth, the shaft angle, the face width, the bore and the frame

      Returns Promise<TopoDSShapePointer>

      A new solid

      const pinion = await bitbybit.occt.parts.mechanical.gears.bevelGear({ module: 0.2, teeth: 20, mateTeeth: 30, faceWidth: 0.8, frame: { origin: [0, 0, 0], normal: [0, 0, 1], direction: [1, 0, 0] } });
      const wheel = await bitbybit.occt.parts.mechanical.gears.bevelGear({ module: 0.2, teeth: 30, mateTeeth: 20, faceWidth: 0.8, rotation: 6, frame: { origin: [0, 0, 0], normal: [1, 0, 0], direction: [0, 0, 1] } });
    • Makes a bevel gear as bevelGear does and names the role each face plays.

      The roles tip, flank, root, back (the back cone and the flat back face), front and bore list face indexes as shapes.face.getFaces numbers them. The apex frame is the input frame turned to the first tooth; back sits at the back face's centre.

      Parameters

      • inputs: BevelGearDto

        The teeth, the mate's teeth, the shaft angle, the face width, the bore and the frame

      Returns Promise<ShapeWithRoles<TopoDSShapePointer>>

      The gear, the faces each role names and its apex and back

      const { shape, roles, frames } = await bitbybit.occt.parts.mechanical.gears.bevelGearWithRoles({ module: 0.2, teeth: 20, mateTeeth: 30 });
      console.log(roles["back"], frames["back"]);

    gears

    • Draws the outline of an involute spur gear around a frame's origin, in the frame's plane.

      The flanks follow the involute of the base circle and the gaps are rounded at the root. At rotation 0 a tooth points along the frame's direction. Teeth that come to a point, or leave no gap at the root, are refused.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The outline as a face, or as a closed wire when makeFace is false

      const profile = await bitbybit.occt.parts.mechanical.gears.spurGearProfile({ module: 0.2, teeth: 24, makeFace: true });
      const gear = await bitbybit.occt.operations.extrude({ shape: profile, direction: [0, 0.8, 0] });
    • Makes an involute spur gear as a solid: its outline swept width along the frame's normal, with a bore, a hub standing out from its end face and a keyway.

      The first face lies in the frame's plane. A bore of 0 leaves the gear whole; one that reaches the root circle is refused.

      Parameters

      • inputs: SpurGearDto

        The teeth, the width, the bore, the hub, the keyway and the frame

      Returns Promise<TopoDSShapePointer>

      A new solid

      const driver = await bitbybit.occt.parts.mechanical.gears.spurGear({ module: 0.2, teeth: 20, width: 1, bore: 0.8 });
      const driven = await bitbybit.occt.parts.mechanical.gears.spurGear({ module: 0.2, teeth: 40, width: 1, bore: 1.2, rotation: 4.5, frame: { origin: [6, 0, 0], normal: [0, 1, 0], direction: [1, 0, 0] } });
    • Makes a spur gear as spurGear does and names the role each face plays.

      The roles tip, flank, root, bore, hub, keyway, start (in the frame's plane) and end list face indexes as shapes.face.getFaces numbers them. The axis frame sits at the start face's centre, toward the first tooth.

      Parameters

      • inputs: SpurGearDto

        The teeth, the width, the bore, the hub, the keyway and the frame

      Returns Promise<ShapeWithRoles<TopoDSShapePointer>>

      The gear, the faces each role names and its axis

      const { shape, roles, frames } = await bitbybit.occt.parts.mechanical.gears.spurGearWithRoles({ module: 0.2, teeth: 20, width: 1, bore: 0.8 });
      console.log(roles["tip"]?.length, roles["bore"], frames["axis"]);
    • Draws an involute ring gear in the frame's plane, its teeth pointing in toward the frame's origin.

      As a face it is the ring between its outer circle and its teeth; as a wire, only the outline of the teeth. At rotation 0 a tooth points along the frame's direction. Teeth whose tips reach inside the base circle are refused.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The ring as a face, or the outline of its teeth as a closed wire when makeFace is false

      const ring = await bitbybit.occt.parts.mechanical.gears.ringGearProfile({ module: 0.2, teeth: 60, rim: 0.6, makeFace: true });
      const solid = await bitbybit.occt.operations.extrude({ shape: ring, direction: [0, 0.8, 0] });
    • Makes an involute ring gear as a solid: the ring between its outer circle and its teeth, swept width along the frame's normal.

      The first face lies in the frame's plane. A spur gear of the same module meshes inside it with its centre half the module times the difference of their teeth from the ring's centre.

      Parameters

      • inputs: RingGearDto

        The teeth, the rim, the width and the frame

      Returns Promise<TopoDSShapePointer>

      A new solid

      const ring = await bitbybit.occt.parts.mechanical.gears.ringGear({ module: 0.2, teeth: 60, width: 1 });
      const pinion = await bitbybit.occt.parts.mechanical.gears.spurGear({ module: 0.2, teeth: 20, width: 1, bore: 0.6, rotation: 9, frame: { origin: [4, 0, 0], normal: [0, 1, 0], direction: [1, 0, 0] } });
    • Makes a ring gear as ringGear does and names the role each face plays.

      The roles tip, flank, root, rim (the outer face), start (in the frame's plane) and end list face indexes as shapes.face.getFaces numbers them. The axis frame sits at the start face's centre, toward the first tooth.

      Parameters

      • inputs: RingGearDto

        The teeth, the rim, the width and the frame

      Returns Promise<ShapeWithRoles<TopoDSShapePointer>>

      The ring, the faces each role names and its axis

      const { shape, roles, frames } = await bitbybit.occt.parts.mechanical.gears.ringGearWithRoles({ module: 0.2, teeth: 60, width: 1 });
      console.log(roles["tip"]?.length, roles["rim"], frames["axis"]);

    helical

    • Makes an involute helical gear as a solid: its section square to the axis turned steadily along width, with a bore, a hub and a keyway as spurGear has them.

      Two external helical gears of one module and angle in opposite hands mesh, the sum of their pitch radii apart; herringbone makes two opposite halves.

      Parameters

      • inputs: HelicalGearDto

        The teeth and their lean, the width, the bore, the hub, the keyway and the frame

      Returns Promise<TopoDSShapePointer>

      A new solid

      const driver = await bitbybit.occt.parts.mechanical.gears.helicalGear({ module: 0.2, teeth: 20, helixAngle: 20, width: 1, bore: 0.8 });
      const sizes = bitbybit.engineering.mechanical.gears.helicalGearSizes({ module: 0.2, teeth: 20, helixAngle: 20 });
    • Makes a helical gear as helicalGear does and names the role each face plays.

      The roles tip, flank, root, bore, hub, keyway, start (in the frame's plane) and end list face indexes as shapes.face.getFaces numbers them. The axis frame sits at the start face's centre, toward the first tooth.

      Parameters

      • inputs: HelicalGearDto

        The teeth and their lean, the width, the bore, the hub, the keyway and the frame

      Returns Promise<ShapeWithRoles<TopoDSShapePointer>>

      The gear, the faces each role names and its axis

      const { shape, roles } = await bitbybit.occt.parts.mechanical.gears.helicalGearWithRoles({ module: 0.2, teeth: 20, helixAngle: 20, herringbone: true });
      

    racks

    • Draws an involute rack in the frame's plane: its pitch line along the frame's direction, its straight-flanked teeth pointing across it, the first tooth's middle on the origin.

      The rack ends halfway across a gap at each end. A spur gear of the same module meshes with its centre its pitch radius from the pitch line.

      Parameters

      • inputs: RackProfileDto

        The teeth, the height, the frame and whether to make a face

      Returns Promise<TopoDSShapePointer>

      The outline as a face, or as a closed wire when makeFace is false

      const profile = await bitbybit.occt.parts.mechanical.gears.rackProfile({ module: 0.2, teeth: 12, height: 0.6 });
      
    • Makes an involute rack as a solid: its outline swept width along the frame's normal.

      A spur gear of the same module meshes with it with its centre its pitch radius from the pitch line; turning the gear by an angle moves the rack its pitch radius times the angle in radians.

      Parameters

      • inputs: RackDto

        The teeth, the height, the width and the frame

      Returns Promise<TopoDSShapePointer>

      A new solid

      const rack = await bitbybit.occt.parts.mechanical.gears.rack({ module: 0.2, teeth: 12, height: 0.6, width: 1 });
      
    • Makes a rack as rack does and names the role each face plays.

      The roles tip, flank, root, back, side (its two ends), start (in the frame's plane) and end list face indexes as shapes.face.getFaces numbers them. The pitch frame sits on the first tooth's middle on the pitch line, along the rack.

      Parameters

      • inputs: RackDto

        The teeth, the height, the width and the frame

      Returns Promise<ShapeWithRoles<TopoDSShapePointer>>

      The rack, the faces each role names and its pitch frame

      const { shape, roles, frames } = await bitbybit.occt.parts.mechanical.gears.rackWithRoles({ module: 0.2, teeth: 12 });