← Back to Models
Simple container box

Simple container box

by dezzi ·

Perfect for organizing things in a fridge. Easily adapt wall thickness but 1.6mm actually is perfect for PLA for this size

Prompt

create a container box, rounded perimeter, 175mm length, 140mm width, 120mm height. wall thickness 1.6mm

OpenSCAD Code

// Rounded Container Box
// Dimensions: 175mm x 140mm x 120mm
// Wall thickness: 1.6mm

// Parameters
length = 175;
width = 140;
height = 120;
wall = 1.6;
corner_radius = 10; // Radius of the outer corners
$fn = 64;           // Smoothness of corners

difference() {
    // Outer Shell
    rounded_box(length, width, height, corner_radius);
    
    // Inner Hollow (Shifted up by wall thickness)
    translate([0, 0, wall])
        rounded_box(length - (wall * 2), width - (wall * 2), height, corner_radius - wall);
}

// Module to create the solid rounded box shape
module rounded_box(l, w, h, r) {
    // Offset to center the box on XY plane
    translate([-l/2 + r, -w/2 + r, 0])
    hull() {
        translate([0, 0, 0])             cylinder(h = h, r = r);
        translate([l - (r * 2), 0, 0])   cylinder(h = h, r = r);
        translate([0, w - (r * 2), 0])   cylinder(h = h, r = r);
        translate([l - (r * 2), w - (r * 2), 0]) cylinder(h = h, r = r);
    }
}