Results 1 to 4 of 4
Threaded View
-
09-02-2020, 11:06 AM #3
well, it needs some refining. Or maybe it doesn't - depends how you look at it lol
This script will do some odd things that may produce a more interesting design.
Dodgy, it most definitely is.
But it - for a given definition of the word 'works' - works :-)
so just copy and paste everything in the quotes box below into openscad and press f5 to generate a quick render and f6 to generate something that can be exported as a printable stl file.
There are various tweaks that can be added - and if I can ever be arsed I might (dont'hold your breath) dive back in and sort the maths out.
It's weird, that for the first 45 years of my life I had absolutely no use for algebra.
But since finding openscad, I'm bloody glad that even the minimal amount that sunk in at school - did actually sink in !
It - probably - won't generate the exact same mesh as above - but it will certainly make enough interesting shapes to keep a lot of printers busy for an awful long time :-)
// Curious Aardvark Designs: 'Really Dodgy Bin/Vase generator'
// variables - change to change the shape/bin/vase generated
br=3; // 'roundness' of bin. from 3 for triangular to 100 for reallly round. Drastically effects rendering time :-)
bb=30; // bin bottom diameter
bt=50; // bin top diameter
bh=70; // height of bin
bs=2; // how thick the bin sides are.
bbt=2; // thickness of bin base and top rim
cd=4; // cutout diameter
cs=4; // cutout shape - 3=triangle, 4=square, 5=hexagon etc
nc=20; // number of cutouts per layer - needs to be an even number
sl=1; // space between layers
lro=7; // layer rotation offset
nl1=(bh-2*bbt)/(cd+sl*2); // number of layers
nl2=(bh-2*bbt)-(nl1*sl);
$fn=br;
module bin(){
difference(){
cylinder(d1=bb, d2=bt, h=bh,$fn=br);
translate([0,0,bbt]) cylinder(d1=bb-2*bs,d2=bt-2*bs,h=bh-(bbt)+1,$fn=br);
// Generating the pattern of piercings
for (z = [1:nl1]) {
for (i = [1:nc]) rotate([0,0,(360/(nc)*i)+lro*z])translate([-(bt+4)/2,0,((bbt)+(cd)*sl)*z]) rotate([0,90,0]) cylinder(d=cd,h=3*bt+4,$fn=cs);
} // end second loop
} // end diff
} // end mod
bin();
2 lines define the actual bin size and shape.
2 lines define the number, shape and positioning of the cutouts.
It's rough and will no doubt cause any actual 'programmer' to have a heart attack.
But like most of my openscad scripts - it works, and - mostly - does what I want it to. :-)Last edited by curious aardvark; 09-02-2020 at 11:29 AM.
Qidi X Plus 3 Paper thin first...
Yesterday, 01:15 AM in General 3D Printing Discussion