update puzzle to latest version to match solution instructions
[ozzloy@gmail.com/3d-printables] / 3030-dampener-feet.scad
index 89070c22d22930b1ac2029983cd2ec26aeb83d1b..096a3083867d3b17a180ef352a0211bde449cbe3 100644 (file)
@@ -1,15 +1,22 @@
-/* GNU AGPLv3 (or later at your option)
+/*
+  GNU AGPLv3 (or later at your option)
    see bottom for more license info.
-   please do not remove this notice. */
+   please keep this notice.
+*/
 
-/* measurements from misumi's 3030 aluminum extrusion data sheet
-   https://us.misumi-ec.com/pdf/fa/2012/p2_0545.pdf */
+/*
+  measurements from misumi's 3030 aluminum extrusion data sheet
+   https://us.misumi-ec.com/pdf/fa/2012/p2_0545.pdf
+*/
 
 //$fn = 30; // use this while editing
 $fn = 100; // use this for generating STL
 
 foot_height = 18;
-foot_length = 20;
+
+// 2 for test prints
+// 20 for final prints
+foot_length = 2;
 wall_width = 2;
 nub_depth = 4;
 desired_corner_rounding_radius = 2/2.1;
@@ -23,12 +30,15 @@ corner_rounding_radius =
   :
   maximum_corner_rounding_radius;
 
+// the printed nubs did not fit into the extrusion gap perfectly.
+//  we can change the model just a little bit to accomodate printing
+//  imperfections.
 fudge = 0.1;
 //fudge = 0.0;
 
 // 3030 dimensions
-x = 30; // adding a little because printers aren't perfect
-y = 30; // adding a little because printers aren't perfect
+x = 30;
+y = 30;
 opening_width = 8;
 
 outer_block = (30 - 16.5) / 2;
@@ -47,6 +57,19 @@ module fillet(r) {
 module round_corners(r) {
   fillet(r) { fillet(-r) { children(); } } }
 
+module side_nub() {
+  // side nub, goes into side 3030 openings
+  a = opening_width;
+  b = foot_height + wall_width - (y - opening_width) / 2;
+  side_nub_length = (a < b) ? a : b;
+  translate([0, (y - opening_width) / 2 + fudge]) {
+    square([nub_depth, side_nub_length - fudge]); } }
+
+module bottom_nub() {
+  // bottom nub, goes into bottom 3030 opening
+  translate([(x - opening_width) / 2, 0]) {
+    square([opening_width / 2, nub_depth]); } }
+
 module half_foot_2d() {
   // outer ring
   difference() {
@@ -64,15 +87,8 @@ module half_foot_2d() {
   translate([cos(45) * foot_height,
              -(sin(45) * foot_height + wall_width)]) {
     square([x / 2 - cos(45) * foot_height, wall_width]); }
-  // bottom nub, goes into bottom 3030 opening
-  translate([(x - opening_width) / 2, 0]) {
-    square([opening_width / 2, nub_depth]); }
-  // side nub, goes into side 3030 openings
-  a = opening_width;
-  b = foot_height + wall_width - (y - opening_width) / 2;
-  side_nub_length = (a < b) ? a : b;
-  translate([0, (y - opening_width) / 2 + fudge]) {
-    square([nub_depth, side_nub_length - fudge]); } }
+  bottom_nub();
+  side_nub(); }
 
 module foot_2d() {
   round_corners(corner_rounding_radius) {
@@ -105,5 +121,5 @@ foot();
   GNU Affero General Public License for more details.
 
   You should have received a copy of the GNU Affero General Public License
-  along with challenge-bot.  If not, see <http://www.gnu.org/licenses/>.
+  along with 3d-printables.  If not, see <http://www.gnu.org/licenses/>.
 */