Creating "pie slice" in OpenSCAD?
My current workaround is to use union instead of intersection. Unfortunately, that means I have to use an if clause which makes the code have two paths instead of one clean approach. Also, unlike the above method, this does not result in a clean cylindrical shape but must instead by combined with a proper cylinder to get the final pie slice   

   size = length + 2;
    if (angle_deg &lt;= 90) {
      translate([0,0,-1]) 
      intersection() {
        cube(size);
        rotate(angle_deg-90) cube(size);
      }
    } else if (angle_deg &lt;= 180) {
      translate([0,0,-1]) 
      union() {
        cube(size);
        rotate(angle_deg-90) cube(size);
      }      
    } else {
      echo(str("FAILURE - Angle cannot exceed 180"));
    }