38 lines
1 KiB
OpenSCAD
38 lines
1 KiB
OpenSCAD
|
include <params.scad>
|
||
|
|
||
|
module bstone() {
|
||
|
difference() {
|
||
|
union() {
|
||
|
cylinder(h=$stone_height, r=$stone_radius, $fn=100);
|
||
|
difference() {
|
||
|
translate([
|
||
|
0, 0,
|
||
|
$stone_height-($stone_radius-$mark_thickness)/2
|
||
|
]) {
|
||
|
sphere(r=$stone_radius-$mark_thickness, $fn=100);
|
||
|
}
|
||
|
translate([0, 0, -$stone_radius]) {
|
||
|
cylinder(r=$stone_radius, h=$stone_radius);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
translate([1.5*$stone_radius, 0, -1]) {
|
||
|
cylinder(h=$stone_height+$stone_radius+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]) {
|
||
|
bstone();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|