1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-29 03:47:45 +01:00

avoid path loop

This commit is contained in:
Justin Lin 2022-03-21 09:23:03 +08:00
parent 5825205a4f
commit b67f4bf200

View File

@ -64,7 +64,7 @@ function _mz_hamiltonian_travel(dotM, p, leng) =
end = leng - 1,
pts = [
for(i = 0, nxt_p = nxtp(dotM, p), is_continue = i < end;
is_continue;
is_continue && nxt_p != p;
i = i + 1,
is_continue = i < end,
nxt_p = is_continue ? nxtp(dotM, nxt_p) : undef