-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrid.scad
44 lines (35 loc) · 870 Bytes
/
grid.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
block_x=2;
block_y=8;
gap_x=block_x*0.1;
gap_y=block_y*0.1;
square_side=block_y;
number_x=10;
number_y=6;
number_x_squares=1;
panel_x=square_side;
panel_y=2*square_side;
number_y_panels=3;
projection() {
for ( j = [0:1:number_y-1]) {
translate([0,j*(block_y+gap_y),0])
for ( i = [0:1:number_x-1])
translate([(block_x+gap_x)*i,0,0])
cube([block_x,block_y,2]);
}
x_start=number_x*(gap_x+block_x);
translate([x_start,0,0]) {
for ( j = [0:1:number_y-1]) {
translate([0,j*(square_side+gap_y),0])
for ( i = [0:1:number_x_squares-1])
translate([(square_side+gap_x)*i,0,0])
cube([square_side,square_side,2]);
}
}
}
x_start=number_x*(gap_x+block_x)+number_x_squares*(gap_x+square_side);
translate([x_start,0,0]) {
for ( j = [0:1:number_y_panels-1]) {
translate([0,j*(panel_y+gap_y),0])
cube([panel_x,panel_y,2]);
}
}