Roller Chain Drive API
Roller-chain drive maths as an API, computed locally and deterministically — the chain-length, sprocket and speed numbers a machine designer or millwright lays out a drive with. The chain-length endpoint gives the chain in pitches from the two sprocket tooth counts, the chain pitch and the centre distance: L = 2·C + (N1+N2)/2 + ((N2−N1)/2π)² ÷ C (C in pitches), rounded UP to an even number so the chain closes without an offset link — a 17- and 34-tooth pair at 15-inch centres on #40 (half-inch) chain comes to 86 pitches, 43 inches. The sprocket endpoint gives the pitch diameter, pitch ÷ sin(180°/teeth), and the outside diameter — a 17-tooth #40 sprocket has a 2.72-inch pitch circle. The speed endpoint gives the chain's linear speed, pitch × teeth × rpm ÷ 12, so a 17-tooth #40 sprocket at 100 rpm runs the chain at about 71 ft/min. Everything is computed locally and deterministically, so it is instant and private. Ideal for machine-design and drivetrain apps, conveyor and equipment-build tools, maker and CAD calculators, and engineering aids. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. For gear ratios use a gear-ratio API; for belts use a pulley API.
api.oanor.com/chaindrive-api