summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2016-06-24 11:26:00 (UTC)
committer Michael Krelin <hacker@klever.net>2016-06-25 19:52:17 (UTC)
commit0bd5c1fd7159694b36ef69694143eef00d442961 (patch) (unidiff)
tree5acf562652b0949b89d3f8da01f941484666face
parentb058fc56422523d643e0e30250102fdbae8ea69b (diff)
downloadhotendery-0bd5c1fd7159694b36ef69694143eef00d442961.zip
hotendery-0bd5c1fd7159694b36ef69694143eef00d442961.tar.gz
hotendery-0bd5c1fd7159694b36ef69694143eef00d442961.tar.bz2
Volcano
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--.gitignore2
-rw-r--r--bubbles.scad11
-rw-r--r--mold.scad48
-rw-r--r--stuff.scad6
-rw-r--r--view.scad33
-rw-r--r--volcano.scad108
6 files changed, 208 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cdb04a4
--- a/dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
1*.stl
2*.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 @@
1 module bubbles(size,d=1.2,s=1.8) {
2 maxr=max(d/2,size[1]);
3 scl = [ d/2/maxr, size[1]/maxr, d/2/maxr ];
4 nx = floor((size[0]-2*d)/s); sx = s*nx; x0=(size[0]-sx)/2;
5 nz = floor((size[2]-2*d)/s); sz = s*nz; z0=(size[2]-sz)/2;
6 for(iz=[0:nz]) let(z=z0+s*iz) {
7 for(ix=[0:iz%2?nx-1:nx]) let(x=x0+(iz%2?s/2:0)+s*ix) {
8 translate([x,0,z]) scale(scl) sphere(r=maxr,$fn=30);
9 }
10 }
11 }
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 @@
1module mold(
2 size, /* mold inner size */
3 s=1, /* shell thickness */
4 h_protrude=5,/* how far to protrude outside horizontally */
5 v_protrude=10,/* and vertically */
6 l_intrude=0,/* how far to intrude on the left */
7 r_intrude=0,/* how far to intrude on the right */
8 f_intrude=0,/* how far to intrude on the front */
9 introffset,/* offset from the front of the left and right intrusions */
10 chamfer=1
11) {
12 difference() {
13 cube(size=[size[0]+2*s,size[1]+2*s,size[2]+s]);
14 translate([s,s,s]) {
15 hull() {
16 translate([chamfer,0,chamfer])
17 cube(size=[size[0]-2*chamfer,size[1],size[2]-2*chamfer]);
18 translate([0,chamfer,chamfer])
19 cube(size=[size[0],size[1]-2*chamfer,size[2]-2*chamfer]);
20 translate([chamfer,chamfer,0])
21 cube(size=[size[0]-2*chamfer,size[1]-2*chamfer,size[2]+1]);
22 }
23 }
24 }
25 gw = 3*s; // guide width, in case I'll want to change it.
26 module trusion(in) {
27 translate([-gw/2,0,s+size[2]]) union() {
28 hull() {
29 translate([0,0,in])
30 cube(size=[gw,in+s,v_protrude-in]);
31 cube(size=[gw,s,in]);
32 }
33 hull() {
34 translate([0,0,-v_protrude])
35 cube(size=[gw,s,v_protrude+h_protrude]);
36 translate([0,-h_protrude,0])
37 cube(size=[gw,s+h_protrude,v_protrude]);
38 }
39 }
40 }
41 /* frontal guide */
42 translate([s+size[0]/2,0,]) trusion(in=f_intrude);
43 /* left guide */
44 translate([0,s+introffset,0]) rotate([0,0,-90]) trusion(in=l_intrude);
45 /* right guide */
46 translate([size[0]+2*s,s+introffset,0]) rotate([0,0,90]) trusion(in=r_intrude);
47}
48/* 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 @@
1layer_height=0.2; extrusion_width=0.5;
2epsilon = .01;
3
4 protrude=10; // distance to protrude vertically
5 ss=1; // minimum silicone shell thickness
6 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 @@
1use <mixing.scad>;
2
3/**
4 * view(...) {
5 * outer_mold();// children(0);
6 * inner_shape();// children(1);
7 * silicone(); // children(2);
8 * }
9 */
10module view(view,volume) {
11 module cou() { color("palegreen",0.7) children(); }
12 module cin() { color("silver",0.8) children(); }
13 module csi() { color("salmon",0.5) children(); }
14 module cmx() { color("gray",0.7) children(); }
15 if(view=="outer") cou() children(0);
16 else if(view=="inner") cin() children(1);
17 else if(view=="mixplate") cmx() {
18 mixing(volume=volume,what="vessel");
19 translate([0,mixing_size(volume=volume)[1]/2+5,0])
20 rotate([0,0,90]) mixing(volume=volume,what="splitter");
21 }else if(view=="outcome") csi() {
22 difference() {
23 children(2);
24 children([0:1]);
25 }
26 }else{
27 cou() children(0); cin() children(1);
28 csi() children(2);
29 translate([-mixing_size(volume=volume)[1],0]) rotate([0,0,90])
30 cmx() mixing(volume=volume,what="altogethernow");
31 }
32}
33/* 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 @@
1include <stuff.scad>;
2
3 volcano_l = 20; // length (along Y axis)
4 volcano_w = 11.5; // width (along X axis)
5 volcano_h = 20; // height (guess!)
6 volcano_n_offset_w = 4.5; // nozzle offset from the left edge along width axis
7 volcano_n_offset_l = volcano_l-15.5;// nozzle offset from the front along length axis
8 volcano_c_offset_w = 4; // cartridge offset from the left edge along width axis
9 volcano_c_offset_l = volcano_l-8;// cartridge offset from the front along the length axis
10 volcano_c_d = 6.1; // cartridge diameter
11 volcano_n_d = 7/cos(30); // nozzle (outermost) diameter
12 volcano_c_t = 2; // cartridge thickness (of the protruding part)
13 volcano_hs_h = [volcano_h-14.5,volcano_h-5.5];// the heater screws offsets from the bottom of the heater
14 volcano_hs_d = 5.7; // and their diameter
15 volcano_hs_t = 1.5; // and thickness
16 volcano_hs_offset_l = volcano_l-2.5;// heater screw offset from the front along the length axis
17 volcano_ts_d = 7; // Thermistor screw diameter
18 volcano_ts_t = 2.6; // Thermistor screw thickness
19 volcano_ts_h = volcano_h-12; // Thermistor screw offset from the bottom of the heater
20 volcano_ts_offset_l = volcano_l-11.5;// Thermistor screw offset from the front along the length axis
21 volcano_cutoff_t = 1.5; // Cutoff on the top thickness (depth)
22 volcano_cutoff_l = 8; // Length of the cutoff (the cutoff is on the back)
23
24sv=volcano_c_t+ss; // shell vertical
25 sh=ss; // shell horizontal
26
27the_w = volcano_w+volcano_ts_t+volcano_hs_t+2*sh;
28the_l = volcano_l+2*sh;
29the_h = volcano_h+sv;
30
31use <bubbles.scad>;
32module heatershape() {
33 difference() {
34 union() { // main body and protrusion
35 cube(size=[volcano_w,volcano_l,volcano_h]);
36 translate([0,0,volcano_h]) {
37 pt = [volcano_w,volcano_l-volcano_cutoff_l,protrude];
38 translate([0,0,-1])
39 cube(size=[pt[0],pt[1],pt[2]+1]);
40 hull() {
41 cube(size=pt);
42 translate([-volcano_hs_t-sh,0,max(volcano_ts_t,volcano_hs_t)+sh])
43 cube(size=[the_w,pt[1],pt[2]-max(volcano_ts_t,volcano_hs_t)-sh]);
44 translate([0,-sh,sh])
45 cube(size=[pt[0],pt[1]+2*sh,pt[2]-sh]);
46 }
47 }
48 }
49 // cutoff on top
50 translate([-1,volcano_l-volcano_cutoff_l+volcano_cutoff_t,volcano_h-volcano_cutoff_t]) {
51 cube(size=[volcano_w+2,volcano_cutoff_l-volcano_cutoff_t+1,volcano_cutoff_t+1]);
52 translate([0,0,volcano_cutoff_t])
53 rotate([0,90,0])
54 cylinder(r=volcano_cutoff_t,h=volcano_w+2,$fn=24);
55 }
56 // screwhole on top of protrusion
57 translate([volcano_w/2,(volcano_l-volcano_cutoff_l)/2,volcano_h+protrude+2])
58 mirror([0,0,1])
59 cylinder(d=3,h=protrude+1);
60 }
61 // nozzle
62 translate([volcano_n_offset_w,volcano_n_offset_l,-sv])
63 cylinder(d=volcano_n_d,h=sv+1,$fn=24);
64 // cartridge
65 translate([volcano_c_offset_w,volcano_c_offset_l,-volcano_c_t])
66 cylinder(d=volcano_c_d,h=volcano_c_t+1,$fn=24);
67 // heatblock screws
68 for(h=volcano_hs_h)
69 translate([1,volcano_hs_offset_l,h])
70 rotate([0,-90,0])
71 cylinder(d=volcano_hs_d,h=volcano_hs_t+1,$fn=24);
72 // thermistor screw
73 translate([volcano_w-1,volcano_ts_offset_l,volcano_ts_h])
74 rotate([0,90,0])
75 cylinder(d=volcano_ts_d,h=volcano_ts_t+1,$fn=24);
76 bubbles(size=[volcano_w,sh/2,volcano_h]);
77 translate([0,volcano_l,0]) bubbles(size=[volcano_w,sh/2,volcano_h-volcano_cutoff_t]);
78 for(x=[0,volcano_w]) translate([x,0,0])
79 rotate([0,0,90]) bubbles(size=[volcano_l,(volcano_hs_t+sh)/2,volcano_h-volcano_cutoff_t]);
80 rotate([-90,0,0])
81 bubbles(size=[volcano_w,sv/2,volcano_l]);
82}
83module silicone() {
84 translate([-sh-volcano_hs_t,-sh,-sv])
85 cube(size=[the_w,the_l,the_h-epsilon]);
86}
87
88use <mold.scad>;
89
90vol_ = the_w*the_l*the_h
91 - volcano_w*volcano_l*volcano_h // heater block
92 + volcano_w*volcano_cutoff_t*volcano_cutoff_l// cutoff
93 - PI*pow(volcano_n_d/2,2)*sv // nozzle
94 - PI*pow(volcano_c_d/2,2)*volcano_c_t // cartridge
95 - PI*pow(volcano_ts_d/2,2)*volcano_ts_t// thermistor screw
96 - PI*pow(volcano_hs_d/2,2)*volcano_hs_t *2// heater screws
97;
98vol = vol_*1.2;
99echo("volume",vol);
100
101use <view.scad>;
102
103view(view="*",volume=vol) {
104 mold(size=[the_w,the_l,the_h],s=ms,v_protrude=protrude,introffset=(volcano_l-volcano_cutoff_l)*3/4);
105 translate([ms+volcano_hs_t+sh,ms+sh,ms+sv]) heatershape();
106 translate([ms+epsilon,ms+epsilon,ms+epsilon]) cube(size=[the_w-2*epsilon,the_l-2*epsilon,the_h]);
107}
108/* vim:set ai sw=1: */