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

order by y, order by x

This commit is contained in:
Justin Lin
2019-06-28 06:41:18 +08:00
parent d9199bf9ed
commit 31c6ee8599

View File

@@ -9,8 +9,8 @@ function px_polygon(points, filled = true) =
min_y = min(ys) min_y = min(ys)
) )
[ [
for(x = min_x; x <= max_x; x = x + 1) for(y = min_y; y <= max_y; y = y + 1)
for(y = min_y; y <= max_y; y = y + 1) for(x = min_x; x <= max_x; x = x + 1)
let(pt = [x, y]) let(pt = [x, y])
if(in_shape(points, pt, true)) pt if(in_shape(points, pt, true)) pt
] ]