-
Notifications
You must be signed in to change notification settings - Fork 13
/
ToolClip.scad
149 lines (127 loc) · 5.26 KB
/
ToolClip.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
plateThickness = 3.5;
// for meshing with remixed penholder
// http://www.thingiverse.com/thing:1873991
// The penholder should have mounting_bump_thickness = 3.5
// and mounting_bump_diameter = 8
mountingBumpDiameter = 0; //8.5;
mountingBumpPairsCount = 2;
mountingBumpVerticalSpacing = 42;
mountingBumpHorizontalSpacing = 20;
screwHorizontalSpacing = 51; // matches springtool.scad
screwVerticalSpacing = 22;
firstScrewHeight = 16;
screw_hole_diameter = 2.9; // M3
screw_countersink_diameter = 6.3;
screw_countersink_depth = 1.5; // 2.17;
screw_countersink_sides = 16;
module dummy() {}
upperArmThickness = 3;
lowerArmThickness = 7;
upperArmSpacing = 58.8;
upperArmHorizontalSpacing = 58.9;
upperCatchLength = 3.1;
upperCatchThickness = 1.75;
upperShelfLength = 24;
upperShelfThickness = 2;
lowerArmHorizontalSpacing = 39.5;
upperArmMainLength = 45;
upperArmGusset = 2;
rodDiameter = 8.15;
rodCatchDiameter = 19;
rodInset = 6 + rodCatchDiameter/2;
lowerArmLength = rodInset+rodCatchDiameter/2;
lowerArmHeight = 2*6.5+rodCatchDiameter;
rodTopZ = lowerArmHeight - rodCatchDiameter / 2 + rodDiameter / 2;
rightUpperArmStartFromRod = 16;
leftUpperArmStartFromRod = 23.2;
rightUpperArmHeight = 28;
leftUpperArmHeight = 16.4;
plateHeight = rodTopZ+rightUpperArmStartFromRod+rightUpperArmHeight+upperShelfThickness;
mountingBumpsHeight = lowerArmHeight/2-rodCatchDiameter/2;
nudge = 0.01;
plateWidth = upperArmHorizontalSpacing + 2 * upperArmThickness;
screw_positions = [[-screwHorizontalSpacing/2., firstScrewHeight],
[screwHorizontalSpacing/2., firstScrewHeight],
[-screwHorizontalSpacing/2., firstScrewHeight+screwVerticalSpacing],
[screwHorizontalSpacing/2., firstScrewHeight+screwVerticalSpacing]];
module clip() {
// backplate
difference() {
translate([nudge,-plateWidth/2,0]) rotate([0,-90,0]) linear_extrude(height=plateThickness) difference() {
corner = (plateWidth - lowerArmHorizontalSpacing)/2-lowerArmThickness;
square([plateHeight,plateWidth]);
polygon(points=[[0,0],[0,corner],[corner,0]]);
polygon(points=[[0,plateWidth],[0,plateWidth-corner],[corner,plateWidth]]);
}
for (z = [0:mountingBumpPairsCount-1]) {
for (sign = [-1:2:1]) {
verticalAdjust = z%2 != 0 ? mountingBumpDiameter : 0;
translate([-plateThickness-nudge,sign*mountingBumpHorizontalSpacing/2,mountingBumpsHeight+z*mountingBumpVerticalSpacing+verticalAdjust])
rotate([90,180*((z%2)),90])
linear_extrude(height=2*nudge+plateThickness)
union() {
translate([0,mountingBumpDiameter/2,0])
circle(d=mountingBumpDiameter);
translate([-mountingBumpDiameter/2,0,0]) square([mountingBumpDiameter,mountingBumpDiameter/2]);
}
}
}
}
// loop over two sides
for (i=[0:1]) {
sign = i * 2 - 1;
left = (i==0);
// left: i = 0, sign = -1
// right: i = 1, sign = 1
upperArmStartZ = rodTopZ + (left ? leftUpperArmStartFromRod : rightUpperArmStartFromRod);
upperArmHeight = ( left ? leftUpperArmHeight : rightUpperArmHeight );
shelfAreaHeightAdjust = left ? (rightUpperArmStartFromRod+rightUpperArmHeight)-(leftUpperArmStartFromRod+leftUpperArmHeight) : 0;
// upper arms
translate([0,sign*(plateWidth/2-upperArmThickness/2),nudge+upperArmStartZ+upperArmHeight/2])
rotate([-sign*90,0,0])
translate([0,-upperArmHeight/2,-upperArmThickness/2])
union() {
linear_extrude(height=upperArmThickness)
union() {
if (left) {
square([upperShelfLength, upperArmHeight+shelfAreaHeightAdjust]);
}
else {
square([upperArmMainLength+upperCatchThickness, upperArmHeight]);
}
}
if (!left) {
translate([upperArmMainLength,0,0])
rotate([-90,0,0])
linear_extrude(height=upperArmHeight)
translate([0,-upperArmThickness])
square([upperCatchThickness,upperCatchLength+upperArmThickness]);
}
rotate([-90,0,0])
linear_extrude(height=upperArmHeight+shelfAreaHeightAdjust)
polygon(points=[[-nudge,upperArmGusset],[upperArmGusset,-nudge],[-nudge,-nudge]]);
}
// lower arms
armHeightAdjustment = (i==0) ? (6.5-2.7) : 0;
translate([0,sign*(lowerArmHorizontalSpacing/2+lowerArmThickness/2),0]) rotate([90,0,0]) translate([0,0,-lowerArmThickness/2]) linear_extrude(height=lowerArmThickness)
difference() {
square([lowerArmLength, lowerArmHeight-armHeightAdjustment]);
translate([rodInset,lowerArmHeight/2]) union() {
circle(r=rodCatchDiameter/2);
translate([rodCatchDiameter/2,0]) square([rodCatchDiameter,rodCatchDiameter],center=true);
}
}
}
translate([0,-plateWidth/2,rodTopZ+rightUpperArmStartFromRod+rightUpperArmHeight]) linear_extrude(height=upperShelfThickness) square([upperShelfLength,plateWidth]);
}
render(convexity=10)
difference() {
rotate([0,-90,-90])
clip();
for (i=[0:len(screw_positions)-1]) {
translate([screw_positions[i][0],screw_positions[i][1],-screw_countersink_depth]) {
cylinder(h=30, d=screw_countersink_diameter, $fn=16);
translate([0,0,-10]) cylinder(h=30, d=screw_hole_diameter, $fn=16);
}
}
}