summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--multimixer.scad23
1 files changed, 22 insertions, 1 deletions
diff --git a/multimixer.scad b/multimixer.scad
index 88fd6bf..0893457 100644
--- a/multimixer.scad
+++ b/multimixer.scad
@@ -38,7 +38,28 @@ module multimixer(
38 38
39 //translate([pf_d(pf)/2+shell,0,0]) 39 //translate([pf_d(pf)/2+shell,0,0])
40 //translate([0,0,l_output+pushfit_h]) 40 //translate([0,0,l_output+pushfit_h])
41 difference() { 41 module laydown(dia) {
42 r = dia/2;
43 h_bottom = l_output+pushfit_h;
44 /* The top point on the cylinder that will touch the bed */
45 x0 = r*cos(angular_step/2);
46 y0 = r*sin(angular_step/2);
47 z0 = l_input+pushfit_h;
48 /* The same point after rotation by "angle" around Y axis */
49 x1 = z0*sin(angle)+x0*cos(angle);
50 y1 = y0;
51 z1 = z0*cos(angle)-x0*sin(angle);
52 ax1 = atan(y1/x1);
53 /* And its x-coordinate after final "angular_step/2" Z-rotation */
54 ax2 = ax1-angular_step/2;
55 x2 = x1*cos(ax2)/cos(ax1);
56 laydown_angle = atan((x2-r)/(z1+h_bottom));
57 rotate([90-laydown_angle,0,0])
58 translate([0,r,h_bottom])
59 rotate([0,0,angular_step/2-90])
60 children();
61 }
62 laydown(dia=pushfit_d+shell*2) difference() {
42 hull() { 63 hull() {
43 forinputs() 64 forinputs()
44 translate([0,0,l_input+pushfit_h]) mirror([0,0,1]) 65 translate([0,0,l_input+pushfit_h]) mirror([0,0,1])