@@ -6,8 +6,7 @@ include <math.scad>
6
6
7
7
8
8
// 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) {
11
10
// dimensions from:
12
11
// http://www.numberfactory.com/NEMA%20Motor%20Dimensions.htm
13
12
if (nema_standard == 17 )
@@ -21,7 +20,8 @@ module stepper_motor_mount(nema_standard,slide_distance=0, mochup=true)
21
20
bolt_hole_size = 3.5 ,
22
21
bolt_hole_distance = 1.220 * mm_per_inch,
23
22
slide_distance = slide_distance,
24
- mochup = mochup);
23
+ mochup = mochup,
24
+ tolerance= tolerance);
25
25
}
26
26
if (nema_standard == 23 )
27
27
{
@@ -34,7 +34,8 @@ module stepper_motor_mount(nema_standard,slide_distance=0, mochup=true)
34
34
bolt_hole_size = 0.195 * mm_per_inch,
35
35
bolt_hole_distance = 1.856 * mm_per_inch,
36
36
slide_distance = slide_distance,
37
- mochup = mochup);
37
+ mochup = mochup,
38
+ tolerance= tolerance);
38
39
}
39
40
40
41
}
@@ -51,16 +52,17 @@ module _stepper_motor_mount(
51
52
bolt_hole_distance,
52
53
slide_distance = 0 ,
53
54
motor_length = 40 , // arbitray - not standardized
54
- mochup
55
+ mochup,
56
+ tolerance = 0
55
57
)
56
58
{
57
59
union ()
58
60
{
59
61
// == centered mount points ==
60
62
// 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 );
62
64
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 );
64
66
65
67
// todo: motor shaft hole
66
68
@@ -71,9 +73,9 @@ module _stepper_motor_mount(
71
73
{
72
74
translate ([x* bolt_hole_distance/2 ,y* bolt_hole_distance/2 ,0 ])
73
75
{
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 );
77
79
}
78
80
}
79
81
}
0 commit comments