summaryrefslogtreecommitdiff
authorIvan Kokshaysky <ink@unseen.parts>2018-07-25 21:23:17 (UTC)
committer Michael Krelin <hacker@klever.net>2018-07-25 21:23:17 (UTC)
commita24158645c0156f5b55c9adce15e16a8eb908ba1 (patch) (side-by-side diff)
tree7d83494a5e612b408f307b9e5be5e599943c3c98
parent0d6c302f5e23490aec29d6e8cc2dffc0adce8602 (diff)
downloadextrudery-a24158645c0156f5b55c9adce15e16a8eb908ba1.zip
extrudery-a24158645c0156f5b55c9adce15e16a8eb908ba1.tar.gz
extrudery-a24158645c0156f5b55c9adce15e16a8eb908ba1.tar.bz2
laying flat into print position
Diffstat (more/less context) (show 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
@@ -29,25 +29,46 @@ module multimixer(
l_fork = l_to(liner_id/2);
l_narrow = l_to(liner_od/2+minshell);
module forinputs() {
for(zr=[0:angular_step:359]) rotate([0,0,zr]) rotate([0,angle,0]) children();
}//forinputs module
module foroutput() {
rotate([180,0,0]) children();
}
//translate([pf_d(pf)/2+shell,0,0])
//translate([0,0,l_output+pushfit_h])
- difference() {
+ module laydown(dia) {
+ r = dia/2;
+ h_bottom = l_output+pushfit_h;
+ /* The top point on the cylinder that will touch the bed */
+ x0 = r*cos(angular_step/2);
+ y0 = r*sin(angular_step/2);
+ z0 = l_input+pushfit_h;
+ /* The same point after rotation by "angle" around Y axis */
+ x1 = z0*sin(angle)+x0*cos(angle);
+ y1 = y0;
+ z1 = z0*cos(angle)-x0*sin(angle);
+ ax1 = atan(y1/x1);
+ /* And its x-coordinate after final "angular_step/2" Z-rotation */
+ ax2 = ax1-angular_step/2;
+ x2 = x1*cos(ax2)/cos(ax1);
+ laydown_angle = atan((x2-r)/(z1+h_bottom));
+ rotate([90-laydown_angle,0,0])
+ translate([0,r,h_bottom])
+ rotate([0,0,angular_step/2-90])
+ children();
+ }
+ laydown(dia=pushfit_d+shell*2) difference() {
hull() {
forinputs()
translate([0,0,l_input+pushfit_h]) mirror([0,0,1])
cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd);
foroutput()
translate([0,0,l_output+pushfit_h]) {
cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd);
}
}
forinputs() {
translate([0,0,l_input]) pushfit(pf);
translate([0,0,l_narrow]) {