From: Ian Jackson Date: Mon, 2 Jan 2017 14:25:01 +0000 (+0000) Subject: sewing-table: Start on real tiles X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=2e669aab002d7fcae3f038b5335a7b484abdcb2f sewing-table: Start on real tiles --- diff --git a/sewing-table.scad.m4 b/sewing-table.scad.m4 index 9c930e5..2d48d82 100644 --- a/sewing-table.scad.m4 +++ b/sewing-table.scad.m4 @@ -196,6 +196,51 @@ module TestDemo(){ ////toplevel TestPiece2(); } +function Rectangle_corners(c0, sz) = + [ c0 + [ 0, 0 ], + c0 + [ sz[0], 0 ], + c0 + [ sz[0], sz[1] ], + c0 + [ 0, sz[1] ] ]; + +function Rectangle_corners2posts(c) = + [ c[0] + thehd_tr, + c[1] + thehd_tl, + c[2] + thehd_bl, + c[3] + thehd_br ]; + +module Tile02(){ ////toplevel + sz = [100,170]; + c0 = -sz; + c = Rectangle_corners(c0, sz); + posts = Rectangle_corners2posts(c); + difference(){ + TileBase(c[0], c[2]); + } + Posts(posts); + RoundEdge(c[0], c[1]); + RoundEdge(c[3], c[0]); + RoundLeftCorner(c[0], c[1]); +} + +module Tile12(){ ////toplevel + sz = [100,250]; + c0 = [-sz[0], 0]; + c = Rectangle_corners(c0, sz); + posts = Rectangle_corners2posts(c); + difference(){ + TileBase(c[0], c[2]); + } + Posts(posts); + RoundEdge(c[2], c[3]); + RoundEdge(c[3], c[0]); + RoundLeftCorner(c[2], c[3]); +} + +module Demo(){ ////toplevel + color("blue") Tile12(); + color("red") Tile02(); +} + //TestPiece1(); //TestPiece2(); //Demo();