Bitbybit Docs
    Preparing search index...

    Class EngineeringGearsBeta

    Involute gears by their numbers, with no CAD kernel needed: the circles of spur and ring gears, and their outlines as points on the XY plane for any kernel to extrude. occt.parts.mechanical.gears builds the same teeth as solids. Gears mesh when they share module and pressureAngle: two spur gears half the module times their teeth together apart, a spur gear in a ring half the module times the difference.

    Index

    Constructors

    bevel

    • Beta

      Works out the cones and outer circles of a straight bevel gear meshing a mate at a shaft angle: its pitch, tip and root cones, back radii and apex distance.

      A tip cone of 90 degrees or more is refused. Example: module 2, 20 teeth meshing 40 at 90 degrees -> pitch cone 26.57 degrees, apex 40 away

      Parameters

      Returns BevelGearSizes

      The radii and distances in model units and the cone angles in degrees

      const pinion = bitbybit.engineering.mechanical.gears.bevelGearSizes({ module: 2, teeth: 20, mateTeeth: 40 });
      const wheel = bitbybit.engineering.mechanical.gears.bevelGearSizes({ module: 2, teeth: 40, mateTeeth: 20 });
    • Beta

      Draws a straight bevel gear's teeth as points on the XY plane around the origin, as seen from the apex on the plane of the outer pitch circle, by Tredgold's approximation.

      The flanks run straight to the apex, so the section in a plane nearer it is this outline scaled by its distance over apexDistance.

      Parameters

      • inputs: BevelGearOutlineDto

        The teeth, the mate's teeth, the shaft angle, the turn and the segments per curve

      Returns Bit.Inputs.Base.Point3[]

      The points of the outline

      const sizes = bitbybit.engineering.mechanical.gears.bevelGearSizes({ module: 1, teeth: 20, mateTeeth: 30 });
      const outline = bitbybit.engineering.mechanical.gears.bevelGearOutline({ module: 1, teeth: 20, mateTeeth: 30 });
      const section = await bitbybit.manifold.crossSection.crossSectionFromPoints({ points: outline, fillRule: Bit.Inputs.Manifold.fillRuleEnum.positive, removeDuplicates: false, tolerance: 1e-7 });
      const gear = await bitbybit.manifold.crossSection.operations.extrude({ crossSection: section, height: sizes.apexDistance / 4, nDivisions: 1, twistDegrees: 0, scaleTopX: 0.75, scaleTopY: 0.75, center: false });

    helical

    • Beta

      Works out the circles of an involute helical gear's section square to its axis, with that section's module and pressure angle, and how many degrees the teeth turn per model unit along the axis.

      Example: module 1, 20 teeth, 20 degrees -> pitch radius 10.64, twist 1.96

      Parameters

      Returns HelicalGearSizes

      The radii, the half tooth angle, the transverse module and pressure angle and the twist

      const pinion = bitbybit.engineering.mechanical.gears.helicalGearSizes({ module: 1, teeth: 20, helixAngle: 20 });
      const wheel = bitbybit.engineering.mechanical.gears.helicalGearSizes({ module: 1, teeth: 30, helixAngle: -20 });
      const centreDistance = pinion.pitchRadius + wheel.pitchRadius;
    • Beta

      Draws a helical gear's section square to its axis as points on the XY plane around the origin, a closed loop counterclockwise that does not repeat its start.

      Extrude it with a twist of twist from helicalGearSizes times the height to make the gear.

      Parameters

      Returns Bit.Inputs.Base.Point3[]

      The points of the outline

      const sizes = bitbybit.engineering.mechanical.gears.helicalGearSizes({ module: 1, teeth: 20 });
      const outline = bitbybit.engineering.mechanical.gears.helicalGearOutline({ module: 1, teeth: 20 });
      const section = await bitbybit.jscad.polygon.createFromPoints({ points: outline });
      const gear = await bitbybit.jscad.extrusions.extrudeLinear({ geometry: section, height: 5, twistAngle: sizes.twist * 5, twistSteps: 10 });

    pairs

    • Beta

      Works out how two external spur gears mesh: centre distance, working pressure angle, contact ratio and ratio, profile shifts included.

      The contact ratio counts only involute contact, interferes flags tips reaching past it, and tipShortening and clearance show how shifts crowd tips into roots. Example: module 2, 20 and 30 teeth -> 50 apart, contact ratio 1.61

      Parameters

      • inputs: GearPairDto

        The module, the teeth, the pressure angle, the tooth heights and the profile shifts

      Returns GearPairSizes

      The centre distance, working pressure angle, contact ratio, ratio, interference, tip shortening and clearance

      const pair = bitbybit.engineering.mechanical.gears.gearPair({ module: 2, teethA: 12, teethB: 20, profileShiftA: 0.5, profileShiftB: 0.5 });
      const sound = !pair.interferes && pair.clearance > 0 && pair.contactRatio > 1.2;
    • Beta

      Works out a spur gear meshing inside a ring gear: centre distance, contact ratio, ratio and interference.

      The contact ratio counts only involute contact. interferes flags ring tips below the gear's base circle, or gear tips catching ring tips when the two differ by few teeth. Example: module 2, 20 teeth in 60 -> 40 apart, ratio 3

      Parameters

      Returns InternalGearPairSizes

      The centre distance, contact ratio, ratio and interference

      const pair = bitbybit.engineering.mechanical.gears.internalGearPair({ module: 2, pinionTeeth: 24, ringTeeth: 60 });
      

    planetary

    • Beta

      Lays out a planetary gear set around a sun at rotation 0: the ring's teeth, where the planets sit, how far each planet and the ring turn to mesh, the ratio with the ring held, and whether the planets mesh, keep clear of each other and interfere.

      They mesh when the sun's and ring's teeth together divide by the planets.

      Parameters

      • inputs: PlanetarySetDto

        The module, the sun's and a planet's teeth, the planets and the pressure angle

      Returns PlanetarySet

      The layout and its checks

      const set = bitbybit.engineering.mechanical.gears.planetarySet({ module: 1, sunTeeth: 24, planetTeeth: 24, planets: 4 });
      const ringTeeth = set.ringTeeth;

    racks

    • Beta

      Works out the lines of an involute rack: its pitch, its length, how far its tips stand above the pitch line, how deep its gaps reach below it and how thick each tooth is on it.

      Example: module 2, 10 teeth -> pitch 6.28, 62.8 long

      Parameters

      Returns RackSizes

      The sizes in model units

      const rack = bitbybit.engineering.mechanical.gears.rackSizes({ module: 2, teeth: 10, height: 6 });
      
    • Beta

      Draws an involute rack's outline as points on the XY plane, a closed counterclockwise loop not repeating its start: pitch line on the x axis, teeth along +y, the first tooth's middle on the origin.

      A spur gear of the same module meshes with its centre its pitch radius, plus its profile shift times the module, above the pitch line.

      Parameters

      • inputs: RackOutlineDto

        The teeth, the height and the segments per curve

      Returns Bit.Inputs.Base.Point3[]

      The points of the outline

      const outline = bitbybit.engineering.mechanical.gears.rackOutline({ module: 2, teeth: 10, height: 6 });
      

    ring

    • Beta

      Works out the circles of an involute ring gear, whose teeth point in toward its centre: the pitch and base circles, the tip circle inside them, the root circle beyond, and half the angle a tooth spans at the pitch circle.

      Example: module 1, 40 teeth -> pitch radius 20, tip radius 19, root radius 21.25

      Parameters

      Returns GearSizes

      The four radii in model units and the half tooth angle in radians

      const ring = bitbybit.engineering.mechanical.gears.ringGearSizes({ module: 1, teeth: 40 });
      const outsideAtLeast = 2 * ring.rootRadius;
    • Beta

      Draws the teeth of an involute ring gear as points on the XY plane around the origin: the edge of the hole inside the ring, a closed loop counterclockwise that does not repeat its start.

      Cut it from a circle larger than twice the root radius to make the ring; segments sets how many points stand for each curve.

      Parameters

      Returns Bit.Inputs.Base.Point3[]

      The points of the outline

      const teeth = bitbybit.engineering.mechanical.gears.ringGearOutline({ module: 1, teeth: 40 });
      

    spur

    • Beta

      Works out the circles of an involute spur gear: the pitch circle meshing gears roll on, the base circle its flanks unwind from, the tip and root circles, and half the angle a tooth spans at the pitch circle.

      Example: module 1, 20 teeth -> pitch radius 10, tip radius 11, root radius 8.75

      Parameters

      Returns GearSizes

      The four radii in model units and the half tooth angle in radians

      const pinion = bitbybit.engineering.mechanical.gears.spurGearSizes({ module: 1, teeth: 20 });
      const wheel = bitbybit.engineering.mechanical.gears.spurGearSizes({ module: 1, teeth: 30 });
      const centreDistance = pinion.pitchRadius + wheel.pitchRadius;
    • Beta

      Draws the outline of an involute spur gear as points on the XY plane, a closed counterclockwise loop that does not repeat its start, ready to extrude in any kernel.

      The flanks follow the involute within a ten-thousandth of the module; segments sets the points per curve. Tips that reach only inside the base circle are refused.

      Parameters

      Returns Bit.Inputs.Base.Point3[]

      The points of the outline

      const outline = bitbybit.engineering.mechanical.gears.spurGearOutline({ module: 1, teeth: 20 });
      const gear = await bitbybit.jscad.extrusions.extrudeLinear({ geometry: await bitbybit.jscad.polygon.createFromPoints({ points: outline }), height: 5, twistAngle: 0, twistSteps: 1 });
    • Beta

      Gives the module of an inch gear from its diametral pitch, in the model's unit, so the gear methods can size it.

      The module is the pitch diameter over the teeth, the inverse of the diametral pitch: 1 / DP inches, or 25.4 / DP millimetres. Example: 10 DP -> 0.1 inches, or 2.54 millimetres

      Parameters

      Returns number

      The module in unit

      const gearModule = bitbybit.engineering.mechanical.gears.moduleFromDiametralPitch({ diametralPitch: 12, unit: Bit.Inputs.Base.unitOfLengthEnum.inch });
      const pinion = bitbybit.engineering.mechanical.gears.spurGearSizes({ module: gearModule, teeth: 24 });