In this question it is asked, "how do you find the length of a belt between two pulleys" Given two circles, find the length of a pulley belt that connects the two.
this question assumes that the pulley is on the outer edge, and asks only about the length.
use case: i have a 3D printer CAD simulation where the pulleys may be of any arbitrary size, and the belt may at times cross over from outer edge to inner edge, and back. my first attempt to code this up (in python) was not entirely correct:
you can see in the case of the (very) large bearing the belt layout is incorrect (leftmost part of belt in picture), also the pulley which doubles-back on itself - swapping from outer-to-inner and then inner-to-outer in the process - the "belt" is overlapping inside the pulley (lowest one in the picture)
so there are two cases where i need to know the length of the belt, and, unlike the other question posted i also need to know the angle that the belt segment makes between the two bearings. we also assume a starting angle in each case from the first to the second bearing
given a starting angle and two pulleys of arbitrary size, the belt wraps around the outer edge of the first and then continues in a straight line until it contacts the second bearing on the OUTER edge.
given a starting angle and two pulleys of arbitrary size, the belt wraps around the outer edge of the first and then continues in a straight line until it contacts the second bearing on the INNER edge.
if there is a simpler way to express this, please feel free to express then answer the simpler question :) if anyone would like to see the actual python code it is here, as GPLv3+ licensed source.
all help greatly appreciated.