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; |
c5a7b1c3 |
16 | |
17 | // 2 for test prints |
18 | // 20 for final prints |
19 | foot_length = 2; |
14f68eaf |
20 | wall_width = 2; |
23bbb57b |
21 | nub_depth = 4; |
0cb1eaa0 |
22 | desired_corner_rounding_radius = 2/2.1; |
23 | |
24 | // rounding radius needs to be just under half the size of the wall_width |
25 | maximum_corner_rounding_radius = wall_width / 2 - 0.1; |
26 | corner_rounding_radius = |
27 | (desired_corner_rounding_radius < maximum_corner_rounding_radius) |
28 | ? |
29 | desired_corner_rounding_radius |
30 | : |
31 | maximum_corner_rounding_radius; |
23bbb57b |
32 | |
293dbe2d |
33 | // the printed nubs did not fit into the extrusion gap perfectly. |
34 | // we can change the model just a little bit to accomodate printing |
35 | // imperfections. |
23bbb57b |
36 | fudge = 0.1; |
37 | //fudge = 0.0; |
14f68eaf |
38 | |
39 | // 3030 dimensions |
293dbe2d |
40 | x = 30; |
41 | y = 30; |
14f68eaf |
42 | opening_width = 8; |
43 | |
44 | outer_block = (30 - 16.5) / 2; |
45 | wall = 2; |
46 | |
47 | module ring(outer_radius, wall_width) { |
48 | difference() { |
49 | circle(outer_radius); |
50 | circle(outer_radius - wall_width); } } |
51 | |
52 | module fillet(r) { |
53 | offset(-r) { |
54 | offset(r) { |
55 | children(); } } } |
56 | |
57 | module round_corners(r) { |
58 | fillet(r) { fillet(-r) { children(); } } } |
59 | |
293dbe2d |
60 | module side_nub() { |
61 | // side nub, goes into side 3030 openings |
62 | a = opening_width; |
63 | b = foot_height + wall_width - (y - opening_width) / 2; |
64 | side_nub_length = (a < b) ? a : b; |
65 | translate([0, (y - opening_width) / 2 + fudge]) { |
66 | square([nub_depth, side_nub_length - fudge]); } } |
67 | |
68 | module bottom_nub() { |
69 | // bottom nub, goes into bottom 3030 opening |
70 | translate([(x - opening_width) / 2, 0]) { |
71 | square([opening_width / 2, nub_depth]); } } |
72 | |
14f68eaf |
73 | module half_foot_2d() { |
74 | // outer ring |
75 | difference() { |
76 | ring(foot_height + wall_width, wall_width); |
77 | square(foot_height + wall_width); |
78 | rotate(-45) { |
79 | square(foot_height + wall_width); } } |
80 | // upper connector, vertical 3030 holder |
81 | translate([-wall_width, -wall_width]) { |
82 | square([wall_width, foot_height + wall_width]); } |
83 | // upper connecter, horizontal 3030 holder |
84 | translate([-wall_width, -wall_width]) { |
85 | square([wall_width + x / 2, wall_width]); } |
86 | // bottom connector |
87 | translate([cos(45) * foot_height, |
88 | -(sin(45) * foot_height + wall_width)]) { |
89 | square([x / 2 - cos(45) * foot_height, wall_width]); } |
293dbe2d |
90 | bottom_nub(); |
91 | side_nub(); } |
14f68eaf |
92 | |
93 | module foot_2d() { |
0cb1eaa0 |
94 | round_corners(corner_rounding_radius) { |
14f68eaf |
95 | translate([-x / 2, 0, 0]) { |
96 | half_foot_2d(); } |
97 | translate([x / 2, 0, 0]) { |
98 | mirror() { |
99 | half_foot_2d(); } } } } |
100 | |
101 | module foot() { |
102 | rotate(a = 0, v = [1, 0, 0]) { |
103 | linear_extrude(height = foot_length) { |
104 | foot_2d(); } } } |
105 | |
106 | // half_foot_2d(); |
107 | // foot_2d(); |
108 | foot(); |
109 | |
110 | /* |
111 | This file is part of 3d-printables. |
112 | |
113 | 3d-printables is free software: you can redistribute it and/or modify |
114 | it under the terms of the GNU Affero General Public License as published by |
115 | the Free Software Foundation, either version 3 of the License, or |
116 | (at your option) any later version. |
117 | |
118 | 3d-printables is distributed in the hope that it will be useful, |
119 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
120 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
121 | GNU Affero General Public License for more details. |
122 | |
123 | You should have received a copy of the GNU Affero General Public License |
71fa8b7b |
124 | along with 3d-printables. If not, see <http://www.gnu.org/licenses/>. |
14f68eaf |
125 | */ |