Рекурсивное решение, похоже, близко к функциональной идее openscad.Я также переименовал логические переменные.
module showoff(x,y,z, size, offset, wall_thickness, with_x90, with_x270, with_y90, with_y270, with_z90,with_z270, with_45) {
translate([x, y, z]){
ejcorner(size, offset, wall_thickness, with_x90, with_x270, with_y90, with_y270, with_z90,with_z270, with_45);
}
if (with_x90) {
showoff(x+(size+offset)*2.5,y,z,size, offset, wall_thickness, false, with_x270, with_y90, with_y270, with_z90, with_z270,with_45);
}
if (with_x270) {
showoff(x,y+(size+offset)*2.5,z,size, offset, wall_thickness, with_x90, false, with_y90, with_y270, with_z90, with_z270,with_45);
}
if (with_y90) {
showoff(x+(size+offset)*5,y,z,size, offset, wall_thickness, with_x90, with_x270, false, with_y270, with_z90, with_z270,with_45);
}
if (with_y270) {
showoff(x,y+(size+offset)*5,z,size, offset, wall_thickness, with_x90, with_x270, with_y90, false, with_z90, with_z270,with_45);
}
if (with_z90) {
showoff(x,y+(size+offset)*10,z,size, offset, wall_thickness, with_x90, with_x270, with_y90, with_y270, false, with_z270, with_45);
}
if (with_z270) {
showoff(x,y+(size+offset)*10,z,size, offset, wall_thickness, with_x90, with_x270, with_y90, with_y270, with_z90, false, with_45);
}
if (with_45) {
showoff(x,y+(size+offset)*20,z,size, offset, wall_thickness, with_x90, with_x270, with_y90, with_y270, with_z90, with_z270, false);
}
}
showoff(-50,50,0,14,15,4,true,true,true,true,true,true,true) ;