1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00
This commit is contained in:
Justin Lin
2020-02-13 17:01:28 +08:00
parent f7a50a4580
commit ddf0f36a51

View File

@@ -1,11 +1,12 @@
use <line2d.scad>;
use <util/rand.scad>;
module tiled_lines(size, line_width = 1, step) {
module tiled_lines(size, step, line_width = 1) {
sizexy = is_num(size) ? [size, size] : size;
s = is_undef(step) ? line_width * 2 : step;
module rand_diagonal_line(x, y, size) {
if(rands(0, 1, 1)[0] >= 0.5) {
if(rand(0, 1) >= 0.5) {
line2d([x, y], [x + size, y + size], width = line_width);
}
else {
@@ -24,4 +25,4 @@ size = [50, 25];
line_width = 1;
step = 2;
tiled_lines(size, line_width, step);
tiled_lines(size, step, line_width);