add hand hull to keep spool from falling off end of holder
[ozzloy@gmail.com/3d-printables] / mk2-haribo-spool-holder.scad
1 /* GNU AGPLv3 (or later at your option)
2 see bottom for more license info */
3
4 /* measurements from misumi's 3030 aluminum extrusion data sheet
5 https://us.misumi-ec.com/pdf/fa/2012/p2_0545.pdf
6 */
7
8 x = 30;
9 y = 30;
10 diagonal = sqrt(pow(30/2, 2) + pow(30/2, 2));
11 opening_width = 8;
12 inner_block = 12;
13
14 outer_block = (30 - 16.5) / 2;
15 wall = 2;
16
17 $fn = 100;
18
19 module 3030_arm_half(){
20 // inner block
21 square(inner_block / 2);
22
23 // diagonal arms connecting inner block to outer blocks
24 rotate(45) {
25 square([diagonal - wall, wall / 2]); }
26
27 // outer block, without the wall part since wall has rounded corner
28 translate([x / 2 - outer_block, y / 2 - outer_block]) {
29 square(outer_block - wall); }
30
31 // outer arms covering the opening
32 translate([(opening_width + wall) / 2, y / 2 - wall]) {
33 square([(x - opening_width - wall) / 2 - wall, wall]); }
34 // rounded part at entrace to inside
35 translate([(opening_width + wall) / 2, (y - wall) / 2]){
36 circle(d = wall); }
37 // rounded part around outside of extrusion
38 corner_squish = 0.1;
39 translate([x / 2 - wall + corner_squish, y / 2 - wall + corner_squish]) {
40 circle(wall - corner_squish); } }
41
42 module 3030_profile(){
43 arms = 4;
44 for(arm = [0:arms - 1]) {
45 rotate(arm * 360 / arms) {
46 3030_arm_half();
47 mirror(){ 3030_arm_half(); } } } }
48
49 module 3030_sleeve_profile(){
50 difference() {
51 square(40, true);
52 minkowski() {
53 3030_profile();
54 circle(0.2);} } }
55
56 module fillet(r) {
57 offset(-r) {
58 offset(r) {
59 children(); } } }
60
61 module upper_arm_profile(){
62 square(40, true);
63
64 a = [20, -20];
65 b = [34.1, 0];
66 c = [6.25, 20];
67 points = [a, b, c];
68
69 arm_radius = 11.35;
70 arm_center = [61.8, 140.4];
71 hull() {
72 polygon(points);
73 translate(arm_center) {
74 circle(arm_radius); } } }
75
76 module forearm_profile() {
77 fillet(-5) {
78 difference() {
79 upper_arm_profile();
80 translate([-20, -20]) {
81 square(151); } } } }
82
83 module shoulder_hull() {
84 hull() {
85 translate([-20, -20, 0]) {
86 cube([40, 40, 35]); }
87 difference() {
88 upper_arm_hull();
89 translate([-30, 30, -10]) {
90 cube(300); } } } }
91
92 module upper_arm_hull() {
93 linear_extrude(height = 15) {
94 upper_arm_profile(); } }
95
96 module elbow_hull() {
97 hull(){
98 difference() {
99 upper_arm_hull();
100 translate([-50, -300 + 120, -1]) {
101 cube(300); } }
102 difference() {
103 forearm_hull();
104 translate([0, 0, 30]) {
105 cube(300); } } } }
106
107 module forearm_hull() {
108 linear_extrude(height = 120.5) {
109 forearm_profile(); } }
110
111 module hand_profile() {
112 minkowski() {
113 polygon([[0, 0],
114 [14, 0],
115 [19.5, 20],
116 [7, 20]]);
117 circle(5); } }
118
119 module hand_hull() {
120 hull() {
121 difference() {
122 forearm_hull();
123 translate([-30, -30, -300 + 106]) {
124 cube(300); } }
125 translate([53, 135, 115.6]) {
126 linear_extrude(height = 5) {
127 hand_profile(); } } } }
128
129 shoulder_hull();
130 upper_arm_hull();
131 elbow_hull();
132 forearm_hull();
133 hand_hull();
134
135 module original_forearm_profile() {
136 %projection(true) {
137 translate([-315, 0, -80]) {
138 import("Spool-holder.stl"); } } }
139
140 module original_upper_arm_profile() {
141 %projection(true) {
142 translate([-315, 0, -2]) {
143 import("Spool-holder.stl"); } } }
144
145 module original_spool_holder() {
146 %translate([-315, 0, 0]) {
147 import("Spool-holder.stl"); } }
148
149 module original_hand_profile() {
150 %projection(true) {
151 translate([-368, -135, -117]) {
152 import("Spool-holder.stl"); } } }
153
154 /*
155 This file is part of 3d-printables.
156
157 3d-printables is free software: you can redistribute it and/or modify
158 it under the terms of the GNU Affero General Public License as published by
159 the Free Software Foundation, either version 3 of the License, or
160 (at your option) any later version.
161
162 3d-printables is distributed in the hope that it will be useful,
163 but WITHOUT ANY WARRANTY; without even the implied warranty of
164 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
165 GNU Affero General Public License for more details.
166
167 You should have received a copy of the GNU Affero General Public License
168 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.
169 */