From: Ian Jackson Date: Mon, 2 Jan 2017 15:51:30 +0000 (+0000) Subject: sewing-table: InterlockEdgePlan: edge nearly there X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=55000fa41db8d2fb6c8aba14cc5e47148c8fc189;p=reprap-play.git sewing-table: InterlockEdgePlan: edge nearly there --- diff --git a/sewing-table.scad.m4 b/sewing-table.scad.m4 index 0603a0a..5a6aec0 100644 --- a/sewing-table.scad.m4 +++ b/sewing-table.scad.m4 @@ -159,7 +159,7 @@ module InterlockEdgePlan(negative, nlobes, length, dosquare=true) { } if (dosquare) { - iadj = interlock_sq_adj; + iadj = 0; slotshorter = negative ? 0 : interlock_fine_lenslop; mirror([0, negative]) translate([slotshorter, iadj]) @@ -175,7 +175,8 @@ module InterlockEdge(left_cnr, right_cnr, negative=0, nlobes=2) { z1 = -tile_th/2 - protr / interlock_fine_slope; z3 = -tile_th/2 + protr / interlock_fine_slope; - yprotr = negative ? -protr : protr; + negsign = negative ? -1 : +1; + yprotr = negsign * protr; INREFFRAME(left_cnr, right_cnr) { for (vsect = [ // zs0 zs1 ys0, ys1 @@ -191,12 +192,12 @@ module InterlockEdge(left_cnr, right_cnr, negative=0, nlobes=2) { ysd = ys1-ys0; sl = ysd/zsd; m = [ [ 1,0, 0, 0 ], - [ 0,1, -sl, -ys0 ], + [ 0,1, -sl, -ys0 + negsign*interlock_sq_adj ], [ 0,0, 1, zs0 ], [ 0,0, 0, 1 ] ]; multmatrix(m) linear_extrude(height=zsd, convexity=10) - InterlockEdgePlan(negative, nlobes, length); + InterlockEdgePlan(negative, nlobes, length, !!ysd); } } }