PATH: post processor tweaks and loop select.

rename generic_post.py: This is actually a post specific to a machine.  The generic name is confusing
fix test case. Contour has no plunge angle
scrubbing postprocessors for python 2 style prints
Keep loop select usable when task panel is open.
This commit is contained in:
sliptonic
2017-01-19 11:16:44 -06:00
committed by wmayer
parent 81726f7db9
commit fbe0ded7cf
13 changed files with 543 additions and 529 deletions

View File

@@ -72,7 +72,7 @@ def setjog():
return ""
def addheader():
return [ "PA;PA;" ] # absolute positioning
return [ "PA;PA;" ] # absolute positioning
def addfooter():
return []
@@ -103,7 +103,7 @@ def feed(x=None, y=None, z=None, state={}):
pass # XXX: is this used?
return c
def jog(x=None, y=None, z=None, state={}):
def jog(x=None, y=None, z=None, state={}):
c = []
if x is not None and y is not None:
x, y = float(x), float(y)
@@ -137,7 +137,6 @@ def xyarc(args, state):
# TODO: consider direction
#print('p = Part.ArcOfCircle(Part.Circle(FreeCAD.Vector(%f, %f), FreeCAD.Vector(0, 0, 1), %f), %f, %f)' % (center.x, center.y, radius, p0, p1))
for p in points:
#print('p', p.x, p.y)
c += feed(p.x, p.y, state['Z'], state)
return c
@@ -216,18 +215,18 @@ def convertgcode(cmd, args, state):
def parse(inputstring):
"parse(inputstring): returns a parsed output string"
state = { 'X': 0.0, 'Y': 0.0, 'Z': 0.0, 'XYspeed': -1.0, 'Zspeed': -1.0 }
output = []
# header
output += addheader()
output += motoron()
output += speed(2.0, 1.0, state) # defaults
# TODO: respect clearance height
# treat the input line by line
lines = inputstring.split("\n")
for line in lines: