OpenSCAD Top 3d model
3dmdb logo
Thingiverse
OpenSCAD Top

OpenSCAD Top

by Thingiverse
Last crawled date: 5 years, 10 months ago
Always wanted to make a top and now I did.
Also thought it was worth sharing,
Especially to the OpenSCAD coders on Thingiverse.
Mirror and Hull are used to turn a simple sphere into something fun in only 10 lines of code!
Have fun spinning and post your prints.
X=75; D=15;
cylinder(d1=20,d2=5,h=X*2.666,center=true,$fn=24);
translate([0,0,100])ball(5);translate([0,0,-100])ball(20);
half(); mirror([0,1,0]) half();
module half(){ net();mirror([1,0,0])net();}
module net(){for(A=[X:-5:0]){line(A);}}
module line(A){ B=abs(A-X);
hull(){translate([-A,-A,B])ball(D);translate([A,A,B])ball(D);
translate([-A,A,-B])ball(D);translate([A,-A,-B])ball(D);}}
module ball(D){ sphere(d=D,$fn=24);}

Tags