Skip to content

Commit

Permalink
incorporated 2D export to involute_gears, by Amp
Browse files Browse the repository at this point in the history
  • Loading branch information
diara628 committed Aug 15, 2010
1 parent ce3806d commit fcf6ba6
Showing 1 changed file with 33 additions and 13 deletions.
46 changes: 33 additions & 13 deletions involute_gears.scad
@@ -1,7 +1,7 @@
// Parametric Involute Bevel and Spur Gears by GregFrost
// It is licensed under the Creative Commons - GNU GPL license.
// © 2010 by GregFrost
// http://www.thingiverse.com/thing:3575
// It is licensed under the Creative Commons - GNU LGPL 2.1 license.
// © 2010 by GregFrost, thingiverse.com/Amp
// http://www.thingiverse.com/thing:3575 and http://www.thingiverse.com/thing:3752

// Simple Test:
//gear (circular_pitch=700,
Expand Down Expand Up @@ -30,6 +30,10 @@ module test_bevel_gear_pair(){
bevel_gear_pair ();
}

module test_bevel_gear(){bevel_gear();}

bevel_gear();

pi=3.1415926535897932384626433832795;

//==================================================
Expand Down Expand Up @@ -303,7 +307,8 @@ module gear (
circles=0,
backlash=0,
twist=0,
involute_facets=0)
involute_facets=0,
flat=false)
{
if (circular_pitch==false && diametral_pitch==false)
echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch");
Expand Down Expand Up @@ -349,13 +354,13 @@ module gear (
0.70*circle_orbit_curcumference/circles,
(rim_radius-hub_diameter/2)*0.9);

difference ()
difference()
{
union ()
{
difference ()
{
linear_extrude (height=rim_thickness, convexity=10, twist=twist)
linear_exturde_flat_option(flat=flat, height=rim_thickness, convexity=10, twist=twist)
gear_shape (
number_of_teeth,
pitch_radius = pitch_radius,
Expand All @@ -370,25 +375,40 @@ module gear (
cylinder (r=rim_radius,h=rim_thickness-gear_thickness+1);
}
if (gear_thickness > rim_thickness)
cylinder (r=rim_radius,h=gear_thickness);
if (hub_thickness > gear_thickness)
linear_exturde_flat_option(flat=flat, height=gear_thickness)
circle (r=rim_radius);
if (flat == false && hub_thickness > gear_thickness)
translate ([0,0,gear_thickness])
cylinder (r=hub_diameter/2,h=hub_thickness-gear_thickness);
linear_exturde_flat_option(flat=flat, height=hub_thickness-gear_thickness)
circle (r=hub_diameter/2);
}
translate ([0,0,-1])
cylinder (
r=bore_diameter/2,
h=2+max(rim_thickness,hub_thickness,gear_thickness));
linear_exturde_flat_option(flat =flat, height=2+max(rim_thickness,hub_thickness,gear_thickness))
circle (r=bore_diameter/2);
if (circles>0)
{
for(i=[0:circles-1])
rotate([0,0,i*360/circles])
translate([circle_orbit_diameter/2,0,-1])
cylinder(r=circle_diameter/2,h=max(gear_thickness,rim_thickness)+3);
linear_exturde_flat_option(flat =flat, height=max(gear_thickness,rim_thickness)+3)
circle(r=circle_diameter/2);
}
}
}

module linear_exturde_flat_option(flat =false, height = 10, center = false, convexity = 2, twist = 0)
{
if(flat==false)
{
linear_extrude(height = height, center = center, convexity = convexity, twist= twist) child(0);
}
else
{
child(0);
}

}

module gear_shape (
number_of_teeth,
pitch_radius,
Expand Down

0 comments on commit fcf6ba6

Please sign in to comment.