1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-17 12:10:47 +02:00
This commit is contained in:
Justin Lin
2021-03-16 11:45:18 +08:00
parent 4802358d5e
commit c9a5faea67

View File

@@ -202,15 +202,12 @@ function neighbor_compatibilities(sample, x, y, width, height) =
[for(dir = neighbor_dirs(x, y, width, height)) [me, sample[y + dir[1]][x + dir[0]], dir]]; [for(dir = neighbor_dirs(x, y, width, height)) [me, sample[y + dir[1]][x + dir[0]], dir]];
function compatibilities_of_tiles(sample, width, height) = function compatibilities_of_tiles(sample, width, height) =
let( hashset([
neighbor_compatibilities_lt = [ for(y = [0:height - 1])
for(y = [0:height - 1]) for(x = [0:width - 1])
for(x = [0:width - 1]) for(c = neighbor_compatibilities(sample, x, y, width, height))
for(c = neighbor_compatibilities(sample, x, y, width, height)) c
c ]);
]
)
hashset(neighbor_compatibilities_lt);
width = len(sample[0]); width = len(sample[0]);
height = len(sample); height = len(sample);