From: daniel watson Date: Fri, 8 Apr 2016 02:04:24 +0000 (-0700) Subject: use 2 measurements to calculate shape X-Git-Url: http://challenge-bot.com/repos/?p=ozzloy%40gmail.com%2F3d-printables;a=commitdiff_plain;h=1b6eae45203775e89afe4f7ac4fdc7ac9073aa05 use 2 measurements to calculate shape final shape depends only on how much higher shelf needs to be and how wide foot of shelf leg is --- diff --git a/foot-riser-data.scad b/foot-riser-data.scad index dbc60b2..a6dcd66 100644 --- a/foot-riser-data.scad +++ b/foot-riser-data.scad @@ -4,19 +4,22 @@ /* riser foot for raising bathroom shelves */ fudge = 1; -riser_height = 200; -foot_radius = 42 / 2 + fudge; +// how much higher the shelf needs to be +extra_height = 150; +// radius of foot of shelf actually measured with calipers +foot_radius_measured = 42 / 2; +foot_radius = foot_radius_measured + fudge; wall_thickness = 3; -module ring_2d(inner_radius, wall_thickness) { - outer_radius = inner_radius + wall_thickness; +module ring_2d(inner_radius, outer_radius) { difference() { circle(outer_radius); circle(inner_radius); } } -module foot_riser() { +module foot_riser(foot_radius, extra_height) { + outer_radius = foot_radius + wall_thickness; linear_extrude(height = 200) { - ring_2d(foot_radius, wall_thickness); } } + ring_2d(foot_radius, outer_radius); } } /* This file is part of 3d-printables. diff --git a/foot-riser.scad b/foot-riser.scad index d7fa523..122041d 100644 --- a/foot-riser.scad +++ b/foot-riser.scad @@ -4,7 +4,7 @@ /* riser foot for raisingbathroom shelves */ include -foot_riser(); +foot_riser(foot_radius, extra_height); /* This file is part of 3d-printables.