-
Notifications
You must be signed in to change notification settings - Fork 0
/
EndSupportMotorSide.scad
176 lines (154 loc) · 8.18 KB
/
EndSupportMotorSide.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// #################################################################
// EndSupportMotorSide
// The carriage that connects to the drive cable or belt, and
// accepts one end of a cross rod
// #################################################################
// Include global parameters for the project
include <parameters.scad>;
include <624_GT2_BeltOverBearingAdapter.scad>;
screwHoleInset = max(mountingScrewHeadDiameter/2, wallThicknessMin); // From corner of plate to center of hole
// The 624 bearing is 5mm wide, and the pulley is 9mm wide in total.
// So there needs to be a 2mm inset to reach the bearing center from the outside edge of the pulley
// Plus some gap to avoid rubbing
// Because of overhang angle needing to be kept to 45 or less, they don't quite reach and the pulleys will need 1mm spacers inside also.
pulleyBearingInset = 1 + motorSidePulleySideClearance;
view();
// print();
module view() {
EndSupportMotorSide();
// Show pulleys in place
color("grey") {
translate([motorSidePulleyMountTotalThickness/2+motorSidePulleySideClearance,motorSidePulleyEdgeDiameter/2+slideRodDiameter+wallThicknessMin,motorSidePulleyEdgeDiameter/2++wallThicknessMin])
rotate([90,0,0])
rotate([0,90,0])
624_GT2_BeltOverBearingAdapterViewCutaway($fn=100);
translate([-motorSidePulleyMountTotalThickness/2-motorSidePulleySideClearance,motorSidePulleyEdgeDiameter/2+slideRodDiameter+wallThicknessMin,motorSidePulleyEdgeDiameter/2++wallThicknessMin])
rotate([0,270,0])
624_GT2_BeltOverBearingAdapterViewCutaway($fn=100);
}
color("white")
translate([0,motorSidePulleyEdgeDiameter/2+slideRodDiameter+wallThicknessMin,motorSidePulleyEdgeDiameter/2++wallThicknessMin])
rotate([0,270,0])
cylinder(r=2,h=30, center=true);
}
module print () {
EndSupportMotorSide();
translate([mountingPlateX,0,0])
624_GT2_BeltOverBearingAdapterPrint($fn=100);
translate([mountingPlateX,mountingPlateX,0])
624_GT2_BeltOverBearingAdapterPrint($fn=100);
translate([mountingPlateX,mountingPlateX*2,0]){
PulleySpacerRings();
}
translate([mountingPlateX*2,mountingPlateX*2,0]){
PulleySpacerRings();
}
}
module EndSupportMotorSide(){
//main flange and hull for mounting pulley/bearing
difference(){
EndSupportMotorSideSolids();
EndSupportMotorSideCutouts();
};
};
module EndSupportMotorSideSolids() {
// Socket for Slide Rod
cylinder(d=slideRodDiameter+2*wallThicknessMin, h=endSupportRodInsertionDepth, center=false, $fn=fnLargeDiameter);
// Mounting Plate
translate([0,motorSidePulleyEdgeDiameter/2,0])
RoundedBox ([mountingPlateX, mountingPlateY, wallThicknessMin>mountingPlateZ?wallThicknessMin:mountingPlateZ], wallThicknessMin, sidesonly=true, center=true, $fn=fnSmallDiameter);
// Pulley Brackets
hull() {
translate([0,motorSidePulleyEdgeDiameter/2+slideRodDiameter+wallThicknessMin,motorSidePulleyEdgeDiameter/2++wallThicknessMin])
rotate([0,90,0])
cylinder(d=motorSidePulleyBearingInsideDiameter+wallThicknessMin*2, h=motorSidePulleyMountTotalThickness, center=true, $fn=fnLargeDiameter);
translate([0,(motorSidePulleyEdgeDiameter/2+slideRodDiameter+wallThicknessMin)/2,(motorSidePulleyEdgeDiameter/2++wallThicknessMin)/2])
cube([motorSidePulleyMountTotalThickness,motorSidePulleyEdgeDiameter/2+slideRodDiameter+wallThicknessMin,motorSidePulleyEdgeDiameter/2++wallThicknessMin], center=true);
}
translate([-motorSidePulleyMountTotalThickness/2+0.01,motorSidePulleyEdgeDiameter/2+slideRodDiameter+wallThicknessMin,motorSidePulleyEdgeDiameter/2++wallThicknessMin])
rotate([0,270,0])
// cylinder(r1=(motorSidePulleyBearingInsideDiameter2)/2, r2=(motorSidePulleyBearingInsideDiameter2)/2+pulleyBearingInset, h=pulleyBearingInset*2, center=false, $fn=fnLargeDiameter);
cylinder(r2=(motorSidePulleyBearingInsideDiameter2)/2, r1=(motorSidePulleyBearingInsideDiameter2)/2+pulleyBearingInset, h=pulleyBearingInset, center=false, $fn=fnLargeDiameter);
translate([motorSidePulleyMountTotalThickness/2-0.01,motorSidePulleyEdgeDiameter/2+slideRodDiameter+wallThicknessMin,motorSidePulleyEdgeDiameter/2++wallThicknessMin])
rotate([0,90,0])
cylinder(r2=(motorSidePulleyBearingInsideDiameter2)/2, r1=(motorSidePulleyBearingInsideDiameter2)/2+pulleyBearingInset, h=pulleyBearingInset, center=false, $fn=fnLargeDiameter);
}
module EndSupportMotorSideCutouts() {
// Socket for Slide Rod
cylinder(h=endSupportRodInsertionDepth+0.01, d=slideRodDiameter, center=false);
// Screw Holes in Mounting Plate
translate([0,motorSidePulleyEdgeDiameter/2,0])
for (x = [mountingPlateX/2-screwHoleInset, -mountingPlateX/2+screwHoleInset],
y = [mountingPlateY/2-screwHoleInset, -mountingPlateY/2+screwHoleInset]) {
translate([x,y,0])
cylinder(r=mountingScrewHoleDiameter/2, h=wallThicknessMin>mountingPlateZ?wallThicknessMin:mountingPlateZ+1, center=true, $fn=fnSmallDiameter);
}
// Hole for center of pulley mount
translate([0,motorSidePulleyEdgeDiameter/2+slideRodDiameter+wallThicknessMin,motorSidePulleyEdgeDiameter/2++wallThicknessMin])
rotate([0,90,0])
cylinder(r=motorSidePulleyBearingInsideDiameter/2, h=motorSidePulleyMountTotalThickness+pulleyBearingInset*2+1, center=true, $fn=fnLargeDiameter);
}
// The space that one pulley would be situated in, leaving gaps except where pressed in the middle
module PulleySpacerRings() {
for (y = [motorSidePulleyBearingInsideDiameter2+2, motorSidePulleyBearingInsideDiameter2*2+4]) {
translate([0,y,0])
difference() {
cylinder(d=motorSidePulleyBearingInsideDiameter2+0.1, h=motorSidePulleySideClearance, center=true, $fn=fnLargeDiameter);
cylinder(d=motorSidePulleyBearingInsideDiameter+0.1, h=motorSidePulleySideClearance+0.1, center=true, $fn=fnLargeDiameter);
}
}
}
//
// module PulleyOutsideRing() {
// SimpleRing(motorSidePulleyEdgeDiameter, motorSidePulleyBearingOutsideDiameter, beltThickness+beltThickness);
// // shoulder ring
// translate([0,0,-(pulley_inside_belt_height+pulley_shoulder_thickness)/2]) SimpleRing(pulley_shoulder_od, pulley_id-2, pulley_shoulder_thickness);
// }
//
// module PulleyInsideRing() {
// difference() {
// SimpleRing(pulley_shoulder_od, pulley_id-2, pulley_shoulder_thickness);
// translate([0,0,-(pulley_inside_belt_height+pulley_shoulder_thickness)/2]) SimpleRing(pulley_od, pulley_id, pulley_inside_belt_height+pulley_shoulder_thickness);
// }
// }
//
// module SimpleRing(ringOD, ringID, height) {
// difference() {
// cylinder(r=ringOD/2, h=height, center=true);
// cylinder(r=ringID/2, h=height*1.05, center=true);
// }
// }
module RoundedBox(size, radius, sidesonly=true, center=true) {
rot = [ [0,0,0], [90,0,90], [90,90,0] ];
// Translate shape back to origin on corners
// translate((size - [0,0,0])/2)
if (sidesonly) {
cube(size - [2*radius,0,0], center);
cube(size - [0,2*radius,0], center);
// Full length cylinders on 4 edges
for (x = [radius-size[0]/2, -radius+size[0]/2],
y = [radius-size[1]/2, -radius+size[1]/2]) {
translate([x,y,0]) cylinder(r=radius, h=size[2], center=true);
}
}
else {
cube([size[0], size[1]-radius*2, size[2]-radius*2], center=center);
cube([size[0]-radius*2, size[1], size[2]-radius*2], center=center);
cube([size[0]-radius*2, size[1]-radius*2, size[2]], center=center);
// Cylinders shortened and on all cube edges
for (axis = [0:2]) {
for (x = [radius-size[axis]/2, -radius+size[axis]/2],
y = [radius-size[(axis+1)%3]/2, -radius+size[(axis+1)%3]/2]) {
rotate(rot[axis])
translate([x,y,0])
cylinder(h=size[(axis+2)%3]-2*radius, r=radius, center=true);
}
}
//sphere corners
for (x = [radius-size[0]/2, -radius+size[0]/2],
y = [radius-size[1]/2, -radius+size[1]/2],
z = [radius-size[2]/2, -radius+size[2]/2]) {
translate([x,y,z]) sphere(radius);
}
}
}