(self,context)
Emit gcode for drawing arc
Emit gcode for drawing arc
Emit gcode for drawing arc
def get_gcode(self,context):
		"Emit gcode for drawing arc"
		start = self.find_point(0)
		end = self.find_point(1)
		delta = self.end_angle - self.start_angle

		if (delta < 0):
			arc_code = "G3"
		else:
			arc_code = "G3"
		arc_code = arc_code + " X%.2f Y%.2f I%.2f J%.2f F%.2f" % (end[0], end[1], self.center[0] - start[0], self.center[1] - start[1], context.xy_feedrate)

		context.codes.append("(" + str(self) + ")")
		context.go_to_point(start[0],start[1])
		context.last = end
		context.start()
		context.codes.append(arc_code)
		context.stop()
		context.codes.append("")
def get_gcode ( self , context ) : start = self . find_point ( 0 ) end = self . find_point ( 1 ) delta = self . end_angle - self . start_angle if ( delta < 0 ) : arc_code = "G3" else : arc_code = "G3" arc_code = arc_code + " X%.2f Y%.2f I%.2f J%.2f F%.2f" % ( end [ 0 ] , end [ 1 ] , self . center [ 0 ] - start [ 0 ] , self . center [ 1 ] - start [ 1 ] , context . xy_feedrate ) context . codes . append ( "(" + str ( self ) + ")" ) context . go_to_point ( start [ 0 ] , start [ 1 ] ) context . last = end context . start ( ) context . codes . append ( arc_code ) context . stop ( ) context . codes . append ( "" )