1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00
This commit is contained in:
Justin Lin 2021-07-31 12:34:50 +08:00
parent 4bddf3ca33
commit 0295b0ded0
3 changed files with 6 additions and 15 deletions

View File

@ -1,4 +1,5 @@
use <experimental/tile_w2e.scad>;
use <experimental/choose_children.scad>;
use <arc.scad>;
size = [15, 10];
@ -124,11 +125,7 @@ module path_tile(n, width) {
}
}
module select_child(n) {
children(n);
}
select_child(n) {
choose_children(n) {
square(width, center = true);
tile1();
rotate(-90) tile1();

View File

@ -4,6 +4,7 @@ use <arc.scad>;
use <shear.scad>;
use <util/rand.scad>;
use <experimental/tile_w2e.scad>;
use <experimental/choose_children.scad>;
mask = [
[0, 1, 1, 0, 0, 0, 1, 1, 0],
@ -25,16 +26,12 @@ random_city(rows, columns, mask);
module random_city(rows, columns, mask) {
tile_width = 30;
module select_child(n) {
children(n);
}
for(tile = tile_w2e([columns, rows], mask)) {
x = tile[0];
y = tile[1];
i = tile[2];
translate([x, y] * tile_width)
select_child(i) {
choose_children(i) {
tile00();
tile01();
tile02();

View File

@ -1,4 +1,5 @@
use <experimental/tile_w2e.scad>;
use <experimental/choose_children.scad>;
use <box_extrude.scad>;
size = [15, 8];
@ -111,11 +112,7 @@ module tube_tile(n, width) {
tile5();
}
module select_child(n) {
children(n);
}
select_child(n) {
choose_children(n) {
tile0();
tile1();
rotate(-90) tile1();