-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3dchess.scad
105 lines (99 loc) · 3.06 KB
/
3dchess.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
fieldwidth=40;
inner_fieldwidth=fieldwidth-.5;
innerst_fieldwidth=fieldwidth-2;
acrylwidth=6;
height=100;
resolution=200;
m8width=8.3;
module blackfield(){
difference(){
square([inner_fieldwidth,inner_fieldwidth],center=true);
square([innerst_fieldwidth,innerst_fieldwidth],center=true);
}
}
module whitefield() {
color("pink",.2)
difference(){
circle(d=inner_fieldwidth,$fn=resolution);
circle(d=innerst_fieldwidth,$fn=resolution);
}
}
module field (match=0){
translate([-.5*fieldwidth,-.5*fieldwidth])
// linear_extrude(acrylwidth){
// translate([-6,-6])
difference(){
circle(30,$fn=resolution);
translate([.2,.2])
square(60,center=true);
}
// }
for(i=[0:4]){
for(j=[0:4]){
translate([i*fieldwidth,j*fieldwidth])
if ((i+j)%2!=match){
color("blue",.2)
// linear_extrude(acrylwidth)
blackfield();
}
else{
color("pink",.2)
// linear_extrude(acrylwidth)
whitefield();
}
}
}
// color("green",.1)
// linear_extrude(acrylwidth){
// hull(){
// translate([-.5*fieldwidth,-.5*fieldwidth])
// circle(10,$fn=resolution);
// translate([-.5*fieldwidth,4.5*fieldwidth])
// circle(10,$fn=resolution);
// translate([4.5*fieldwidth,-.5*fieldwidth])
// circle(10,$fn=resolution);
// translate([4.5*fieldwidth,4.5*fieldwidth])
// circle(10,$fn=resolution);
// }
// }
// color("green",.1)
// linear_extrude(acrylwidth){
// translate([-.5*fieldwidth,-.5*fieldwidth])
// difference(){
// circle(30,$fn=resolution);
// translate([-12,-12])
// circle(d=m8width,$fn=resolution);
// }
// translate([-.5*fieldwidth,4.5*fieldwidth])
// difference(){
// circle(30,$fn=resolution);
// translate([-12,12])
// circle(d=m8width,$fn=resolution);
// }
// translate([4.5*fieldwidth,-.5*fieldwidth])
// difference(){
// circle(30,$fn=resolution);
// translate([12,-12])
// circle(d=m8width,$fn=resolution);
// }
// translate([4.5*fieldwidth,4.5*fieldwidth])
// difference(){
// circle(30,$fn=resolution);
// translate([12,12])
// circle(d=m8width,$fn=resolution);
// }
// }
}
//for(i=[0:4]){
// translate([0,0,(acrylwidth+height)*i])
// field(match=i%2);
//}
//translate([-32,-32])
// cylinder(h=430,d=10);
//translate([5*fieldwidth-8,-32])
// cylinder(h=430,d=10);
//translate([-32,5*fieldwidth-8])
// cylinder(h=430,d=10);
//translate([5*fieldwidth-8,5*fieldwidth-8])
// cylinder(h=430,d=10);
field();