


// SUPPORT MODULE WORKS LIKE THIS:

// provide bottom point coordinates and the top point coordinates

// it connects the two points with a cylindrical beam and puts cones on the tips of the beam.

// you can change the height of these tips by assigning a tip_h value. default is 0.3, which is three 0.1mm layers.

// eg support(bot_pt,top_pt, tip_h = 0.8, ... );

// you can change the diameter of these tips by assigning a tip_dia value. default is 0.36 because that is just larger than my printer's 0.3mm nozzle

// you can change the diameter of the beam by assigning a dia value. default is 0.6.

// if you want the bottom of the beam to be supported by a "pedestal" type base (a wider cylinder), assigning a value for the pedestal diameter to the variable 'base'

// eg, support(bot_pt, top_pt, base = 3, ...);

// base height defaults to 2 but can be changed by assigning a value to base_h


// examples:

support([-2.4,1.3,7.7],[-3.3,-0.3,14]); // right arm

support([4.3,0.2,1.5],[3.9,0.2,9.78]); // left arm

support([0.4,-1.5,17.85],[1,-1.7,18.366]); // chin



module support(bot_pt,top_pt,dia=0.6,tip_dia=0.36,tip_h=0.3,base=0,base_h=2)
{
	if (base>0)
	{
		translate(top_pt) cylinder(d=base,h=base_h, $fn=72);
	}
	
	hull()
	{
		translate(top_pt) cylinder(d1=dia, d2=tip_dia, $fn=72, h = tip_h);
	
		translate(bot_pt) cylinder(d1=tip_dia, d2=dia, h= tip_h, $fn=72);
	}
}