// a chain around two gears of given radii (r1, r2) and distance; // coord origin is at the gear with r1 module chain(r1, r2, dist, chain_width, chain_height) { // rotate([90, 0, 0]) difference() { chain_template(r1 + chain_height, r2 + chain_height, dist, chain_width); chain_template(r1, r2, dist, chain_width + 1); } } module chain_template(r1, r2, dist, chain_width) hull () { cylinder(r=r1, h=chain_width, center=true); translate([dist, 0, 0]) cylinder(r=r2, h=chain_width, center=true); } chain(20, 30, 100, 10, 5);