author | Ivan Kokshaysky <ink@unseen.parts> | 2018-07-25 21:23:17 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2018-07-25 21:23:17 (UTC) |
commit | a24158645c0156f5b55c9adce15e16a8eb908ba1 (patch) (unidiff) | |
tree | 7d83494a5e612b408f307b9e5be5e599943c3c98 /multimixer.scad | |
parent | 0d6c302f5e23490aec29d6e8cc2dffc0adce8602 (diff) | |
download | extrudery-a24158645c0156f5b55c9adce15e16a8eb908ba1.zip extrudery-a24158645c0156f5b55c9adce15e16a8eb908ba1.tar.gz extrudery-a24158645c0156f5b55c9adce15e16a8eb908ba1.tar.bz2 |
laying flat into print position
-rw-r--r-- | multimixer.scad | 23 |
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 | |||
@@ -25,33 +25,54 @@ module multimixer( | |||
25 | sinsin = sin(angle)*sin(angular_step/2); | 25 | sinsin = sin(angle)*sin(angular_step/2); |
26 | function l_to(d) = d*cos(asin(sinsin))/sinsin; | 26 | function l_to(d) = d*cos(asin(sinsin))/sinsin; |
27 | l_output = liner_od; | 27 | l_output = liner_od; |
28 | l_input = l_to(pushfit_d/2+minshell); | 28 | l_input = l_to(pushfit_d/2+minshell); |
29 | l_fork = l_to(liner_id/2); | 29 | l_fork = l_to(liner_id/2); |
30 | l_narrow = l_to(liner_od/2+minshell); | 30 | l_narrow = l_to(liner_od/2+minshell); |
31 | 31 | ||
32 | module forinputs() { | 32 | module forinputs() { |
33 | for(zr=[0:angular_step:359]) rotate([0,0,zr]) rotate([0,angle,0]) children(); | 33 | for(zr=[0:angular_step:359]) rotate([0,0,zr]) rotate([0,angle,0]) children(); |
34 | }//forinputs module | 34 | }//forinputs module |
35 | module foroutput() { | 35 | module foroutput() { |
36 | rotate([180,0,0]) children(); | 36 | rotate([180,0,0]) children(); |
37 | } | 37 | } |
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]) |
45 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); | 66 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); |
46 | foroutput() | 67 | foroutput() |
47 | translate([0,0,l_output+pushfit_h]) { | 68 | translate([0,0,l_output+pushfit_h]) { |
48 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); | 69 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); |
49 | } | 70 | } |
50 | } | 71 | } |
51 | forinputs() { | 72 | forinputs() { |
52 | translate([0,0,l_input]) pushfit(pf); | 73 | translate([0,0,l_input]) pushfit(pf); |
53 | translate([0,0,l_narrow]) { | 74 | translate([0,0,l_narrow]) { |
54 | cylinder(d=liner_od,h=l_input+1-l_narrow,$fn=liner_od*fnd); | 75 | cylinder(d=liner_od,h=l_input+1-l_narrow,$fn=liner_od*fnd); |
55 | mirror([0,0,1]) translate([0,0,-epsilon]) | 76 | mirror([0,0,1]) translate([0,0,-epsilon]) |
56 | cylinder(d1=(liner_id+liner_od)/2,d2=liner_id,h=liner_id,$fn=liner_od*fnd); | 77 | cylinder(d1=(liner_id+liner_od)/2,d2=liner_id,h=liner_id,$fn=liner_od*fnd); |
57 | } | 78 | } |