docs: function cube(p) { 
     var s = 1, v = null, off = [0,0,0], round = false, r = 0, fn = 8;
     if(p&&p.length) v = p;		
     if(p&&p.size&&p.size.length) v = p.size;        // { size: [1,2,3] }
     if(p&&p.size&&!p.size.length) s = p.size;       // { size: 1 }
     //if(p&&!p.size&&!p.length&&p.center===undefined&&!p.round&&!p.radius) s = p;      // (2)
     if(p&&(typeof p!='object')) s = p;      // (2)
     if(p&&p.round==true) { round = true, r = v&&v.length?(v[0]+v[1]+v[2])/30:s/10}
     if(p&&p.radius) { round = true, r = p.radius; }
     if(p&&p.fn) fn = p.fn;              // applies in case of round: true
  
     var x = s, y = s, z = s; 
     if(v&&v.length) { 
        x = v[0], y = v[1], z = v[2]; 
     }
     off = [x/2,y/2,z/2];       // center: false default
     var o = round?
        CSG.roundedCube({radius:[x/2,y/2,z/2], roundradius:r, resolution: fn}):
        CSG.cube({radius:[x/2,y/2,z/2]});
     if(p&&p.center&&p.center.length) {
        off = [p.center[0]?0:x/2, p.center[1]?0:y/2,p.center[2]?0:z/2];
     } else if(p&&p.center==true) { 
        off = [0,0,0];
     } else if(p&&p.center==false) {
        off = [x/2,y/2,z/2];
     }
     if(off[0]||off[1]||off[2]) o = o.translate(off);
     //if(v&&v.length) o = o.scale(v);      // we don't scale afterwards, we already created box with the correct size
     return o;
  }