3d/Gear_Generator.scad

18 lines
371 B
OpenSCAD
Raw Normal View History

INNER_RADIUS=5;
OUTER_RADIUS=15;
HEIGHT=5;
TEETH_AMOUNT=8;
TEETH_WIDTH=5;
TEETH_HEIGHT=5;
difference() {
cylinder(h=HEIGHT, r=OUTER_RADIUS);
cylinder(h=HEIGHT, r=INNER_RADIUS);
}
for(i = [0:360/TEETH_AMOUNT:360]) {
rotate([0, 0, i])
translate([INNER_RADIUS, -TEETH_WIDTH/2, 0])
cube([OUTER_RADIUS-INNER_RADIUS+TEETH_HEIGHT, TEETH_WIDTH, HEIGHT]);
}