3D part design with OpenSCAD #67: A sluice box riffle customizer.

An example using OpenSCAD to make riffles for a sluice box.

2 min read
By Bob
3D part design with OpenSCAD #67: A sluice box riffle customizer.

I decided to make a more customizable module for making sluice box riffles just so I can experiment with different configurations or make a silicon mat, here is the code:

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

/*[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=0;//[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]

module board(){
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)
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();
}

This time instead of using InkScape to make the riffles in the board I used OpenSCAD so I could make it flat or have steeper or more gentle slopes. I also added a way to make riffles and holes.

I will be making changes as soon I have time to experiment with these, my goal is to have a portable sluice that is lightweight and I can carry into some remote locations.