public function drawCircle($x, $y, $z, $radius, $motion = 'G2', $plane = 'G17')
	{			
		if ($plane == 'G17') {
			
			$of = $x - $radius;
			
			$this->setCode("(circle)");
			$this->setCode("G0 X{$of} Y{$y}");
			$this->setCode("G1 Z{$z} (axis spindle start point)");
			
			// TODO Tool size  ...
			// TODO Cutting spindle movement ...
			
			$this->setCode("{$plane} {$motion} X{$of} Y{$y} I{$radius} J0.00 Z{$z}");
			$this->setCode("G0 Z{$this->spindleAxisStartPosition} (axis spindle start position)");
			$this->setCode("(/circle)\n");
		}
		
		if ($plane == 'G18') {
			// G18 is disabled
			return;
		}
		
		if ($plane == 'G19') {
			// G19 is disabled
			return;
		}
		
		return $this;
	}
public function drawCircle($x, $y, $z, $radius, $motion = 'G2', $plane = 'G17')
	{			
		if ($plane == 'G17') {
			
			$of = $x - $radius;
			
			$this->setCode("(circle)");
			$this->setCode("G0 X{$of} Y{$y}");
			$this->setCode("G1 Z{$z} (axis spindle start point)");
			
			// TODO Tool size  ...
			// TODO Cutting spindle movement ...
			
			$this->setCode("{$plane} {$motion} X{$of} Y{$y} I{$radius} J0.00 Z{$z}");
			$this->setCode("G0 Z{$this->spindleAxisStartPosition} (axis spindle start position)");
			$this->setCode("(/circle)\n");
		}
		
		if ($plane == 'G18') {
			// G18 is disabled
			return;
		}
		
		if ($plane == 'G19') {
			// G19 is disabled
			return;
		}
		
		return $this;
	}
public function drawCircle ( $ x , $ y , $ z , $ radius , $ motion = 'G2' , $ plane = 'G17' ) { if ( $ plane == 'G17' ) { $ of = $ x - $ radius ; $ this -> setCode ( "(circle)" ) ; $ this -> setCode ( "G0 X{$of} Y{$y}" ) ; $ this -> setCode ( "G1 Z{$z} (axis spindle start point)" ) ; // TODO Tool size  ... // TODO Cutting spindle movement ... $ this -> setCode ( "{$plane} {$motion} X{$of} Y{$y} I{$radius} J0.00 Z{$z}" ) ; $ this -> setCode ( "G0 Z{$this->spindleAxisStartPosition} (axis spindle start position)" ) ; $ this -> setCode ( "(/circle)\n" ) ; } if ( $ plane == 'G18' ) { // G18 is disabled return ; } if ( $ plane == 'G19' ) { // G19 is disabled return ; } return $ this ; }
Draw a circle on a XY plane
With a certain motion clockwise or anticlockwise for conventional or climb milling

TODO Plane selection
G17	XY Plane
G18	XZ Plane
G19  YZ Plane

Motion control
G2	Clockwise Arcs
G3	Counter-Clockwise Arcs

@param float $x
@param float $y
@param float $z
@param float $radius
@param string $motion
@param string $plane
@return boolean
Draw a circle on a XY plane With a certain motion clockwise or anticlockwise for conventional or climb milling