///////////////////////////////////////////////////////////////////////////////// // Module for a open box with rounded edges. // // Author: Maximilian Stiefel // Last modification: 26.04.2017 ///////////////////////////////////////////////////////////////////////////////// module roundy(width, depth, height, center) { ///////////////////////////////////////////////////////////////////////// // Vars ///////////////////////////////////////////////////////////////////////// edge_rounding = 5; transx = -width/2; transy = -depth/2; transz = -height/2; ///////////////////////////////////////////////////////////////////////// // Action ///////////////////////////////////////////////////////////////////////// // Hull 4 cylinders // The thickness of the cylinders (edge_rounding) is compensated //translate([transx, transy, transz]) hull(){ for(x=[-1, +1]) for(y=[-1, +1]) translate([x*width/2 + -x*edge_rounding, y*depth/2 + -y*edge_rounding, 0]) cylinder(r = edge_rounding, h = height, center =true); } }