mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-16 11:44:50 +02:00
add assertion
This commit is contained in:
@@ -234,11 +234,15 @@ function _doDirs(tm, stack, cx, cy, current_tiles, dirs, leng, i = 0) =
|
||||
len(not_compatible_nbr_tiles) == 0 ? _doDirs(tm, stack, cx, cy, current_tiles, dirs, leng, i + 1) :
|
||||
let(
|
||||
nstack = push(stack, [nbrx, nbry]),
|
||||
nwf = wf_remove(wf, nbrx, nbry, not_compatible_nbr_tiles),
|
||||
ntm = [
|
||||
tilemap_width(tm),
|
||||
tilemap_height(tm),
|
||||
tilemap_compatibilities(tm),
|
||||
wf_remove(wf, nbrx, nbry, not_compatible_nbr_tiles)
|
||||
wf_eigenstates_at(nwf, nbrx, nbrx) != [] ? nwf :
|
||||
assert(false,
|
||||
str("(", nbrx, ", ", nbry, ")",
|
||||
" reaches a contradiction. Tiles have all been ruled out by your previous choices. Please try again."))
|
||||
]
|
||||
)
|
||||
_doDirs(ntm, nstack, cx, cy, current_tiles, dirs, leng, i + 1);
|
||||
|
Reference in New Issue
Block a user