def circle(x, y, radius, resolution, fillDensity=False):
 poly = toolpath.Polygon()
 if fillDensity:
  numFills = int((float(fillDensity) * float(radius)))
 else:
  numFills = 1
 for d in range(1, (numFills + 1)):
  r = ((float(d) / float(numFills)) * float(radius))
  if debug:
   print 'using r', r, 'mm'
  poly.addPolygon(arc(x, y, r, math.radians(0), math.radians(360), resolution))
 return poly

def circle ( x , y , radius , resolution , fillDensity = False ) : poly = toolpath . Polygon ( ) if fillDensity : numFills = int ( ( float ( fillDensity ) * float ( radius ) ) ) else : numFills = 1 for d in range ( 1 , ( numFills + 1 ) ) : r = ( ( float ( d ) / float ( numFills ) ) * float ( radius ) ) if debug : print 'using r' , r , 'mm' poly . addPolygon ( arc ( x , y , r , math . radians ( 0 ) , math . radians ( 360 ) , resolution ) ) return poly
generate coordinates of pixels within circle .