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