Parametric Storage bin

Gallery

Pasted image 20260126203247.png

A simple Pencil tray I made using this
Pasted image 20260126211724.png

Code

innerW = 20;
innerL = 20;
height = 10;
thickness = 3;

module rounded_box(l = 20, w = 20, h = 20, r=2, fn=32) {
    linear_extrude(height=h) {
        offset(r=r, $fn=fn)
            square([l-2*r, w-2*r], center=true);
    }
}

difference(){
    //outer box
     rounded_box(l = innerL + thickness, w = innerW + thickness, h=height);
        
    //inner box
    translate([0,0, thickness]){
        rounded_box(l = innerL, w = innerW, h=height);
    }
}