3D part design with OpenSCAD #72: A fully customizable sluice box (part 1)

A cutomizable design for a 3d printed sluice box made with OpenSCAD.

2 min read
By Bob
3D part design with OpenSCAD #72: A fully customizable sluice box (part 1)

Since I needed to make a box for the  corrugated riffle customizer I had made in  post #67 I used the code I had already made for the parts box from post #65 and modified it for a sluice.

Here is the code:

/*[Board]*/
show_board= true;
peak_height = 25.5;//[0:.01:100]
width = 200; // [0:.01:400]
length = 1919; //[0:.01:4000]
thickness = 2; // [.1:.01:5]
peaks = .75; // [0:.01:7]
move_board_Z=0;//[0:.01:20]

/*[Riffles]*/
show_riffles= true;
riffle_size=2.29;//[0:.01:25]
riffle_spacing = 240.94;//[1:.01:1000]
riffle_shape=20; //[3:1:100]
riffle_rotate=0;//[0:.1:360]
move_riffles_Z=2;//[0:.01:20]

/*[Holes]*/
show_holes= true;
hole_number_X=8; //[1:1:100]
hole_number_Y=9; //[1:1:100]
hole_size = 3.5; //[0:.01:25.4]
hole_shape = 50; //[3:1:50]
hole_spacing_x = 24.46;//[0:.01:50]
hole_spacing_y = 21.62;//[0:.01:200]
hole_height=50;//[.1:.01:200]
move_holes_x = 110; //[0:.01:400]
move_holes_y = -100; //[-400:.01:400]
move_holes_z = -4; //[-400:.01:400]

/*[Sluice box]*/
show_box= true;
box_height = 50;//[20:.01:100]
box_length = 200;//[20:.01:400]
box_width = 200;//[20:.01:400]
wall_thickness = 2;//[.1:.01:4]
rounding = 40; //[4:1:40]

module board(){
if (show_board)
translate([0,0,move_board_Z])
rotate([90,0,0])
linear_extrude(width)
 for (i=[0:length]){
  hull(){
  translate([i*.1,peak_height/2.5*(1+sin(-90+i*peaks)),0])
  circle(thickness,$fn=20);
  translate([(i+1)*.1,peak_height/2.5*(1+sin(-90+(i+1)*peaks)),0])
  circle(thickness,$fn=20);
}}}

module riffles(){
if (show_riffles)
translate([riffle_size,0,move_board_Z])
rotate([90,0,0])
linear_extrude(width)
translate([0,move_riffles_Z,0])
for (i=[0:riffle_spacing:length]){
    translate([i*.1,peak_height/2.5*(1+sin(-90+i*peaks)),0])
    rotate([0,0,riffle_rotate])
    circle(riffle_size,$fn=riffle_shape);
}}

module holes(){
if (show_holes)
for(x=[0:hole_number_X-1])
for(y=[0:hole_number_Y-1])
translate([(x-hole_number_X/2)*hole_spacing_x,(y-hole_number_Y/2+.5)*hole_spacing_y,-5])
linear_extrude(hole_height,convexity=11)
circle(hole_size,$fn=hole_shape);
}

riffles();

difference(){
board();
translate([move_holes_x,move_holes_y,move_holes_z])
holes();
}

module box(){
if (show_box){
translate([0,0,box_height/2])
difference(){
cube([box_length,box_width,box_height],center=true);
cube([box_length-wall_thickness+12,box_width-wall_thickness,box_height],center=true);
}
cube([box_length,box_width,1],center=true);
}}
if (show_box){
minkowski(){
translate([.5*box_length,-.5*box_width,0])
box();
sphere(wall_thickness,$fn=rounding);
}}

Now I can turn off or on the different sections and print them out separately or all at one time.

Now I can add carpet or miners moss under the riffles and make it small for backpacking.

As time allows I will be making improvements and adding additional features like snap together sections and a header box.