3d-stuff/openscad/own/ashtray_cust_extinguisher/ashtray_cust_extinguisher.scad

68 lines
1.2 KiB
OpenSCAD
Raw Normal View History

2020-10-11 02:27:48 +02:00
// by zeus - zeus@ctdo.de - CC-BY-NC-4.0
// -> https://www.thingiverse.com/zeus
// -> https://github.com/zeus86
// 2014-11-05
// remix of "Ashtray" by TrevM 29/04/2014
/* [Global] */
// What quality?
$fn = 100; // [20,40,60,80,100,120,140,160,180]
// Outside radius?
or = 65; // [20:100]
// Inside radius?
ir = 59; // [20:100]
// Height?
hi = 35; // [10:50]
// Number of slots?
num = 5; // [2:10]
// Base bevel height?
bh = 4; // [2:5]
/* [Hidden] */
ang = 360/num;
thk = or-ir+2;
fr = 3.5;
fr2 = fr * 2;
module extinguisher(){
difference(){
translate([0,0,bh]){cylinder(r1 = 12, r2 = 7, h = hi);}
translate([0,0,bh+0.6]){cylinder(r1 = 4.5, r2 = 5.25, h = hi-0.5);}
}
}
// base
cylinder( r1 = or-bh/2, r2 = or, h = bh);
translate([0,0,bh-0.1])
difference()
{
// outside
cylinder(r = or, h = hi);
// inside
translate([0,0,-0.1]) cylinder(r = ir, h = hi+0.2);
// fag slots
translate([0,0,hi-7]) for (n=[1:num])
rotate([0,0,(n-1)*ang]) slot();
}
module slot()
translate([ir-1,0,0])
{
rotate([0,90,0]) cylinder(r=3.5,h=thk);
translate([0,-fr,0]) rotate([-8,0,0]) cube([thk,fr2,10]);
translate([0,-fr,0]) rotate([8,0,0]) cube([thk,fr2,10]);
}
extinguisher();