XMas stuff: OpenSCAD Vase/Bowl Generator

in #printing3d6 years ago (edited)

Hi guys !

It is nearly Christmas, you can have fun 3d printing your own math art vases.
I found recently this nice little OpenSCAD script to generate vase/bowl. It is pretty fun to play with it and 3d print this kind of math art.

OpenSCAD is a CAD software with its own programming language, you describe your geometry using this language. It is pretty handy to describe complex geometries or complex designs. There is an important and active community around it.

I am using the script from bda found here: https://www.thingiverse.com/thing:2150607
Follows this short magic script ^^

accuracy =1; // detalization in mm (0.25,0.4,0.5,1.0,2,3,4,5,6,10,20)
vase = 1; // 1 for vase, 0 for candybowl

qty = 10; // quantity of protrusion
tw = 60; // angle of twist
pvv = 0.82; // part of sinusoid vertical 0.3-1.0
pt = 1.5; // part of sinusoid for twist or 0 for linear
kv = 0.6; // koeff vertical < 1.0
kp = 0.06; // koeff protrusion < 0.5

pv = ((vase==1)?1:0) + pvv; // part of sinusoid vertical 0.5-1.0 for bowl, 1.5-1.9 for vase
h = (vase==1)?180:60; // height of vase
d = 100; // base diameter

function fz(z) = d/2+sin(pv180z/h)kvd/2; // radius by height
function fy(angle) = sin(angleqty)kpd/2; // radius by angle
function fx(z) = ((pt==0)?1:sin(pt
180z/h))tw*z/h; // twist: angle by height

function f(z,angle)= fz(z)+fy(angle+fx(z));

e = h/floor(h/accuracy);
dz = e; // height of layer
n = 360/e; // quantity of segments
a = 360/n; // step: angle of segment

module shape()
{
p = [for( z=[0:dz:h], angle=[0:a:360-a]) [ sin(angle)f(z,angle), cos(angle)f(z,angle), z ]];

m = nh/dz;
echo("accuracy",e, "faces",2
m+2);
f1 = [for( q=[0:n:m-n], i=[0:n-1], j=[0:1])
(j==0)? ( (i==n-1)? [q+n-1, q, q+n ] : [q+i, q+i+1, q+i+n+1] ):
( (i==n-1)? [q+n-1, q+n, q+2*n-1] : [q+i, q+i+n+1, q+i+n ] )];

f = concat([[for(i=[0:n-1]) i]],[[for(i=[m:m+n-1]) i]], f1); // add bottom and roof

polyhedron(points=p, faces=f);
}

translate([0,0,-h/2])
shape();

The script is well documented, you need to play with the parameters to find something you like.
If you want to have easy to print overhangs do not put to much twist and too large coefficient for the protrusion (except if you want to have fun )
For the parameter accuracy for saving the STL for 3D printing, I switch it to 0.25 to obtain a huge STL with nice curves. It takes a few minutes to render in this case.

Follows one bowl and two vases I printed (1.6mm bottom layers, 0.8mm extrusion width, vase mode, transparent PLA printed with high temperature and no cooling)

This bowl is pretty cool to print, it is my favorite. It is a kind of controlled print failure: many overhangs cannot be printed, it creates nice effects with the filament printed at high temperature that drops.
Thingiverse link: https://www.thingiverse.com/thing:3299744
IMG_20181220_095058.jpg
IMG_20181220_095107.jpg
IMG_20181220_095037.jpg
IMG_20181220_095019.jpg

Next follows a more regular vase with soft overhangs, I kept the body very flat with few large protrusions. Follows the link on Thingiverse with the full script: https://www.thingiverse.com/thing:3294246

IMG_20181220_095127.jpg
IMG_20181220_095138.jpg
IMG_20181220_094935.jpg
IMG_20181220_094903.jpg

Finally, another vase variant but with 13 sides, larger also, with sharper protrusions.
Follows the link on Thingiverse: https://www.thingiverse.com/thing:3299724

IMG_20181220_095204.jpg
IMG_20181220_095155.jpg
IMG_20181220_094954.jpg
IMG_20181220_095003.jpg

Happy printing !