diff --git a/README.md b/README.rst similarity index 54% rename from README.md rename to README.rst index ed58553..ba1aced 100644 --- a/README.md +++ b/README.rst @@ -1,16 +1,21 @@ -# goban +goban +##### Parametric goban and stones for blind players - One version for 3D printing + CNC - One version for laser-cutting +- One flat version for 3D printing only -## Laser-cutting version +Laser-cutting version +--------------------- - Engrave then cut one base. - Engrave verso of upper sheet. - Engrave then cut recto of upper sheet. - Stick upper sheet on base. -Hint : create three goban, each in an other color. -Reorder your stones to have good colors for each set. +.. hint:: + + Create three goban, each in an other color. + Reorder your stones to have good colors for each set. diff --git a/flat3dprint/black_stones.scad b/flat3dprint/black_stones.scad new file mode 100644 index 0000000..65546ae --- /dev/null +++ b/flat3dprint/black_stones.scad @@ -0,0 +1,40 @@ +include +use + +module bstone() { + difference() { + wstone(); + for($r=[$mark_thickness/2:2*$mark_thickness:$stone_radius]) { + translate([0, 0, -1]) { + difference() { + cylinder(r=$r+$mark_thickness/2, h=$stone_height/3+1, $fn=200); + translate([0, 0, -1]) { + cylinder(r=$r-$mark_thickness/2, h=$stone_height/3+2, $fn=200); + } + } + } + translate([0, 0, $stone_height*2/3]) { + difference() { + cylinder(r=$r+$mark_thickness/2, h=$stone_height/3+1, $fn=200); + translate([0, 0, -1]) { + cylinder(r=$r-$mark_thickness/2, h=$stone_height/3+2, $fn=200); + } + } + } + } + } +} + +$median = floor($goban_size/2); + +for($x=[$median:$goban_size-1]) { + 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(); + } + } + } +} diff --git a/flat3dprint/export/9x9_black_stones.stl b/flat3dprint/export/9x9_black_stones.stl new file mode 100644 index 0000000..d4bec29 Binary files /dev/null and b/flat3dprint/export/9x9_black_stones.stl differ diff --git a/flat3dprint/export/9x9_goban.stl b/flat3dprint/export/9x9_goban.stl new file mode 100644 index 0000000..3e45e7e Binary files /dev/null and b/flat3dprint/export/9x9_goban.stl differ diff --git a/flat3dprint/export/9x9_white_stones.stl b/flat3dprint/export/9x9_white_stones.stl new file mode 100644 index 0000000..4dc0ce7 Binary files /dev/null and b/flat3dprint/export/9x9_white_stones.stl differ diff --git a/flat3dprint/goban.scad b/flat3dprint/goban.scad new file mode 100644 index 0000000..b81049d --- /dev/null +++ b/flat3dprint/goban.scad @@ -0,0 +1,61 @@ +include + +module goban() { + $goban_width = $cell_width*($goban_size-1) + + $goban_size*$line_width + + $goban_padding*2; + + $goban_length = $cell_length*($goban_size-1) + + $goban_size*$line_width + + $goban_padding*2; + + difference() { + cube([$goban_width, $goban_length, $goban_height]); + for(n=[0:$goban_size-1]) { + translate([ + $goban_padding, + $goban_padding + n*($cell_length+$line_width), + $goban_height - $line_depth]) + cube([ + $goban_size*($line_width+$cell_width)-$cell_length, + $line_width, + $line_depth+1 + ]); + translate([ + $goban_padding + n*($cell_width+$line_width), + $goban_padding, + $goban_height - $line_depth]) + cube([ + $line_width, + $goban_size*($line_width+$cell_length)-$cell_length, + $line_depth+1 + ]); + for(y=[0:$goban_size-1]) { + translate([ + $goban_padding + n*($cell_width+$line_width), + $goban_padding + y*($cell_length+$line_width), + -1 + ]) union() { + translate([0, 0, 1 + $goban_height - $stone_height]) + cylinder( + h=$stone_height+1, + r=$stone_radius+$stone_clearance, + $fn=200); + if(search(n+1, $hoshi_pos) && search(y+1, $hoshi_pos)) { + cylinder( + h=$goban_height+1, + r=$hoshi_radius, + $fn=200); + } else { + cylinder( + h=$goban_height+1, + r=$goban_hole_radius, + $fn=200); + } + } + } + } + } +} + +goban(); diff --git a/flat3dprint/params.scad b/flat3dprint/params.scad new file mode 100644 index 0000000..091d7a1 --- /dev/null +++ b/flat3dprint/params.scad @@ -0,0 +1,15 @@ +$stone_height = 2; +$stone_radius = 6.25; +$stone_clearance = 0.25; +$mark_thickness = 1.5; +$hoshi_radius = 2; +$goban_hole_radius = 1; +$goban_height = 3; +$line_depth = 1; +$cell_width = 13; +$cell_length = 13; +$goban_padding = 9; +$line_width = 1; +$goban_size = 9; +$hoshi_pos = [3, 7]; +// [4, 10, 16] for 19x19, [4, 7, 10] for 13x13, [3, 7] for 9x9 diff --git a/flat3dprint/white_stones.scad b/flat3dprint/white_stones.scad new file mode 100644 index 0000000..8b678be --- /dev/null +++ b/flat3dprint/white_stones.scad @@ -0,0 +1,24 @@ +include + +module wstone() { + difference() { + cylinder(h=$stone_height, r=$stone_radius, $fn=200); + translate([1.5*$stone_radius, 0, -1]) { + cylinder(h=$stone_height+2, r=$stone_radius, $fn=200); + } + } +} + +$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(); + } + } + } +}