def arc(x, y, radius, startAngle, endAngle, resolution):
 poly = toolpath.Polygon()
 if debug:
  print 'Plotting arc at', x, y, 'from', startAngle, '(', math.degrees(startAngle), ') to', endAngle, '(', math.degrees(endAngle), ')'
 (startAngle, endAngle) = (math.degrees(startAngle), math.degrees(endAngle))
 circumference = ((float(2) * math.pi) * float(radius))
 angleDiv = (float(360) / float((circumference * resolution)))
 (lastX, lastY) = _calcCircle(startAngle, radius)
 if (startAngle > endAngle):
  endAngle += 360
 for theta in _frange(startAngle, (endAngle + angleDiv), angleDiv):
  (cx, cy) = _calcCircle(theta, radius)
  poly.addPoint(toolpath.Point((x + cx), (y + cy)))
 return poly

def arc ( x , y , radius , startAngle , endAngle , resolution ) : poly = toolpath . Polygon ( ) if debug : print 'Plotting arc at' , x , y , 'from' , startAngle , '(' , math . degrees ( startAngle ) , ') to' , endAngle , '(' , math . degrees ( endAngle ) , ')' ( startAngle , endAngle ) = ( math . degrees ( startAngle ) , math . degrees ( endAngle ) ) circumference = ( ( float ( 2 ) * math . pi ) * float ( radius ) ) angleDiv = ( float ( 360 ) / float ( ( circumference * resolution ) ) ) ( lastX , lastY ) = _calcCircle ( startAngle , radius ) if ( startAngle > endAngle ) : endAngle += 360 for theta in _frange ( startAngle , ( endAngle + angleDiv ) , angleDiv ) : ( cx , cy ) = _calcCircle ( theta , radius ) poly . addPoint ( toolpath . Point ( ( x + cx ) , ( y + cy ) ) ) return poly
returns polygon an arc with x .