Wednesday, August 1, 2012

Day 6 - Random Ikea Thingy

I have no idea what this thing is. My wife claims it came as part of *something* from Ikea, but neither of us remember what that thing was or what this did with it. But it is a fun shape. A little hard to see in these photos.

And here is what I ended up with

  
OUTSIDE_DIAMETER = 45;
WALL_HEIGHT = 5;
INSIDE_DIAMETER = 13;

module end_piece() {
  union() {
    difference() {
      cylinder(r=OUTSIDE_DIAMETER/2, h=WALL_HEIGHT);
      translate([0, 0, 3]) cylinder(r=(OUTSIDE_DIAMETER/2)-1.5, h=WALL_HEIGHT);  
    }

    difference() {
      cylinder(r=INSIDE_DIAMETER/2, h=WALL_HEIGHT);
      translate([0, 0, 3]) cylinder(r=(INSIDE_DIAMETER/2)-1.5, h=WALL_HEIGHT);  
    }

    for (i=[0:7]) {
      rotate([0, 0, i*45]) translate([INSIDE_DIAMETER, 0, 5/2]) cube([(OUTSIDE_DIAMETER - INSIDE_DIAMETER)/2, 1.5, WALL_HEIGHT], center = true);  
    }      
  }
}

module random_ikea_thing() {
  translate([0, 0, 17]) end_piece();
  rotate([180, 0, 0]) end_piece();

  cylinder(r=3, h = 17);
  translate([0, 0, (17/3) - (2.5/2)]) cylinder(r=4, h = 17/3);

  translate([0, 0, (17/3) - (2.5/2)]) cylinder(r=12.5, h = 2);
  translate([0, 0, (2*17/3) - (2.5/2)]) cylinder(r=12.5, h = 2);
}

random_ikea_thing();