Source

uniqxstuff / openscad / cube_cage2 / lazzor_parts.scad



// parameters


height = 90;
width  = 100;
depth  = 200;

material_height = 5;
screw_radius = 1.5;


// arrangement


translate([ (3*width/2) + material_height*4,0,0])
  base_plate(width,depth,material_height,screw_radius);
translate([ (width/2) + material_height,0,0])
  base_plate(width,depth,material_height,screw_radius);

translate([ -1.5*width ,height*0.55,0 ])
  side_plate(depth,height,material_height);
translate([ -1.5*width ,-height*0.55,0 ])
  side_plate(depth,height,material_height);

translate( [3*width,height*0.55,0] ) rotate([0,0,90])
  front_plate(height,width,material_height);
translate( [3*width,-height*0.55,0] ) rotate([0,0,90])
  front_plate(height,width,material_height);


// shapes

module front_plate(h,w,m){

  difference(){

    union(){

      square([h,w],center=true);

      for(a=[-1,1])
        for(b=[-1,1])
          for( i=[0:m*2:(4-1)*m] )
            translate([-a*i+a*h/2-a*m/2,b*w/2+b*m/2])
              square([m,m],center=true);

    }

  for(i=[-1,1])
    translate([h/2-5*m/2,i*w/2,0])
      square([m,2*m],center=true);

  }

}

module side_plate(h,w,m){

  difference(){

    square([h+2*m,w],center=true);

    //translate([h/2+m/2,w/2-m/2,0])
    //  square([m,m],center=true);

    for(a=[-1,1])
      for(b=[-1,1])
        for( i=[m:m*2:4*m] )
          translate([b*h/2+b*m/2,a*w/2-a*i+a*m/2,0])
            square([m,m],center=true);

    for(i=[-1,1])
      translate([i*h/2-m/2*i,-w/2+m*5/2,0])
        square([m,m],center=true);

  }

}

module base_plate(h,w,m,sr){

  difference(){

    square([h+m*2,w+m*2],center=true);

    for( a = [-1,1] )
      for( b = [-1,1] )
        translate([a*(h+m)/2,b*(w+m)/2]) circle(r=sr,$fn=100);

  }

}