wall_thickness_mm=3;
length_mm=120;
width_mm=70;
height_mm=30;
net_slack_pc=10;
net_thickness_mm=0.5;
peg_diam_mm=2;
slot_tolerance=0.05;
peg_hole_tolerance=0.5;
module notched_wall(x,y,z,side) {
module notch() {
translate ([-slot_tolerance,side*(y/2-slot_tolerance),-z/2])
cube([z+slot_tolerance*2,y,z*2]);
}
difference() {
cube ([x,y,z]);
translate ([x/2,0,-z/2])
scale ([(x-z*5)/2,y/2,1])
cylinder(r=1,h=z*2, $fs=0.1, $fn=0);
translate ([z,0,0]) notch();
translate ([x-z*2,0,0]) notch();
}
}
module wall_NS() {
module peg_hole() {
translate([0,0,-wall_thickness_mm/2])
cylinder(
d=(peg_diam_mm+peg_hole_tolerance),
h=wall_thickness_mm*2,
$fs=0.1, $fn=0
);
}
difference() {
notched_wall(width_mm,height_mm,wall_thickness_mm,-1);
translate([wall_thickness_mm*2.1+peg_diam_mm/2,height_mm-wall_thickness_mm,0]) peg_hole();
translate([width_mm-wall_thickness_mm*2.1-peg_diam_mm/2,height_mm-wall_thickness_mm,0]) peg_hole();
}
}
module wall_EW() {
notched_wall(length_mm,height_mm,wall_thickness_mm,1);
}
module soap_net() {
net_width_mm=(width_mm-wall_thickness_mm*4.2-peg_diam_mm)*(1+net_slack_pc/100);
net_length_mm=length_mm-wall_thickness_mm*4.2;
module peg() {
intersection() {
translate([0,0,peg_diam_mm*0.4])
rotate([-90,0,0])
cylinder(
d=peg_diam_mm,
h=length_mm-wall_thickness_mm*2,
$fs=0.1, $fn=0
);
translate([-peg_diam_mm,-length_mm*0.5,0])
cube([peg_diam_mm*2,length_mm*2,peg_diam_mm*2]);
}
}
union() {
cube ([net_width_mm,net_length_mm,net_thickness_mm]);
translate ([0,-wall_thickness_mm*1.5,0]) peg();
translate ([net_width_mm,-wall_thickness_mm*1.5,0]) peg();
}
}
wall_NS();
translate([0,height_mm*1.2,0]) wall_NS();
translate ([width_mm*1.2,0,0]) wall_EW();
translate ([width_mm*1.2,height_mm*1.2,0]) wall_EW();
translate ([wall_thickness_mm*2.5,height_mm*2.5 ,0]) soap_net();