1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-16 11:44:50 +02:00

minimum level is 1

This commit is contained in:
Justin Lin
2020-02-19 22:06:41 +08:00
parent 0b7c8467cc
commit 0dc533e681

View File

@@ -6,7 +6,7 @@ function _sf_square_surfaces(levels, thickness, invert) =
for(r = [0:rows - 1])
[
for(c = [0:columns - 1])
let(lv = invert ? 255 - levels[rows - r - 1][c] : levels[rows - r - 1][c])
let(lv = (invert ? 255 - levels[rows - r - 1][c] : levels[rows - r - 1][c]) + 1) // minimum level is 1
[c, r, lv / 255 * thickness]
]
],