diff options
Diffstat (limited to 'chain.scad')
-rw-r--r-- | chain.scad | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/chain.scad b/chain.scad new file mode 100644 index 0000000..d0d17e9 --- /dev/null +++ b/chain.scad @@ -0,0 +1,19 @@ +// 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);
\ No newline at end of file |