mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 01:04:07 +02:00
add tiled_quarter_circles
This commit is contained in:
27
examples/tiles/tiled_quarter_circles.scad
Normal file
27
examples/tiles/tiled_quarter_circles.scad
Normal file
@@ -0,0 +1,27 @@
|
||||
use <experimental/tile_truchet.scad>;
|
||||
use <arc.scad>;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user