Skip to content

Add rack() module to involute_gears. #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions involute_gears.scad
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,46 @@ module gear (
}
}

module rack(
number_of_teeth=15,
circular_pitch=false, diametral_pitch=false,
pressure_angle=28,
clearance=0.2,
rim_thickness=8,
rim_width=5,
flat=false)
{

if (circular_pitch==false && diametral_pitch==false)
echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch");

//Convert diametrial pitch to our native circular pitch
circular_pitch = (circular_pitch!=false?circular_pitch:180/diametral_pitch);
pitch = circular_pitch / 180 * PI;

addendum = circular_pitch / 180;
dedendum = addendum + clearance;
pitch_slope = tan(pressure_angle);

linear_exturde_flat_option(flat=flat, height=rim_thickness)
union()
{
translate([0,-dedendum-rim_width/2])
square([number_of_teeth*pitch, rim_width],center=true);

p1 = pitch / 4 + pitch_slope * dedendum;
p2 = pitch / 4 - pitch_slope * addendum;
for(i=[1:number_of_teeth])
translate([pitch*(i-number_of_teeth/2-0.5),0])
polygon(points=[
[-p1,-dedendum],
[p1,-dedendum],
[p2,addendum],
[-p2,addendum]
]);
}
}

module linear_exturde_flat_option(flat =false, height = 10, center = false, convexity = 2, twist = 0)
{
if(flat==false)
Expand Down Expand Up @@ -560,6 +600,12 @@ module test_gears()
circles=5,
hub_diameter=2*8.88888889);

translate ([-37.5,0,0])
rotate ([0,0,-90])
rack (
circular_pitch=500
);

translate ([0,0,10])
{
gear (
Expand Down