From: Ian Jackson Date: Tue, 30 Jan 2018 14:06:43 +0000 (+0000) Subject: fairphone-case: led window: introduce and add AdhocMultiprintFrame X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=5fa25a075832aeca10193e2f92b42d6bb3cfaaef;p=reprap-play.git fairphone-case: led window: introduce and add AdhocMultiprintFrame Signed-off-by: Ian Jackson --- diff --git a/fairphone-case.scad b/fairphone-case.scad index 1990985..c0df345 100644 --- a/fairphone-case.scad +++ b/fairphone-case.scad @@ -21,6 +21,7 @@ led_window_style = 3; // 3: like 2 but one-layer window for ad-hoc multi-colour initial_layer_thick = 0.400; // ^ needed for mode 3 only +initial_layer_width = 0.125; // ^ needed for mode 3 only multicolour_gap = 0.15; // each side phone_cnr_rad = 6.0; @@ -330,6 +331,26 @@ $prp_r10 = prl_r10; // ---------- modules ---------- +module AdhocMultiprintFrame(phase, z0, zs) { + // from z0 to z0 + zs*layer + extra = phase * 0.65 + 5; + xextra = extra + -epp4[0]; + xrange = [ 0, phone_width ] + [-1,+1] * xextra; + yextra = extra + -epp4[0]; + yrange = [ -phone_height + -hppB[0] + hp_r2, 0 ] + [-1,+1] * yextra; + p0 = [ xrange[0], yrange[0] ]; + p1 = [ xrange[1], yrange[1] ]; + echo(p0, p1); + translate([0,0, z0]) + mirror([0,0, zs<0]) + linear_extrude(height= initial_layer_thick) + difference(){ + rectfromto(p0 - [1,1] * initial_layer_width, + p1 + [1,1] * initial_layer_width); + rectfromto(p0, p1); + } +} + module KeeperProfile(slant=0){ use_e = kppe + [0,-1] * slant * keeper_inner_width / keeper_slant_slope; polygon([use_e, kppd, kppc, kppb, kppa, kppf]); @@ -941,6 +962,11 @@ module Lid(){ ////toplevel translate([0,0, -nla_t]) cylinder(r=nla_r2, height=20); } + + } + + if (led_window_style >= 3) { + AdhocMultiprintFrame(1, lpp13[1], -1); } }