length = 116.0; width = 10; height = 20; peg_width = 2; how_many_pegs = 16.0; peg_height = 12; union(){ cube([length, width, height-peg_height]); for ( i = [0:how_many_pegs] ) { translate([i*(length-peg_width)/how_many_pegs, 0, height - peg_height]) cube([peg_width, width, peg_height]); } } echo((length-peg_width)/how_many_pegs); echo((length-peg_width)/how_many_pegs - peg_width);