1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/examples/tiles/hitomezashi_stitching.scad

37 lines
758 B
OpenSCAD
Raw Normal View History

2022-06-06 13:11:46 +08:00
use <line2d.scad>
use <experimental/tile_hitomezashi.scad>
use <select.scad>
2021-07-31 15:25:19 +08:00
size = [50, 25];
tile_width = 5;
line_width = 1;
for(tile = tile_hitomezashi(size)) {
2022-04-06 12:11:38 +08:00
translate([tile.x, tile.y] * tile_width)
select(tile[2]) {
2021-07-31 16:18:02 +08:00
tile00(tile_width, line_width);
tile01(tile_width, line_width);
tile02(tile_width, line_width);
tile03(tile_width, line_width);
2021-07-31 15:25:19 +08:00
};
}
2021-07-31 16:18:02 +08:00
module tile00(tile_width, line_width) {
2021-07-31 15:25:19 +08:00
// nope
}
// _
2021-07-31 16:18:02 +08:00
module tile01(tile_width, line_width) {
2021-07-31 16:16:58 +08:00
line2d([0, 0], [tile_width, 0], line_width);
2021-07-31 15:25:19 +08:00
}
// |_
2021-07-31 16:18:02 +08:00
module tile02(tile_width, line_width) {
2021-07-31 16:16:58 +08:00
line2d([0, 0], [0, tile_width], line_width);
2021-07-31 15:25:19 +08:00
}
// |
2021-07-31 16:18:02 +08:00
module tile03(tile_width, line_width) {
2021-07-31 16:16:58 +08:00
line2d([0, 0], [0, tile_width], line_width);
line2d([0, 0], [tile_width, 0], line_width);
2021-07-31 15:25:19 +08:00
}