ea7617aa |
1 | /* |
2 | GNU AGPLv3 (or later at your option) |
14f68eaf |
3 | see bottom for more license info. |
ea7617aa |
4 | please keep this notice. |
5 | */ |
14f68eaf |
6 | |
ea7617aa |
7 | /* |
8 | measurements from misumi's 3030 aluminum extrusion data sheet |
9 | https://us.misumi-ec.com/pdf/fa/2012/p2_0545.pdf |
10 | */ |
14f68eaf |
11 | |
12 | //$fn = 30; // use this while editing |
13 | $fn = 100; // use this for generating STL |
14 | |
15 | foot_height = 18; |
16 | foot_length = 20; |
17 | wall_width = 2; |
23bbb57b |
18 | nub_depth = 4; |
0cb1eaa0 |
19 | desired_corner_rounding_radius = 2/2.1; |
20 | |
21 | // rounding radius needs to be just under half the size of the wall_width |
22 | maximum_corner_rounding_radius = wall_width / 2 - 0.1; |
23 | corner_rounding_radius = |
24 | (desired_corner_rounding_radius < maximum_corner_rounding_radius) |
25 | ? |
26 | desired_corner_rounding_radius |
27 | : |
28 | maximum_corner_rounding_radius; |
23bbb57b |
29 | |
30 | fudge = 0.1; |
31 | //fudge = 0.0; |
14f68eaf |
32 | |
33 | // 3030 dimensions |
34 | x = 30; // adding a little because printers aren't perfect |
35 | y = 30; // adding a little because printers aren't perfect |
36 | opening_width = 8; |
37 | |
38 | outer_block = (30 - 16.5) / 2; |
39 | wall = 2; |
40 | |
41 | module ring(outer_radius, wall_width) { |
42 | difference() { |
43 | circle(outer_radius); |
44 | circle(outer_radius - wall_width); } } |
45 | |
46 | module fillet(r) { |
47 | offset(-r) { |
48 | offset(r) { |
49 | children(); } } } |
50 | |
51 | module round_corners(r) { |
52 | fillet(r) { fillet(-r) { children(); } } } |
53 | |
54 | module half_foot_2d() { |
55 | // outer ring |
56 | difference() { |
57 | ring(foot_height + wall_width, wall_width); |
58 | square(foot_height + wall_width); |
59 | rotate(-45) { |
60 | square(foot_height + wall_width); } } |
61 | // upper connector, vertical 3030 holder |
62 | translate([-wall_width, -wall_width]) { |
63 | square([wall_width, foot_height + wall_width]); } |
64 | // upper connecter, horizontal 3030 holder |
65 | translate([-wall_width, -wall_width]) { |
66 | square([wall_width + x / 2, wall_width]); } |
67 | // bottom connector |
68 | translate([cos(45) * foot_height, |
69 | -(sin(45) * foot_height + wall_width)]) { |
70 | square([x / 2 - cos(45) * foot_height, wall_width]); } |
71 | // bottom nub, goes into bottom 3030 opening |
23bbb57b |
72 | translate([(x - opening_width) / 2, 0]) { |
73 | square([opening_width / 2, nub_depth]); } |
14f68eaf |
74 | // side nub, goes into side 3030 openings |
75 | a = opening_width; |
76 | b = foot_height + wall_width - (y - opening_width) / 2; |
77 | side_nub_length = (a < b) ? a : b; |
14f68eaf |
78 | translate([0, (y - opening_width) / 2 + fudge]) { |
23bbb57b |
79 | square([nub_depth, side_nub_length - fudge]); } } |
14f68eaf |
80 | |
81 | module foot_2d() { |
0cb1eaa0 |
82 | round_corners(corner_rounding_radius) { |
14f68eaf |
83 | translate([-x / 2, 0, 0]) { |
84 | half_foot_2d(); } |
85 | translate([x / 2, 0, 0]) { |
86 | mirror() { |
87 | half_foot_2d(); } } } } |
88 | |
89 | module foot() { |
90 | rotate(a = 0, v = [1, 0, 0]) { |
91 | linear_extrude(height = foot_length) { |
92 | foot_2d(); } } } |
93 | |
94 | // half_foot_2d(); |
95 | // foot_2d(); |
96 | foot(); |
97 | |
98 | /* |
99 | This file is part of 3d-printables. |
100 | |
101 | 3d-printables is free software: you can redistribute it and/or modify |
102 | it under the terms of the GNU Affero General Public License as published by |
103 | the Free Software Foundation, either version 3 of the License, or |
104 | (at your option) any later version. |
105 | |
106 | 3d-printables is distributed in the hope that it will be useful, |
107 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
108 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
109 | GNU Affero General Public License for more details. |
110 | |
111 | You should have received a copy of the GNU Affero General Public License |
112 | along with challenge-bot. If not, see <http://www.gnu.org/licenses/>. |
113 | */ |