From 9a2b3e23b7299b5f314b23becc5bddf6f7e5216a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 21 May 2017 23:26:56 +0100 Subject: [PATCH] sewing-table: Tile11 wip --- sewing-table.scad.m4 | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/sewing-table.scad.m4 b/sewing-table.scad.m4 index 8b69b44..0990ad1 100644 --- a/sewing-table.scad.m4 +++ b/sewing-table.scad.m4 @@ -35,7 +35,7 @@ cutout_l_end_curve = 1; cutout_tile01_y = 170 - 147; cutout_tile11_x = 22 + cutout_l_end_curve; -cutout_tile11_y = cutout_l_end_curve - cutout_tile01_y; +cutout_tile11_y = cutout_l_end_y - cutout_tile01_y; // calculated @@ -301,6 +301,9 @@ module TestDemo(){ ////toplevel translate([ +thehd[0] + demo_slop, 0 ]) TestPiece2(); } + +module Machine(){ +} function Rectangle_corners(c0, sz) = // returns the corners of a rectangle from c0 to c0+sz @@ -318,6 +321,8 @@ function Rectangle_corners2posts(c) = module Rectangle_TileBase(c) { TileBase(c[0], c[2]); } +function Posts_interpolate_one(c0,c1) = [c0, (c0+c1)/2, c1]; + m4_dnl R_EDGE(c,ix) m4_dnl c is from Rectangle_corners and m4_dnl ix is a corner number @@ -365,9 +370,34 @@ module Tile12(){ ////toplevel RoundCornerAdd(rcs); } +module Tile11(){ ////toplevel + sz = [250,250]; + c0 = [0,0]; + c = Rectangle_corners(c0, sz); + cnr_posts = Rectangle_corners2posts(c); + posts = concat( + Posts_interpolate_one(cnr_posts[0], + cnr_posts[1] - [cutout_tile11_x, 0]), + [ cnr_posts[1] + [0, cutout_tile11_y], + cnr_posts[2], + cnr_posts[3] + ]); + difference(){ + union(){ + Rectangle_TileBase(c); + Posts(posts); + RoundEdge(R_EDGE(c,2)); + InterlockEdge(R_EDGE(c,3)); + } + Machine(); + InterlockEdge(R_EDGE(c,0), 1); + } +} + module Demo(){ ////toplevel translate(demo_slop*[-2,1]) color("blue") Tile12(); translate(demo_slop*[-2,0]) color("red") Tile02(); + translate(demo_slop*[-2,1]) color("orange") Tile11(); } //TestPiece1(); -- 2.30.2