From 0bd5c1fd7159694b36ef69694143eef00d442961 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Fri, 24 Jun 2016 11:26:00 +0000 Subject: Volcano --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cdb04a4 --- a/dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.stl +*.gcode diff --git a/bubbles.scad b/bubbles.scad new file mode 100644 index 0000000..2f25938 --- a/dev/null +++ b/bubbles.scad @@ -0,0 +1,11 @@ + module bubbles(size,d=1.2,s=1.8) { + maxr=max(d/2,size[1]); + scl = [ d/2/maxr, size[1]/maxr, d/2/maxr ]; + nx = floor((size[0]-2*d)/s); sx = s*nx; x0=(size[0]-sx)/2; + nz = floor((size[2]-2*d)/s); sz = s*nz; z0=(size[2]-sz)/2; + for(iz=[0:nz]) let(z=z0+s*iz) { + for(ix=[0:iz%2?nx-1:nx]) let(x=x0+(iz%2?s/2:0)+s*ix) { + translate([x,0,z]) scale(scl) sphere(r=maxr,$fn=30); + } + } + } diff --git a/mold.scad b/mold.scad new file mode 100644 index 0000000..7d94337 --- a/dev/null +++ b/mold.scad @@ -0,0 +1,48 @@ +module mold( + size, /* mold inner size */ + s=1, /* shell thickness */ + h_protrude=5, /* how far to protrude outside horizontally */ + v_protrude=10, /* and vertically */ + l_intrude=0, /* how far to intrude on the left */ + r_intrude=0, /* how far to intrude on the right */ + f_intrude=0, /* how far to intrude on the front */ + introffset, /* offset from the front of the left and right intrusions */ + chamfer=1 +) { + difference() { + cube(size=[size[0]+2*s,size[1]+2*s,size[2]+s]); + translate([s,s,s]) { + hull() { + translate([chamfer,0,chamfer]) + cube(size=[size[0]-2*chamfer,size[1],size[2]-2*chamfer]); + translate([0,chamfer,chamfer]) + cube(size=[size[0],size[1]-2*chamfer,size[2]-2*chamfer]); + translate([chamfer,chamfer,0]) + cube(size=[size[0]-2*chamfer,size[1]-2*chamfer,size[2]+1]); + } + } + } + gw = 3*s; // guide width, in case I'll want to change it. + module trusion(in) { + translate([-gw/2,0,s+size[2]]) union() { + hull() { + translate([0,0,in]) + cube(size=[gw,in+s,v_protrude-in]); + cube(size=[gw,s,in]); + } + hull() { + translate([0,0,-v_protrude]) + cube(size=[gw,s,v_protrude+h_protrude]); + translate([0,-h_protrude,0]) + cube(size=[gw,s+h_protrude,v_protrude]); + } + } + } + /* frontal guide */ + translate([s+size[0]/2,0,]) trusion(in=f_intrude); + /* left guide */ + translate([0,s+introffset,0]) rotate([0,0,-90]) trusion(in=l_intrude); + /* right guide */ + translate([size[0]+2*s,s+introffset,0]) rotate([0,0,90]) trusion(in=r_intrude); +} +/* vim:set ai sw=1: */ diff --git a/stuff.scad b/stuff.scad new file mode 100644 index 0000000..26fb39f --- a/dev/null +++ b/stuff.scad @@ -0,0 +1,6 @@ +layer_height=0.2; extrusion_width=0.5; +epsilon = .01; + +protrude=10; // distance to protrude vertically +ss=1; // minimum silicone shell thickness +ms=1; // mold shell thickness diff --git a/view.scad b/view.scad new file mode 100644 index 0000000..501a17f --- a/dev/null +++ b/view.scad @@ -0,0 +1,33 @@ +use ; + +/** + * view(...) { + * outer_mold(); // children(0); + * inner_shape(); // children(1); + * silicone(); // children(2); + * } + */ +module view(view,volume) { + module cou() { color("palegreen",0.7) children(); } + module cin() { color("silver",0.8) children(); } + module csi() { color("salmon",0.5) children(); } + module cmx() { color("gray",0.7) children(); } + if(view=="outer") cou() children(0); + else if(view=="inner") cin() children(1); + else if(view=="mixplate") cmx() { + mixing(volume=volume,what="vessel"); + translate([0,mixing_size(volume=volume)[1]/2+5,0]) + rotate([0,0,90]) mixing(volume=volume,what="splitter"); + }else if(view=="outcome") csi() { + difference() { + children(2); + children([0:1]); + } + }else{ + cou() children(0); cin() children(1); + csi() children(2); + translate([-mixing_size(volume=volume)[1],0]) rotate([0,0,90]) + cmx() mixing(volume=volume,what="altogethernow"); + } +} +/* vim:set ai sw=1: */ diff --git a/volcano.scad b/volcano.scad new file mode 100644 index 0000000..7f7ffce --- a/dev/null +++ b/volcano.scad @@ -0,0 +1,108 @@ +include ; + +volcano_l = 20; // length (along Y axis) +volcano_w = 11.5; // width (along X axis) +volcano_h = 20; // height (guess!) +volcano_n_offset_w = 4.5; // nozzle offset from the left edge along width axis +volcano_n_offset_l = volcano_l-15.5; // nozzle offset from the front along length axis +volcano_c_offset_w = 4; // cartridge offset from the left edge along width axis +volcano_c_offset_l = volcano_l-8; // cartridge offset from the front along the length axis +volcano_c_d = 6.1; // cartridge diameter +volcano_n_d = 7/cos(30); // nozzle (outermost) diameter +volcano_c_t = 2; // cartridge thickness (of the protruding part) +volcano_hs_h = [volcano_h-14.5,volcano_h-5.5]; // the heater screws offsets from the bottom of the heater +volcano_hs_d = 5.7; // and their diameter +volcano_hs_t = 1.5; // and thickness +volcano_hs_offset_l = volcano_l-2.5; // heater screw offset from the front along the length axis +volcano_ts_d = 7; // Thermistor screw diameter +volcano_ts_t = 2.6; // Thermistor screw thickness +volcano_ts_h = volcano_h-12; // Thermistor screw offset from the bottom of the heater +volcano_ts_offset_l = volcano_l-11.5; // Thermistor screw offset from the front along the length axis +volcano_cutoff_t = 1.5; // Cutoff on the top thickness (depth) +volcano_cutoff_l = 8; // Length of the cutoff (the cutoff is on the back) + +sv=volcano_c_t+ss; // shell vertical +sh=ss; // shell horizontal + +the_w = volcano_w+volcano_ts_t+volcano_hs_t+2*sh; +the_l = volcano_l+2*sh; +the_h = volcano_h+sv; + +use ; +module heatershape() { + difference() { + union() { // main body and protrusion + cube(size=[volcano_w,volcano_l,volcano_h]); + translate([0,0,volcano_h]) { + pt = [volcano_w,volcano_l-volcano_cutoff_l,protrude]; + translate([0,0,-1]) + cube(size=[pt[0],pt[1],pt[2]+1]); + hull() { + cube(size=pt); + translate([-volcano_hs_t-sh,0,max(volcano_ts_t,volcano_hs_t)+sh]) + cube(size=[the_w,pt[1],pt[2]-max(volcano_ts_t,volcano_hs_t)-sh]); + translate([0,-sh,sh]) + cube(size=[pt[0],pt[1]+2*sh,pt[2]-sh]); + } + } + } + // cutoff on top + translate([-1,volcano_l-volcano_cutoff_l+volcano_cutoff_t,volcano_h-volcano_cutoff_t]) { + cube(size=[volcano_w+2,volcano_cutoff_l-volcano_cutoff_t+1,volcano_cutoff_t+1]); + translate([0,0,volcano_cutoff_t]) + rotate([0,90,0]) + cylinder(r=volcano_cutoff_t,h=volcano_w+2,$fn=24); + } + // screwhole on top of protrusion + translate([volcano_w/2,(volcano_l-volcano_cutoff_l)/2,volcano_h+protrude+2]) + mirror([0,0,1]) + cylinder(d=3,h=protrude+1); + } + // nozzle + translate([volcano_n_offset_w,volcano_n_offset_l,-sv]) + cylinder(d=volcano_n_d,h=sv+1,$fn=24); + // cartridge + translate([volcano_c_offset_w,volcano_c_offset_l,-volcano_c_t]) + cylinder(d=volcano_c_d,h=volcano_c_t+1,$fn=24); + // heatblock screws + for(h=volcano_hs_h) + translate([1,volcano_hs_offset_l,h]) + rotate([0,-90,0]) + cylinder(d=volcano_hs_d,h=volcano_hs_t+1,$fn=24); + // thermistor screw + translate([volcano_w-1,volcano_ts_offset_l,volcano_ts_h]) + rotate([0,90,0]) + cylinder(d=volcano_ts_d,h=volcano_ts_t+1,$fn=24); + bubbles(size=[volcano_w,sh/2,volcano_h]); + translate([0,volcano_l,0]) bubbles(size=[volcano_w,sh/2,volcano_h-volcano_cutoff_t]); + for(x=[0,volcano_w]) translate([x,0,0]) + rotate([0,0,90]) bubbles(size=[volcano_l,(volcano_hs_t+sh)/2,volcano_h-volcano_cutoff_t]); + rotate([-90,0,0]) + bubbles(size=[volcano_w,sv/2,volcano_l]); +} +module silicone() { + translate([-sh-volcano_hs_t,-sh,-sv]) + cube(size=[the_w,the_l,the_h-epsilon]); +} + +use ; + +vol_ = the_w*the_l*the_h + - volcano_w*volcano_l*volcano_h // heater block + + volcano_w*volcano_cutoff_t*volcano_cutoff_l // cutoff + - PI*pow(volcano_n_d/2,2)*sv // nozzle + - PI*pow(volcano_c_d/2,2)*volcano_c_t // cartridge + - PI*pow(volcano_ts_d/2,2)*volcano_ts_t // thermistor screw + - PI*pow(volcano_hs_d/2,2)*volcano_hs_t *2 // heater screws +; +vol = vol_*1.2; +echo("volume",vol); + +use ; + +view(view="*",volume=vol) { + mold(size=[the_w,the_l,the_h],s=ms,v_protrude=protrude,introffset=(volcano_l-volcano_cutoff_l)*3/4); + translate([ms+volcano_hs_t+sh,ms+sh,ms+sv]) heatershape(); + translate([ms+epsilon,ms+epsilon,ms+epsilon]) cube(size=[the_w-2*epsilon,the_l-2*epsilon,the_h]); +} +/* vim:set ai sw=1: */ -- cgit v0.9.0.2