add 3030 dampener feet
[ozzloy@gmail.com/3d-printables] / 3030-dampener-feet.scad
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;
14
15 // 3030 dimensions
16 x = 30; // adding a little because printers aren't perfect
17 y = 30; // adding a little because printers aren't perfect
18 opening_width = 8;
19
20 outer_block = (30 - 16.5) / 2;
21 wall = 2;
22
23 module ring(outer_radius, wall_width) {
24 difference() {
25 circle(outer_radius);
26 circle(outer_radius - wall_width); } }
27
28 module fillet(r) {
29 offset(-r) {
30 offset(r) {
31 children(); } } }
32
33 module round_corners(r) {
34 fillet(r) { fillet(-r) { children(); } } }
35
36 module half_foot_2d() {
37 // outer ring
38 difference() {
39 ring(foot_height + wall_width, wall_width);
40 square(foot_height + wall_width);
41 rotate(-45) {
42 square(foot_height + wall_width); } }
43 // upper connector, vertical 3030 holder
44 translate([-wall_width, -wall_width]) {
45 square([wall_width, foot_height + wall_width]); }
46 // upper connecter, horizontal 3030 holder
47 translate([-wall_width, -wall_width]) {
48 square([wall_width + x / 2, wall_width]); }
49 // bottom connector
50 translate([cos(45) * foot_height,
51 -(sin(45) * foot_height + wall_width)]) {
52 square([x / 2 - cos(45) * foot_height, wall_width]); }
53 // bottom nub, goes into bottom 3030 opening
54 translate([(x - opening_width) / 2 + 0.2, 0]) {
55 square([opening_width / 2 - 0.2, wall_width * 2]); }
56 // side nub, goes into side 3030 openings
57 a = opening_width;
58 b = foot_height + wall_width - (y - opening_width) / 2;
59 side_nub_length = (a < b) ? a : b;
60 fudge = 0.3;
61 translate([0, (y - opening_width) / 2 + fudge]) {
62 square([wall_width, side_nub_length - fudge]); } }
63
64 module foot_2d() {
65 round_corners(wall_width / 2.1) {
66 translate([-x / 2, 0, 0]) {
67 half_foot_2d(); }
68 translate([x / 2, 0, 0]) {
69 mirror() {
70 half_foot_2d(); } } } }
71
72 module foot() {
73 rotate(a = 0, v = [1, 0, 0]) {
74 linear_extrude(height = foot_length) {
75 foot_2d(); } } }
76
77 // half_foot_2d();
78 // foot_2d();
79 foot();
80
81 /*
82 This file is part of 3d-printables.
83
84 3d-printables is free software: you can redistribute it and/or modify
85 it under the terms of the GNU Affero General Public License as published by
86 the Free Software Foundation, either version 3 of the License, or
87 (at your option) any later version.
88
89 3d-printables is distributed in the hope that it will be useful,
90 but WITHOUT ANY WARRANTY; without even the implied warranty of
91 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
92 GNU Affero General Public License for more details.
93
94 You should have received a copy of the GNU Affero General Public License
95 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.
96 */