24 lines
592 B
OpenSCAD
24 lines
592 B
OpenSCAD
include <params.scad>
|
|
|
|
module wstone() {
|
|
difference() {
|
|
cylinder(h=$stone_height, r=$stone_radius, $fn=100);
|
|
translate([1.5*$stone_radius, 0, -1]) {
|
|
cylinder(h=$stone_height+2, r=$stone_radius, $fn=100);
|
|
}
|
|
}
|
|
}
|
|
|
|
$median = floor($goban_size/2);
|
|
|
|
for($x=[0:$median]) {
|
|
for($y=[0:$goban_size-1]) {
|
|
if($x<$median || ($x==$median && $y<$median)) {
|
|
translate([
|
|
$x*2*($stone_radius+$stone_clearance),
|
|
$y*2*($stone_radius+$stone_clearance), 0]) {
|
|
wstone();
|
|
}
|
|
}
|
|
}
|
|
}
|