-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmotor_mount.scad
99 lines (77 loc) · 2.18 KB
/
motor_mount.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
$fs=0.01;
y_axis = [0,0,90];
boltDiameter = 4;
boltRadius = boltDiameter/2;
wallThickness = 5;
screwRadius=1.5;
motorDiameter = 23; // NEMA 11
motorRadius = motorDiameter/2;
frameWidth = motorDiameter + wallThickness + 1/2 + (wallThickness + 1)*2;
extrusionThickness = 14.8;
motor_mount(2*wallThickness);
module motor_mount(height){
difference()
{
motor_board(frameWidth+24, frameWidth, height);
cut_section();
motor_section(motorRadius, height*2);
translate([0,0,-height])
bolts_at_corners(motorRadius, motorRadius, height*2, boltRadius);
#fake_extrusions(); //negative - will be visible in rendering only
}
}
module motor_board(length, width, height)
{
union()
{
// motor board
cube([width, width, height], center=true);
// extrusion support board
cube([length, width/2, height], center=true);
}
}
module cut_section(){
translate([0, 0, frameWidth+wallThickness])
rotate([45, 0, 0])
translate([-frameWidth, 0, -frameWidth*2])
cube(size=[frameWidth*4, frameWidth*2, frameWidth*4]);
translate([frameWidth/2, 0, -partThickness/2]){
rotate([0,90,0]){
#cylinder(r=screwRadius,h=frameWidth);
}
}
translate([-frameWidth*3/2, 0, -partThickness/2]){
rotate([0,90,0]){
#cylinder(r=screwRadius,h=frameWidth);
}
}
}
module bolt_section(radius, height){
cylinder(r=radius, h=height);
}
module motor_section(radius, height){
cylinder(r=radius, h=height, center=true);
}
module bolts_at_corners(length, width, height, radius){
translate([length, width, 0])
bolt_section(radius, height);
translate([-length, width, 0])
bolt_section(radius, height);
translate([length, -width, 0])
bolt_section(radius, height);
translate([-length, -width, 0])
bolt_section(radius, height);
}
module extrusion_support(width, height){
cube([width,width, height]);
}
module fake_extrusions(){
translate([motorRadius+wallThickness/2, -extrusionThickness/2,-(extrusionThickness/2 +wallThickness)])
{
extrusion_support(extrusionThickness, 100);
}
translate([-motorRadius-extrusionThickness-wallThickness/2 ,-extrusionThickness/2,-(extrusionThickness/2 +wallThickness)])
{
extrusion_support(extrusionThickness, 100);
}
}