From b722d178e7c8e002aeff646f0e8556285da11ab5 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 30 Jul 2021 12:02:15 +0800 Subject: [PATCH] add tiled_quarter_circles --- examples/tiles/tiled_quarter_circles.scad | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 examples/tiles/tiled_quarter_circles.scad diff --git a/examples/tiles/tiled_quarter_circles.scad b/examples/tiles/tiled_quarter_circles.scad new file mode 100644 index 00000000..79b3e41b --- /dev/null +++ b/examples/tiles/tiled_quarter_circles.scad @@ -0,0 +1,27 @@ +use ; +use ; + +size = [50, 25]; +tile_width = 5; +line_width = 1; + +$fn = 4; // 4, 8, 12 .... + +for(tile = tile_truchet(size)) { + x = tile[0]; + y = tile[1]; + i = tile[2]; + echo(i); + if(i <= 1) { + translate([x, y] * tile_width) + arc(0.5 * tile_width, [0, 90], line_width); + translate([x + 1, y + 1] * tile_width) + arc(0.5 * tile_width, [180, 270], line_width); + } + else { + translate([x, y + 1] * tile_width) + arc(0.5 * tile_width, [270, 360], line_width); + translate([x + 1, y] * tile_width) + arc(0.5 * tile_width, [90, 180], line_width); + } +} \ No newline at end of file