Today we will be taking a look at the “Magic Nut Thing” as a vision that came to me in a waking dream, well in reality I was driving or something but the “waking dream” I figured would get more views. However as they say necessity is the mother of invention and success has many fathers until they all go to the Maury Povich Show with DNA in hand. However this is one of those things that I did a “self” why didn’t we think of this before! As the neat thing is, it is ambidextrous so nut or bolt doesn’t matter as one model fits all. On top of the fact if you want to glue them in you can but don’t have to and the second (containing the nut) hides the bolt from the first adding not only a nice cosmetic feature but all a safety one too!
Build note: The Open-SCAD code requires version 2017.01.20 to run
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
/* * Open SCAD Name.: Magic_Nut_Thing_v2.scad * Copyright (c)..: 2017 www.DIY3DTech.com * * Creation Date..: 08/10/2017 * Description....: Create of the Magic Nut * * Rev 1: Develop Model * Rev 2: * * Built On: Open SCAD version 2017.01.20 * * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU General Public License for more details. * * Note: the programming concepts within are shared openly in the hopes of educating * and training and can be used commercially. However the completed object itself * created as result of this code remains the sole intellectual property of Campbell * and Company Publishing LLC. If you have an interested in producing or using the * end product in a commercial application, please contact us at info@diy3dtech.com * for licensing possibilities. * */ /*------------------Customizer View-------------------*/ // preview[view:north, tilt:top] /*---------------------Parameters---------------------*/ //height of Thing in mm grip_height = 30; //diameter of the Thing in mm grip_dia = 20; //diameter of bolt opening (keep tight) bolt_dia = 6.3; //diameter of nut/bolt head (long side) bolt_head_dia = 13; //height of collar in mm collar_height = 3; //base offset (bottom thickness) in mm base_offset = 2; /*-----------------------Execute----------------------*/ main_module(); /*-----------------------Modules----------------------*/ module main_module(){ //transfer values b_hg=grip_height; b_dia=grip_dia; difference() { union() { //create knurled cylinder as base k_cyl(b_hg,b_dia); translate ([0,0,0]) rotate ([0,0,0]) cylinder(collar_height,grip_dia /2,grip_dia /2,$fn=60,true); } //create opening for bolt shaft translate ([0,0,b_hg/2]) rotate ([0,0,0]) cylinder(b_hg*2,bolt_dia/2,bolt_dia/2,$fn=60,true); //create opening for hex head with offset translate ([0,0,(b_hg/2)+base_offset]) rotate ([0,0,0]) cylinder(b_hg,bolt_head_dia/2,bolt_head_dia/2,$fn=6,true); } }//end module module k_cyl(bnhg,bndia) { // create base module for knob body k_cyl_hg=bnhg; // Knurled cylinder height k_cyl_od=bndia; // Knurled cylinder outer* diameter knurl_wd=3; // Knurl polyhedron width knurl_hg=4; // Knurl polyhedron height knurl_dp=1; // Knurl polyhedron depth e_smooth=collar_height; // Cylinder ends smoothed height s_smooth=0; // [ 0% - 100% ] Knurled surface smoothing amount knurled_cyl(k_cyl_hg, k_cyl_od, knurl_wd, knurl_hg, knurl_dp, e_smooth, s_smooth); }//end module module knurled_cyl(chg, cod, cwd, csh, cdp, fsh, smt) { cord=(cod+cdp+cdp*smt/100)/2; cird=cord-cdp; cfn=round(2*cird*PI/cwd); clf=360/cfn; crn=ceil(chg/csh); intersection() { shape(fsh, cird, cord-cdp*smt/100, cfn*4, chg); translate([0,0,-(crn*csh-chg)/2]) knurled_finish(cord, cird, clf, csh, cfn, crn); } }//end module module shape(hsh, ird, ord, fn4, hg) { union() { cylinder(h=hsh, r1=ird, r2=ord, $fn=fn4, center=false); translate([0,0,hsh-0.002]) cylinder(h=hg-2*hsh+0.004, r=ord, $fn=fn4, center=false); translate([0,0,hg-hsh]) cylinder(h=hsh, r1=ord, r2=ird, $fn=fn4, center=false); } }//end module module knurled_finish(ord, ird, lf, sh, fn, rn) { for(j=[0:rn-1]) let(h0=sh*j, h1=sh*(j+1/2), h2=sh*(j+1)) { for(i=[0:fn-1]) let(lf0=lf*i, lf1=lf*(i+1/2), lf2=lf*(i+1)) { polyhedron( points=[ [ 0,0,h0], [ ord*cos(lf0), ord*sin(lf0), h0], [ ird*cos(lf1), ird*sin(lf1), h0], [ ord*cos(lf2), ord*sin(lf2), h0], [ ird*cos(lf0), ird*sin(lf0), h1], [ ord*cos(lf1), ord*sin(lf1), h1], [ ird*cos(lf2), ird*sin(lf2), h1], [ 0,0,h2], [ ord*cos(lf0), ord*sin(lf0), h2], [ ird*cos(lf1), ird*sin(lf1), h2], [ ord*cos(lf2), ord*sin(lf2), h2] ], faces=[ [0,1,2],[2,3,0], [1,0,4],[4,0,7],[7,8,4], [8,7,9],[10,9,7], [10,7,6],[6,7,0],[3,6,0], [2,1,4],[3,2,6],[10,6,9],[8,9,4], [4,5,2],[2,5,6],[6,5,9],[9,5,4] ], convexity=5); } } }//end module /*----------------------End Code----------------------*/ |
More Ideas!
OpenSCAD – Designing a Compression Cover!
OpenSCAD – Designing a Pressure Fit Endcap!
Open SCAD – Complex Flange Designer!