add_gear_mating¶
- add_gear_mating(master: GearBase, slave: GearBase, efficiency: float | int) None¶
It creates a gear mating between two existing gears. This mating is used to compose the
Powertrain.The ratio of the angular speed of the
mastergear over the angular speed of theslavegear is equal to the ratio of theslavegear number of teeth over themastergear number of teeth.The
mastergear is closest to the motor and transfers a fraction of the driving torque to theslaveone, based on theefficiencyvalue: the higher theefficiency, the higher the fraction of transferred driving torque.Parameters¶
masterGearBaseDriving gear. It must be an instance of
GearBase.slaveGearBaseDriven gear. It must be an instance of
GearBase.efficiencyfloatorintMechanical efficiency of the gear mating. It must be a
floator anintbetween0and1.
Raises
TypeErrorValueErrorIf
masterandslaveare the same gear,if
efficiencyis not within0and1,if
masterandslavehave different values formodule(seeSpurGear.moduleorHelicalGear.module)if
masteris an instance ofHelicalGearbutslaveis not,if
slaveis an instance ofHelicalGearbutmasteris not,if both
masterandslaveare instances ofHelicalGear, but they have differentHelicalGear.helix_angle.