Openscad · Programmering

Gear

I have made a simpel gear in Openscad for my centrifugal blower.

mittandhjul

//sr=100; //radius of big circle
//n=19; //number of teeth
pi=3.14159265;
//lr=(sr*pi)/n; //radius of small circles

module small_circles_outer(n, sr, height) {
lr=(sr*pi)/n;
for ( i = [0 : n] )

{
rotate([0,0,(360*(i/n))])
translate([sr,0,0])
cylinder(h=height, r=(lr/2));
}
}

module small_circles_inner(n, sr, height) {
lr=(sr*pi)/n;
for ( i = [0 : n] )

{
rotate([0,0,(360*(0.5/n))])
rotate([0,0,(360*(i/n))])
translate([sr,0,0])
cylinder(h=height, r=(lr/2));
}
}

difference() {
difference() {

union() {

small_circles_outer(12, 100, 20);
cylinder(h=20, r=100);
}
small_circles_inner(12, 100, 20);
}
cylinder(h=20, r=14);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s