parent
d660f67bb0
commit
0314116758
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,85 @@ |
||||
include <params.scad> |
||||
|
||||
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), |
||||
0 |
||||
]) union() { |
||||
translate([0, 0, $goban_height - $stone_height]) |
||||
cylinder( |
||||
h=$stone_height+1, |
||||
r=$stone_radius+$clearance, |
||||
$fn=100); |
||||
translate([0, 0, $goban_height - $marble_radius*0.3]) |
||||
sphere( |
||||
r=$marble_radius+$clearance, |
||||
$fn=100); |
||||
translate([0, 0, $goban_height - $stone_height]) |
||||
cylinder( |
||||
r=$marble_radius+$clearance, |
||||
h=$marble_radius+1, |
||||
$fn=100); |
||||
|
||||
if(search(n+1, $hoshi_pos) && search(y+1, $hoshi_pos)) { |
||||
translate([ |
||||
0, 0, |
||||
$goban_height-$stone_height-$line_depth]) |
||||
cylinder( |
||||
h=$line_depth+1, |
||||
r=$marble_radius+$line_width+$clearance, |
||||
$fn=100 |
||||
); |
||||
} |
||||
translate([0, 0, $goban_height-$stone_height*2]) { |
||||
intersection() { |
||||
cylinder( |
||||
h=$stone_height*2, |
||||
r=$stone_radius+$clearance, |
||||
$fn=100 |
||||
); |
||||
translate([0, $stone_radius*1.25, 0]) |
||||
cylinder( |
||||
h=$stone_height*2, |
||||
r=$stone_radius+$clearance, |
||||
$fn=100 |
||||
); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
goban(); |
@ -0,0 +1,13 @@ |
||||
$stone_height = 3; |
||||
$stone_radius = 11.5; |
||||
$marble_radius = 8; |
||||
$goban_size = 19; |
||||
$hoshi_pos = [4, 10, 16]; // [4, 10, 16] for 19x19, [4, 7, 10] for 13x13 |
||||
$line_width = 2; |
||||
$line_depth = 0.8; |
||||
$cell_width = 27; |
||||
$cell_length = 28; |
||||
$goban_padding = 25; |
||||
$goban_height = 13; |
||||
$clearance = 0.75; |
||||
|
Loading…
Reference in new issue