mirror of
https://git.mirrors.martin98.com/https://github.com/petaflot/pygcode
synced 2025-06-04 11:25:20 +08:00
bugfix: ws at start of str(Line())
This commit is contained in:
parent
436ef53398
commit
2c0de02b6d
@ -76,5 +76,10 @@ class Block(object):
|
|||||||
key=k
|
key=k
|
||||||
))
|
))
|
||||||
|
|
||||||
|
def __bool__(self):
|
||||||
|
return bool(self.words)
|
||||||
|
|
||||||
|
__nonzero__ = __bool__ # python < 3 compatability
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return ' '.join(str(x) for x in (self.gcodes + self.modal_params))
|
return ' '.join(str(x) for x in (self.gcodes + self.modal_params))
|
||||||
|
@ -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_start distance along plane.normal of arc start
|
||||||
# - helical_disp distance along plane.normal of arc end
|
# - 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 = {
|
method_class_params = {
|
||||||
'max_error': max_error,
|
'max_error': max_error,
|
||||||
'plane_normal': plane.normal,
|
'plane_normal': plane.normal,
|
||||||
|
@ -157,7 +157,3 @@ for line_str in args.infile[0].readlines():
|
|||||||
else:
|
else:
|
||||||
print(str(line))
|
print(str(line))
|
||||||
machine.process_block(line.block)
|
machine.process_block(line.block)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#print("%r, %s" % (sorted(line.block.gcodes), line.block.modal_params))
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user