====== Abgerundeten Kanten ====== {{::bildschirmfoto_2018-11-17_um_10.05.17.png?nolink%200|}} ===== 1. Variante ===== // You could simply do it this way if you have the boxes.scad // file in your library //use //roundedBox([20, 30, 25], 5, true); // Or, you could do it this way if you want to roll your own roundedRect([20, 30, 25], 5, $fn=64); // size - [x,y,z] // radius - radius of corners module roundedRect(size, radius) { x = size[0]; y = size[1]; z = size[2]; linear_extrude(height=z) hull() { // place 4 circles in the corners, with the given radius translate([(-x/2)+(radius/2), (-y/2)+(radius/2), 0]) circle(r=radius); translate([(x/2)-(radius/2), (-y/2)+(radius/2), 0]) circle(r=radius); translate([(-x/2)+(radius/2), (y/2)-(radius/2), 0]) circle(r=radius); translate([(x/2)-(radius/2), (y/2)-(radius/2), 0]) circle(r=radius); } } ===== 2. Variante ===== Mit ''hull'' {{::bildschirmfoto_2018-11-17_um_10.12.58.png?nolink&200|}} $fn=50; roundedcube(100,100,100,10); module roundedcube(xdim ,ydim ,zdim,rdim){ hull(){ translate([rdim,rdim,0])cylinder(h=zdim,r=rdim); translate([xdim-rdim,rdim,0])cylinder(h=zdim,r=rdim); translate([rdim,ydim-rdim,0])cylinder(h=zdim,r=rdim); translate([xdim-rdim,ydim-rdim,0])cylinder(h=zdim,r=rdim); } }