mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-18 12:31:17 +02:00
minimum level is 1
This commit is contained in:
@@ -6,7 +6,7 @@ function _sf_square_surfaces(levels, thickness, invert) =
|
|||||||
for(r = [0:rows - 1])
|
for(r = [0:rows - 1])
|
||||||
[
|
[
|
||||||
for(c = [0:columns - 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]
|
[c, r, lv / 255 * thickness]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user