Source

uniqxstuff / openscad / faucet.scad

/////////////////////////////////////////////////////////////////////////
//                                                                     //
//          DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE                //
//                  Version 2, December 2004                           //
//                                                                     //
// Copyright (C) 2011 Clifford, uniqx                                  //
//  Metalab, 1010 Vienna, Austria                                      //
// Everyone is permitted to copy and distribute verbatim or modified   //
// copies of this license document, and changing it is allowed as long //
// as the name is changed.                                             //
//                                                                     //
//            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE              //
//   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION   //
//                                                                     //
//  0. You just DO WHAT THE FUCK YOU WANT TO.                          //
//                                                                     //
/////////////////////////////////////////////////////////////////////////

r1 = 25;
r2 = 20;
r3 = 13;
r4  = 8/2;

roundings = 5;

cog_count = 20;
cog_height = 1;

h = 50;
o2 = h-18;
o1 = h-40;


/*for(i = [1:cog_count] ){

  rotate([i*360/cog_count,0,0])
  translate([0,r1,0])
  cube([cog_height,1,1]);

}*/

difference() {

        translate([0,0,roundings]){
		minkowski(){

			cylinder(r1 = r1-roundings, r2 = r2-roundings, h = h-(2*roundings), $fn = 8);
			sphere(r=roundings);
		}
	}

	translate([0, 0, o1])
		cylinder(r = r4, h = h);
	translate([0, 0, o2])
		#cylinder(r = r3, h = h);
}