| 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 | minkowski() { |
| 52 | square(30, true); |
| 53 | circle(5); } |
| 54 | minkowski() { |
| 55 | 3030_profile(); |
| 56 | circle(0.2);} } } |
| 57 | |
| 58 | module fillet(r) { |
| 59 | offset(-r) { |
| 60 | offset(r) { |
| 61 | children(); } } } |
| 62 | |
| 63 | module upper_arm_profile(){ |
| 64 | |
| 65 | a = [20, -20]; |
| 66 | b = [34.1, 0]; |
| 67 | c = [6.25, 20]; |
| 68 | points = [a, b, c]; |
| 69 | |
| 70 | arm_radius = 11.35; |
| 71 | arm_center = [61.8, 140.4]; |
| 72 | hull() { |
| 73 | polygon(points); |
| 74 | translate(arm_center) { |
| 75 | circle(arm_radius); } } } |
| 76 | |
| 77 | module forearm_profile() { |
| 78 | fillet(-5) { |
| 79 | difference() { |
| 80 | upper_arm_profile(); |
| 81 | translate([-20, -20]) { |
| 82 | square(151); } } } } |
| 83 | |
| 84 | module shoulder_hull() { |
| 85 | hull() { |
| 86 | translate([-15, -15, 5]) { |
| 87 | minkowski(){ |
| 88 | cube([30, 30, 25]); |
| 89 | sphere(5); } } |
| 90 | difference() { |
| 91 | upper_arm_hull(); |
| 92 | translate([-30, 30, -10]) { |
| 93 | cube(300); } } } } |
| 94 | |
| 95 | module upper_arm_hull() { |
| 96 | linear_extrude(height = 15) { |
| 97 | upper_arm_profile(); } } |
| 98 | |
| 99 | module elbow_hull() { |
| 100 | hull(){ |
| 101 | difference() { |
| 102 | upper_arm_hull(); |
| 103 | translate([-50, -300 + 120, -1]) { |
| 104 | cube(300); } } |
| 105 | difference() { |
| 106 | forearm_hull(); |
| 107 | translate([0, 0, 30]) { |
| 108 | cube(300); } } } } |
| 109 | |
| 110 | module forearm_hull() { |
| 111 | linear_extrude(height = 120.5) { |
| 112 | forearm_profile(); } } |
| 113 | |
| 114 | module hand_profile() { |
| 115 | minkowski() { |
| 116 | polygon([[0, 0], |
| 117 | [14, 0], |
| 118 | [19.5, 20], |
| 119 | [7, 20]]); |
| 120 | circle(5); } } |
| 121 | |
| 122 | module hand_hull() { |
| 123 | hull() { |
| 124 | difference() { |
| 125 | forearm_hull(); |
| 126 | translate([-30, -30, -300 + 106]) { |
| 127 | cube(300); } } |
| 128 | translate([53, 135, 115.6]) { |
| 129 | linear_extrude(height = 5) { |
| 130 | hand_profile(); } } } } |
| 131 | |
| 132 | module 3030_spool_holder() { |
| 133 | difference() { |
| 134 | union() { |
| 135 | shoulder_hull(); |
| 136 | upper_arm_hull(); |
| 137 | elbow_hull(); |
| 138 | forearm_hull(); |
| 139 | hand_hull(); } |
| 140 | translate([0, 0, -1]) { |
| 141 | linear_extrude(height = 40) { |
| 142 | minkowski() { |
| 143 | 3030_profile(); |
| 144 | circle(0.2); } } } } } |
| 145 | |
| 146 | 3030_spool_holder(); |
| 147 | |
| 148 | module original_forearm_profile() { |
| 149 | %projection(true) { |
| 150 | translate([-315, 0, -80]) { |
| 151 | import("Spool-holder.stl"); } } } |
| 152 | |
| 153 | module original_upper_arm_profile() { |
| 154 | %projection(true) { |
| 155 | translate([-315, 0, -2]) { |
| 156 | import("Spool-holder.stl"); } } } |
| 157 | |
| 158 | module original_spool_holder() { |
| 159 | %translate([-315, 0, 0]) { |
| 160 | import("Spool-holder.stl"); } } |
| 161 | |
| 162 | module original_hand_profile() { |
| 163 | %projection(true) { |
| 164 | translate([-368, -135, -117]) { |
| 165 | import("Spool-holder.stl"); } } } |
| 166 | |
| 167 | /* |
| 168 | This file is part of 3d-printables. |
| 169 | |
| 170 | 3d-printables is free software: you can redistribute it and/or modify |
| 171 | it under the terms of the GNU Affero General Public License as published by |
| 172 | the Free Software Foundation, either version 3 of the License, or |
| 173 | (at your option) any later version. |
| 174 | |
| 175 | 3d-printables is distributed in the hope that it will be useful, |
| 176 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 177 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 178 | GNU Affero General Public License for more details. |
| 179 | |
| 180 | You should have received a copy of the GNU Affero General Public License |
| 181 | along with challenge-bot. If not, see <http://www.gnu.org/licenses/>. |
| 182 | */ |