From: Ian Jackson Date: Mon, 2 Jan 2017 14:55:00 +0000 (+0000) Subject: sewing-table: Interlock: introduce InterlockEdgePlan (nfc) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=ff9d71eba4ddead909bfe6e1631837bb72bb241c sewing-table: Interlock: introduce InterlockEdgePlan (nfc) --- diff --git a/sewing-table.scad.m4 b/sewing-table.scad.m4 index 04e4598..6c44676 100644 --- a/sewing-table.scad.m4 +++ b/sewing-table.scad.m4 @@ -121,7 +121,10 @@ module RoundLeftCorner(this_cnr, right_cnr) { } } -module InterlockLobePlan(r, ymir) { +module InterlockLobePlan(negative) { + r = negative ? interlock_negative_rad : interlock_rad; + ymir = negative ? 0 : 1; + dx = sqrt(3) * r; $fn= 80; translate([thehd[0], 0]){ @@ -139,22 +142,24 @@ module InterlockLobePlan(r, ymir) { } } +module InterlockEdgePlan(negative, nlobes, length) { + for (lobei = [ 0 : nlobes-1 ]) { + lobex = (length - thehd[0]*2) * (lobei ? lobei / (nlobes-1) : 0); + translate([lobex, 0, 0]) { + InterlockLobePlan(negative); + } + } +} + module InterlockEdge(left_cnr, right_cnr, negative=0, nlobes=2) { - r = negative ? interlock_negative_rad : interlock_rad; plusth = negative * 1.0; - ymir = negative ? 0 : 1; INREFFRAME(left_cnr, right_cnr) { - translate([0, 0, plusth]){ - mirror([0,0,1]){ - linear_extrude(height=tile_th+plusth*2, convexity=10){ - for (lobei = [ 0 : nlobes-1 ]) { - lobex = (length - thehd[0]*2) * (lobei ? lobei / (nlobes-1) : 0); - translate([lobex, 0, 0]) { - InterlockLobePlan(r, ymir); - } - } - } + translate([0, 0, plusth]){ + mirror([0,0,1]){ + linear_extrude(height=tile_th+plusth*2, convexity=10){ + InterlockEdgePlan(negative, nlobes, length); + } } } }