From: Ian Jackson Date: Sun, 21 Jan 2018 19:10:20 +0000 (+0000) Subject: utils, fairphone-case: move various things into utils X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=1203669b3a354dc244289e17656a9fcb396d53d3;hp=ae469356a21c79cac3a93631f963baa2758a145c utils, fairphone-case: move various things into utils Signed-off-by: Ian Jackson --- diff --git a/fairphone-case.scad b/fairphone-case.scad index b78373c..62048c8 100644 --- a/fairphone-case.scad +++ b/fairphone-case.scad @@ -1,5 +1,7 @@ // -*- C -*- +include + phone = [ 75.0, 145.0 ]; bumper = [ 0.250, -0.025 ]; @@ -139,17 +141,7 @@ hppM = [ epp4[0] - foldover_hinger_gap - hp_r2, hppT = hppM + 0.5 * [0,+1] * hp_k; hppB = hppM + 0.5 * [0,-1] * hp_k; -module rectfromto(a,b) { - ab = b - a; - translate([min(a[0], b[0]), min(a[1], b[1])]) - square([abs(ab[0]), abs(ab[1])]); -} -module circleat(c,r) { translate(c) circle(r); } -module linextr(z0,z1) { - translate([0,0,z0]) - linear_extrude(height=z1-z0) - children(); -} +// ---------- modules ---------- module KeeperProfile(slant=0){ use_e = kppe + [0,-1] * slant * keeper_inner_width / keeper_slant_slope; diff --git a/utils.scad b/utils.scad index 5234d51..6af49c4 100644 --- a/utils.scad +++ b/utils.scad @@ -24,3 +24,14 @@ module FArcSegment(xc,yc,inrad,outrad,alpha,delta) { } } +module rectfromto(a,b) { + ab = b - a; + translate([min(a[0], b[0]), min(a[1], b[1])]) + square([abs(ab[0]), abs(ab[1])]); +} +module circleat(c,r) { translate(c) circle(r); } +module linextr(z0,z1) { + translate([0,0,z0]) + linear_extrude(height=z1-z0) + children(); +}