bugfix: ws at start of str(Line())

This commit is contained in:
Peter Boin 2017-07-12 16:53:43 +10:00
parent 436ef53398
commit 2c0de02b6d
3 changed files with 5 additions and 23 deletions

View File

@ -76,5 +76,10 @@ class Block(object):
key=k
))
def __bool__(self):
return bool(self.words)
__nonzero__ = __bool__ # python < 3 compatability
def __str__(self):
return ' '.join(str(x) for x in (self.gcodes + self.modal_params))

View File

@ -244,25 +244,6 @@ def linearize_arc(arc_gcode, start_pos, plane=None, method_class=None,
# - helical_start distance along plane.normal of arc start
# - helical_disp distance along plane.normal of arc end
#print((
# "linearize_arc params\n"
# " - arc_p_start {arc_p_start}\n"
# " - arc_p_end {arc_p_end}\n"
# " - arc_p_center {arc_p_center}\n"
# " - arc_radius {arc_radius}\n"
# " - arc_angle {arc_angle:.4f} ({arc_angle_deg:.3f} deg)\n"
# " - helical_start {helical_start}\n"
# " - helical_end {helical_end}\n"
#).format(
# arc_p_start=arc_p_start,
# arc_p_end=arc_p_end,
# arc_p_center=arc_p_center,
# arc_radius=arc_radius,
# arc_angle=arc_angle, arc_angle_deg=arc_angle * (180/pi),
# helical_start=helical_start,
# helical_end=helical_end,
#))
method_class_params = {
'max_error': max_error,
'plane_normal': plane.normal,

View File

@ -157,7 +157,3 @@ for line_str in args.infile[0].readlines():
else:
print(str(line))
machine.process_block(line.block)
#print("%r, %s" % (sorted(line.block.gcodes), line.block.modal_params))