update puzzle to latest version to match solution instructions
[ozzloy@gmail.com/3d-printables] / foot-riser-data.scad
CommitLineData
c9cf8f80 1/* GNU AGPLv3 (or later at your option)
2 see bottom for more license info */
3
4/* riser foot for raising bathroom shelves */
5
7394bdc1 6$fn = 200;
7c09b68e 7
c9cf8f80 8fudge = 1;
1b6eae45 9// how much higher the shelf needs to be
10extra_height = 150;
11// radius of foot of shelf actually measured with calipers
12foot_radius_measured = 42 / 2;
13foot_radius = foot_radius_measured + fudge;
c9cf8f80 14wall_thickness = 3;
15
1b6eae45 16module ring_2d(inner_radius, outer_radius) {
c9cf8f80 17 difference() {
18 circle(outer_radius);
19 circle(inner_radius); } }
20
1b6eae45 21module foot_riser(foot_radius, extra_height) {
e4b8e32c 22 foot_surround_height = 25;
2e41f3e2 23 outer_radius = foot_radius + wall_thickness;
7394bdc1 24 flange_radius = outer_radius + foot_radius * 2;
25 flange_height = foot_radius / 2;
d6bd659e 26 // raise the foot
27 linear_extrude(height = extra_height) {
28 circle(foot_radius); }
29 // surround the foot so it stays on riser
30 linear_extrude(height = extra_height + foot_surround_height) {
7394bdc1 31 ring_2d(foot_radius, outer_radius); }
32 // put a flange at the bottom of the foot for stability
33 linear_extrude(height = flange_height) {
34 ring_2d(outer_radius, flange_radius); } }
c9cf8f80 35
a8ce0780 36module foot_riser_against_wall(foot_radius, extra_height) {
37 foot_surround_height = 25;
38 outer_radius = foot_radius + wall_thickness;
39 flange_radius = outer_radius + foot_radius * 2;
40 flange_height = foot_radius / 2;
41 // raise the foot
42 linear_extrude(height = extra_height) {
43 circle(foot_radius); }
44 // surround the foot so it stays on riser
45 linear_extrude(height = extra_height + foot_surround_height) {
46 ring_2d(foot_radius, outer_radius); }
47 // put a flange at the bottom of the foot for stability
48 linear_extrude(height = flange_height) {
49 difference() {
50 ring_2d(outer_radius, flange_radius);
51 translate([outer_radius + flange_radius + 1, 0]) {
52 square(flange_radius * 2, center=true); } } } }
53
c9cf8f80 54/*
55 This file is part of 3d-printables.
56
57 3d-printables is free software: you can redistribute it and/or modify
58 it under the terms of the GNU Affero General Public License as published by
59 the Free Software Foundation, either version 3 of the License, or
60 (at your option) any later version.
61
62 3d-printables is distributed in the hope that it will be useful,
63 but WITHOUT ANY WARRANTY; without even the implied warranty of
64 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
65 GNU Affero General Public License for more details.
66
67 You should have received a copy of the GNU Affero General Public License
68 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.
69*/