goban/3dprint/white_stones.scad

25 lines
592 B
OpenSCAD
Raw Normal View History

2022-01-31 00:36:21 +01:00
include <params.scad>
module wstone() {
difference() {
cylinder(h=$stone_height, r=$stone_radius, $fn=100);
2022-01-31 00:36:21 +01:00
translate([1.5*$stone_radius, 0, -1]) {
cylinder(h=$stone_height+2, r=$stone_radius, $fn=100);
2022-01-31 00:36:21 +01:00
}
}
}
$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();
}
}
}
}