//This file creates a parametric insert for plastic container //like a yogurt cup. With the addition of a piece of nylon string/rope //it becomes a self irrigating planter. // //Carlyn Maw //May 12, 2012 //GNU GPL v3.0 ( http://www.gnu.org/licenses/gpl.html ) //---------------------------------------------------------------- GLOBALS //-------------------------------------------------- Yogurt Container //these are the values for the container itself //They have the most influence on the shape and size //of the insert. yc_bottom_e_radius = 55/2; yc_top_e_radius = 80/2; yc_wall_thickness = 0.75; yc_bottom_i_radius = yc_bottom_e_radius-yc_wall_thickness; yc_top_i_radius = 72/2; //nothing is currently done to mitigate bumpy yc bottoms yc_height = 83.5; //------------------------------------------------------------- Wick sip_wick_radius = 3.5; //---------------------------------------------------- Basket Insert ////these are the values for the basket that turns it into a SIP ////most of these are dependent on the above container measurements. ////The first grouping may need to be chenged if you are using a ////very different container than the ones I've done. sip_wall_thickness = 1; sip_floor_thickness = sip_wall_thickness; sip_lip_thickness = 1; sip_height_as_percentage = 66.6666666; //*drain cone hangs below //----everything below is dependent on previous values-------// sip_lip_radius = yc_top_e_radius; //(bottom of the lip to bottom of the print out) sip_height = yc_height*sip_height_as_percentage/100; //TOP OPENING sip_top_radius = yc_top_i_radius; //CUP BOTTOM WIDTH yc_slope = (yc_top_i_radius - yc_bottom_i_radius ) / yc_height; sip_bottom_radius = (sip_height*yc_slope) + yc_bottom_i_radius; echo(sip_bottom_radius); //WALLS sip_walls_height = sip_height - sip_bottom_radius + sip_lip_thickness; //SPHERE // c = 2 * sqrt( r^2 - t^2) where t = displacement from the center. sip_floorcurve_c = sip_bottom_radius*2; sip_floorcurve_r = sip_bottom_radius; sip_floorcurve_t = sqrt( (pow((sip_floorcurve_r),2)) - (pow((sip_floorcurve_c/2),2)) ); //DRAIN CONE //used to change slope of floor to prevent the need for support material dcone_scalefactor = sip_bottom_radius/4; dcone_r1 = sip_wick_radius; dcone_r2 = sip_wick_radius+dcone_scalefactor; dcone_h = dcone_scalefactor; //where should the drain cone be placed based on its values //and the values of the shpere it is being placed on dcone_c = dcone_r2*2; dcone_t_r = sqrt( (pow((sip_floorcurve_r),2)) - (pow((dcone_c/2),2)) ); dcone_t = dcone_t_r + dcone_h; //-------------------------------------------------- START yogurtCup_SIP() module yogurtCup_SIP() { difference(){ //add here union() { ////LIP translate([0,0,sip_walls_height]) { cylinder(r=sip_lip_radius, h=sip_lip_thickness); } ////OUTSIDE WALL OF STRAIGHT WALLS translate([0,0,0]) { cylinder(r1=sip_bottom_radius, r2=sip_top_radius, h=sip_walls_height); } ////OUTSIDE WALL OF SPHERE translate([0,0,sip_floorcurve_t]) { sphere(r=sip_floorcurve_r); } ////OUTSIDE WALL OF DRAIN CONE translate([0,0,-dcone_t]) { cylinder(r1=dcone_r1, r2=dcone_r2, h=dcone_h); } } //end add union //take away here union() { ////CLEAN OUT THE ABOVE PART translate([0,0,sip_walls_height]) { cylinder(r=sip_top_radius-sip_wall_thickness, h=sip_walls_height); } ////TOP OF THE WELL translate([0,0,0]) { cylinder(r=(sip_bottom_radius-sip_wall_thickness), r2=(sip_top_radius-sip_wall_thickness), h=sip_walls_height); } ////INSIDE WALL OF SPHERE translate([0,0,sip_floorcurve_t]) { sphere(r=sip_floorcurve_r-sip_floor_thickness); } ////INSIDE WALL OF DRAIN CONE translate([0,0,-dcone_t+sip_floor_thickness]) { cylinder(r1=dcone_r1-sip_floor_thickness, r2=(dcone_r2-sip_floor_thickness), h=dcone_h); } //// HOLE FOR THE WICK translate([0,0,-sip_floorcurve_r-dcone_h]) { cylinder(r=sip_wick_radius, h=(2 + dcone_h)); } } //end sub union } //end diff } //---------------------------------------------------- END yogurtCup_SIP() yogurtCup_SIP();