chiark / gitweb /
floating-phases.scad: From an other project
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 Sep 2018 10:46:49 +0000 (11:46 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 Sep 2018 10:46:49 +0000 (11:46 +0100)
Copied from
  5f08f53054d3c47f11a767bc6c9d9d8d9257fb57
  Correct a comment mistake in SomeFloatingPhase

Deleted irrelevant parts, and renamed SomeFloatingPhase to
FloatingPhaseFraming since we don't have the odd `Some' thing going on
here.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
floating-phases.scad [new file with mode: 0644]

diff --git a/floating-phases.scad b/floating-phases.scad
new file mode 100644 (file)
index 0000000..92e6b4f
--- /dev/null
@@ -0,0 +1,101 @@
+// -*- C -*-
+
+// caller should define
+//
+//   z_pause = 2;    // higher than any thing in the model
+//   total_sz = [ 200, 141 ];
+//   phases=4;   // how many phases
+//   colours = [
+//        "blue",
+//        "black",
+//        "red",          
+//        "yellow",
+//        ];
+//
+// Pause height                2.0
+// head park X         15
+// head park Y         260
+// head move Z         1
+// min head park Z     1
+// retraction          1
+// re-home             [ ] [ ]
+
+// when z pause occurs
+//   * set feed rate to 10% (or whatever minimum is)
+//   * press knob, printer will start
+//   * quickly select "stop"
+//   * set temp
+//   * set feed rate back to 100%
+//   * now change filament etc.
+
+include <utils.scad>
+
+$test_thicker = 1.0; // 2.5;
+
+th_l0 = .425 * $test_thicker;
+th_l1 = .250 * $test_thicker;
+frame_w = 0.8;
+tower_w = 2.0;
+
+th_most = th_l0 + th_l1*2;
+
+noz_gap = 8;
+
+
+multicolour_gap = 0.15; // each side
+
+underlayer_smaller = 0.35; // each side
+
+total_sz_actual = $test ? $test : total_sz;
+
+module Interlayer_Bigger(){
+  offset(r=multicolour_gap, $fn=20){
+    union(){ children(); }
+  }
+}
+
+module Interlayer_Smaller(){
+  offset(r=-multicolour_gap, $fn=20){
+    union(){ children(); }
+  }
+}
+
+module Underlayer_Smaller(){
+  offset(r=-underlayer_smaller, $fn=20){
+    union(){ children(); }
+  }
+}
+
+module FloatingPhaseFraming(phase, zmin) {
+  frame_inner =
+    total_sz_actual
+    + noz_gap * [2,2] * (phase > 0 ? phase : 0.5);
+
+  frame_outer =
+    frame_inner
+    + frame_w * [2,2];    
+
+  tower_pos =
+    -0.5 * frame_inner
+    + noz_gap * [1,0] * (phases-1 - phase)
+    + -[1,1] * tower_w;
+
+  // frame for alignment
+  linear_extrude(height= th_l0)
+    difference(){
+      square(frame_outer, center=true);
+      square(frame_inner, center=true);
+  }
+
+  // tower to avoid diagonal traverse to start position
+  linear_extrude(height= zmin + th_l1)
+    translate(tower_pos)
+    square([1,1] * tower_w);
+
+  // trick to pause rather than finishing
+  if (phase != phases-1)
+    translate([0,0, z_pause+th_l1])
+      linear_extrude(th_l1)
+      translate(tower_pos)
+      square([1,1] * tower_w);
+}