1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-06 14:56:47 +02:00

support mask

This commit is contained in:
Justin Lin
2022-03-17 16:21:46 +08:00
parent 06a785bfb1
commit 4b24c81eeb

View File

@@ -21,6 +21,13 @@ function _mz_hamiltonian_top_right(x, y) =
)
[[nx, ny + 2], [nx + 1, ny + 2], [nx + 2, ny + 2], [nx + 2, ny + 1], [nx + 2, ny]];
function _mz_hamiltonian_mask(x, y) =
let(
nx = x * 2,
ny = y * 2
)
[[nx, ny], [nx, ny + 2], [nx + 1, ny + 2], [nx + 2, ny + 2], [nx + 2, ny + 1], [nx + 2, ny]];
function _mz_hamiltonian_corner_value(dots, x, y) =
let(
c1 = has(dots, [x, y], sorted = true) ? 1 : 0,