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