@@ -6,8 +6,7 @@ include <math.scad>
66
77
88// generates a motor mount for the specified nema standard #.
9- module stepper_motor_mount(nema_standard,slide_distance=0, mochup=true)
10- {
9+ module stepper_motor_mount(nema_standard,slide_distance=0, mochup=true, tolerance=0) {
1110 // dimensions from:
1211 // http://www.numberfactory.com/NEMA%20Motor%20Dimensions.htm
1312 if (nema_standard == 17 )
@@ -21,7 +20,8 @@ module stepper_motor_mount(nema_standard,slide_distance=0, mochup=true)
2120 bolt_hole_size = 3.5 ,
2221 bolt_hole_distance = 1.220 * mm_per_inch,
2322 slide_distance = slide_distance,
24- mochup = mochup);
23+ mochup = mochup,
24+ tolerance= tolerance);
2525 }
2626 if (nema_standard == 23 )
2727 {
@@ -34,7 +34,8 @@ module stepper_motor_mount(nema_standard,slide_distance=0, mochup=true)
3434 bolt_hole_size = 0.195 * mm_per_inch,
3535 bolt_hole_distance = 1.856 * mm_per_inch,
3636 slide_distance = slide_distance,
37- mochup = mochup);
37+ mochup = mochup,
38+ tolerance= tolerance);
3839 }
3940
4041}
@@ -51,16 +52,17 @@ module _stepper_motor_mount(
5152 bolt_hole_distance,
5253 slide_distance = 0 ,
5354 motor_length = 40 , // arbitray - not standardized
54- mochup
55+ mochup,
56+ tolerance = 0
5557)
5658{
5759 union ()
5860 {
5961 // == centered mount points ==
6062 // mounting circle inset
61- translate ([0 ,slide_distance/2 ,0 ]) circle(r = pilot_diameter/2 );
63+ translate ([0 ,slide_distance/2 ,0 ]) circle(r = pilot_diameter/2 + tolerance );
6264 square([pilot_diameter,slide_distance],center= true );
63- translate ([0 ,- slide_distance/2 ,0 ]) circle(r = pilot_diameter/2 );
65+ translate ([0 ,- slide_distance/2 ,0 ]) circle(r = pilot_diameter/2 + tolerance );
6466
6567 // todo: motor shaft hole
6668
@@ -71,9 +73,9 @@ module _stepper_motor_mount(
7173 {
7274 translate ([x* bolt_hole_distance/2 ,y* bolt_hole_distance/2 ,0 ])
7375 {
74- translate ([0 ,slide_distance/2 ,0 ]) circle(bolt_hole_size/2 );
75- translate ([0 ,- slide_distance/2 ,0 ]) circle(bolt_hole_size/2 );
76- square([bolt_hole_size,slide_distance],center= true );
76+ translate ([0 ,slide_distance/2 ,0 ]) circle(bolt_hole_size/2 + tolerance );
77+ translate ([0 ,- slide_distance/2 ,0 ]) circle(bolt_hole_size/2 + tolerance );
78+ square([bolt_hole_size+ 2 * tolerance ,slide_distance],center= true );
7779 }
7880 }
7981 }
0 commit comments