wh = 0.6 b = [80,55,2] top = 15 bot = 5 eps = 0.001 /* module base() { translate([0,0,b.z / 2]) cube(b, center=true); } */ base= cube([80,55,2],center=true) base= translate(base,[0,0,2/2]) /* module bar() { translate([0,(bot - top) / 2, wh / 2 - eps]) cube([b.x + 1, b.y - bot - top + 1, wh], center=true); } */ bar=cube([80+1,55-5-15+1,0.6],center=true) bar=translate(bar,[0,(bot-top)/2,wh/2-eps]) /* color("white") intersection() { base(); bar(); } color("red") difference() { base(); bar(); } */ www = intersect([base,bar]) rrr = difference([base,bar]) rrr.color=red www.color=white show_viewer([rrr,www]) show_ply([www,rrr]) show_scad([www,rrr])