Concurrent Cup Holder

The just handed out mugs with the new Concurrent company logo at work, and the one problem with them is they are too tall to fit in the Flavia coffee machine without removing the base, but when you remove the base, they are too short and the machine spits all over the place :-).

Just the problem for a 3D printer to solve!

The openscad with the modules that define the various pieces is here:

cupholder.scad

// A cup holder to support a concurrent mug at right height for coffee machine

// Utility module for generating a plate with rounded corners
module rounded_corner_plate(x,y,z,rad) {
   xm=x-2*rad;
   ym=y-2*rad;
   union() {
      translate([-xm/2,-y/2,0])
         cube([xm,y,z]);
      translate([-x/2,-ym/2,0])
         cube([x,ym,z]);
      translate([-xm/2,-ym/2,0])
         cylinder(r=rad,h=z,$fn=64);
      translate([-xm/2,ym/2,0])
         cylinder(r=rad,h=z,$fn=64);
      translate([xm/2,-ym/2,0])
         cylinder(r=rad,h=z,$fn=64);
      translate([xm/2,ym/2,0])
         cylinder(r=rad,h=z,$fn=64);
   }
}

mug_diameter = 87;
mug_height = 119;
mug_angled_base_height = 9;
top_of_cup=152;
segments=12;

leg_height=12;
leg_spacing_dia=50;
leg_dia=8;
leg_extra=8;

tall=top_of_cup -
     (mug_height - mug_angled_base_height) -
     leg_height;

arclen=((3.14159*mug_diameter)/segments)-4;

module one_leg() {
   translate([0,0,-1])
      union() {
         translate([0,0,(leg_height+leg_extra+1)-leg_dia/2])
            sphere(r=leg_dia/2, $fn=64);
         cylinder(r=leg_dia/2, h=(leg_height+leg_extra+1)-leg_dia/2, $fn=64);
      }
}

module legs() {
   union() {
      for ( i = [0:360/5:360]) {
         rotate([0,0,i])
            translate([0,leg_spacing_dia/2,0])
               one_leg();
      }
   }
}

// The 12 segment cylinder based on the Concurrent logo design. Print one of these
// (and optionally paint the segments to match the concurrent logo).
//
module ccur_cylinder() {
   difference() {
      union() {
         for ( i = [0:360/12:360]) {
            rotate([0,0,i])
               translate([0,-((mug_diameter/2)-6),0])
                  rotate([90,0,0])
                     translate([0,tall/2,0])
                        rounded_corner_plate(arclen,tall,12,2);
         }
      }
      translate([0,0,-1])
         cylinder(r=mug_diameter/2,h=tall+2,$fn=128);

      translate([0,0,-1])
      difference() {
         cylinder(r=(mug_diameter/2)+8,h=tall+2,$fn=128);
         translate([0,0,-1])
            cylinder(r=(mug_diameter/2)+4,h=tall+4,$fn=128);
      }
   }
}

module joined_cylinder() {
   union() {
      ccur_cylinder();
      intersection() {
         translate([0,0,tall/2])
            rotate_extrude($fn=128)
               translate([(mug_diameter/2)+0.1,0,0])
                  circle(r=3,$fn=64);
         cylinder(r=mug_diameter/2,h=tall, $fn=128);
      }
   }
}

// The insert that goes in the top of the ccur_cylinder piece to hold the
// cup. Print one of these. It should just press fit into place and stay
// there with friction.
//
module cup_insert() {
   ih=tall/2 - 3/2;
   d=8;

   difference() {
      cylinder(r=(mug_diameter/2)-0.1, h=ih, $fn=128);
      translate([0,0,(ih+0.01)-d])
         cylinder(r2=(mug_diameter/2)-0.8,r1=(mug_diameter/2)-(d+0.8), h=d,
                  $fn=128);
      translate([0,0,-1])
         cylinder(r=(mug_diameter/2)-2*d, h=ih+2, $fn=128);
      rotate_extrude($fn=128)
         translate([(mug_diameter/2)-0.1,0,0])
            circle(r=3.1,$fn=64);
   }
}

module pentagram() {
   ih=tall/2 - 3/2;
   plen=28;
   union() {
      for (i = [0:4] ) {
         rotate([0,0,i*(360/5)])
            translate([0,leg_spacing_dia/2,ih-1])
               rotate([0,0,108/2])
                  translate([-2,-plen,0])
                     difference() {
                        cube([4,plen,leg_height]);
                        translate([-1,plen/2,44])
                           rotate([0,90,0])
                              cylinder(r=35,h=50,$fn=128);
                     }
      }
   }
}

// The insert that goes in the bottom of ccur_cylinder to hold everything up
// far enough to make the coffee all go in the mug and not spit around the
// edges. This also just fits in the cylinder and is held in place by
// friction. Print one of these.
//
module leg_insert() {
   ih=tall/2 - 3/2;
   union() {
      difference() {
         union() {
            cylinder(r=(mug_diameter/2)-0.1, h=ih, $fn=128);
            pentagram();
         }
         rotate_extrude($fn=128)
            translate([(mug_diameter/2)-0.1,0,0])
               circle(r=3.1,$fn=64);
         translate([0,0,-1])
            cylinder(r=(leg_spacing_dia/2 - leg_dia/2 - 2), h=60, $fn=128);
      }
      translate([0,0,ih])
         legs();
   }
}

It prints in 3 parts. The outer cylinder mirrors the 12 segment cylinder shape of the new Concurrent logo (because I could :-). The top and bottom parts are a press fit into the outer cylinder. The top is shaped to fit the bottom of the Concurrent mug, and the bottom has feet tall enough and on a small enough diameter that the cup and holder can be slid under the spout of the coffee machine high enough to contain any spitting.

Go back to my main Solidoodle page.

Page last modified Sat May 16 22:11:32 2015