YAMS
Yet Another Mechanism System
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
yams::gearing::Sprocket Class Reference

#include <Sprocket.hpp>

Public Member Functions

 Sprocket (double reductionStage)
 
 Sprocket (std::initializer_list< double > reductionStages)
 
 Sprocket (const std::vector< double > &reductionStages)
 
 Sprocket (const std::vector< std::string > &stages)
 
Sprocket & Times (double x)
 
Sprocket & Div (double x)
 
double GetInputToOutputConversionFactor () const
 
double GetOutputToInputConversionFactor () const
 

Static Public Member Functions

static Sprocket FromStages (std::initializer_list< std::string_view > stages)
 

Detailed Description

Calculates the conversion factor for a sprocket (chain/belt) stage chain.

Each stage is a ratio > 0 representing the speed reduction from input to output.

Constructor & Destructor Documentation

◆ Sprocket() [1/4]

yams::gearing::Sprocket::Sprocket ( double  reductionStage)
explicit

Create the Sprocket with a single reduction stage.

Parameters
reductionStageReduction stage where the value is > 0 to indicate a reduction.

◆ Sprocket() [2/4]

yams::gearing::Sprocket::Sprocket ( std::initializer_list< double >  reductionStages)
explicit

Create the Sprocket with the reduction stages given.

Parameters
reductionStagesReduction stages where each value is > 0 to indicate a reduction.

◆ Sprocket() [3/4]

yams::gearing::Sprocket::Sprocket ( const std::vector< double > &  reductionStages)
explicit

Create the Sprocket with the reduction stages given.

Parameters
reductionStagesReduction stages where each value is > 0 to indicate a reduction.

◆ Sprocket() [4/4]

yams::gearing::Sprocket::Sprocket ( const std::vector< std::string > &  stages)
explicit

Create the Sprocket with the reduction stages given as "IN:OUT" strings.

Parameters
stagesList of stages in the format "IN:OUT".

Member Function Documentation

◆ Div()

Sprocket & yams::gearing::Sprocket::Div ( double  x)

Divide the sprocket reduction ratio by x.

Parameters
xFactor to divide by.
Returns
*this for chaining.

◆ FromStages()

static Sprocket yams::gearing::Sprocket::FromStages ( std::initializer_list< std::string_view >  stages)
static

Create a Sprocket from stages in "IN:OUT" string form.

Parameters
stagesStages in the format "IN:OUT".
Returns
Sprocket.

◆ GetInputToOutputConversionFactor()

double yams::gearing::Sprocket::GetInputToOutputConversionFactor ( ) const

Get the conversion factor from sprocket input to sprocket output rotations (OUT/IN).

Returns
OUT/IN conversion factor.

◆ GetOutputToInputConversionFactor()

double yams::gearing::Sprocket::GetOutputToInputConversionFactor ( ) const

Get the conversion factor from sprocket output to sprocket input rotations (IN/OUT).

Returns
IN/OUT conversion factor.

◆ Times()

Sprocket & yams::gearing::Sprocket::Times ( double  x)

Multiply the sprocket reduction ratio by x.

Parameters
xFactor to multiply by.
Returns
*this for chaining.

The documentation for this class was generated from the following file: