You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.1 KiB
OpenSCAD
57 lines
2.1 KiB
OpenSCAD
/*
|
|
Hex (or other polygon) form for making nuts and such
|
|
By the DoomMeister
|
|
|
|
//Released under the terms of the GNU GPL v3.0
|
|
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 3 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.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
|
WARNING - No warrenty is given regarding the fitness of these parts to convey pressurised
|
|
media if they are fabricated by any means. The user takes all risk in terms of saftey, testing, and material choice.
|
|
**
|
|
This file will generate a range a hexeagon or ocogon or n... sided forn for use as a nut or re-enforcement
|
|
*/
|
|
|
|
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
//Test - Comment Out for Module Usage
|
|
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
//hex_form();
|
|
|
|
|
|
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
//Module
|
|
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
module hex_form(height=12,hex_id=21.70,wall_thickness=3.2,sides=8,inclination=1.1,qual=100){
|
|
|
|
hh = height/3;
|
|
t = wall_thickness; //thickness
|
|
ir = hex_id/2; //internal rad
|
|
rr = ir + (1.5*t); //reenforced radius
|
|
inc = inclination;
|
|
|
|
|
|
difference(){
|
|
translate([0,0,0])
|
|
rotate_extrude(convexity=4,$fn=qual)
|
|
//rotate([90,0,0])
|
|
polygon( points=[[rr,0],[ir,0],[ir,hh*3],[rr,hh*3],[inc*rr,hh*2],[inc*rr,hh]]);
|
|
translate([0,0,0])
|
|
difference(){
|
|
cylinder(r=1.5*rr+t,h=3*hh,$fn=qual);
|
|
|
|
cylinder(r=1.1*rr+(0.0*t),h=3*hh,$fn=sides);
|
|
|
|
}
|
|
}
|
|
} |