Fixed problem with rapid and feedrate.

This commit is contained in:
brad 2016-03-04 15:28:18 -06:00 committed by Yorik van Havre
parent d5c3043e73
commit 0ef51a8426
3 changed files with 7 additions and 8 deletions

View File

@ -121,8 +121,6 @@ def makeAreaCurve(edges,direction,startpt=None,endpt=None):
curveobj.Reverse() curveobj.Reverse()
elif not curveobj.IsClockwise() and direction == 'CW': elif not curveobj.IsClockwise() and direction == 'CW':
curveobj.Reverse() curveobj.Reverse()
print "direction is clockwise: " + str(curveobj.IsClockwise())
print "numvertices: " + str(curveobj.getNumVertices())
return curveobj return curveobj

View File

@ -105,7 +105,6 @@ class ObjectPocket:
def onChanged(self,obj,prop): def onChanged(self,obj,prop):
if prop == "UseEntry": if prop == "UseEntry":
if obj.UseEntry: if obj.UseEntry:
print "made it"
obj.setEditorMode('HelixSize',0) #make this visible obj.setEditorMode('HelixSize',0) #make this visible
obj.setEditorMode('RampAngle',0) #make this visible obj.setEditorMode('RampAngle',0) #make this visible
obj.setEditorMode('RampSize',0) #make this visible obj.setEditorMode('RampSize',0) #make this visible
@ -143,7 +142,7 @@ class ObjectPocket:
depthparams = depth_params (obj.ClearanceHeight, obj.SafeHeight, obj.StartDepth, obj.StepDown, obj.FinishDepth, obj.FinalDepth) depthparams = depth_params (obj.ClearanceHeight, obj.SafeHeight, obj.StartDepth, obj.StepDown, obj.FinishDepth, obj.FinalDepth)
horizfeed = obj.HorizFeed horizfeed = obj.HorizFeed.Value
extraoffset = obj.MaterialAllowance extraoffset = obj.MaterialAllowance
stepover = obj.StepOver stepover = obj.StepOver
use_zig_zag = obj.UseZigZag use_zig_zag = obj.UseZigZag
@ -154,6 +153,7 @@ class ObjectPocket:
start_point = None start_point = None
cut_mode = obj.CutMode cut_mode = obj.CutMode
PathAreaUtils.flush_nc()
PathAreaUtils.output('mem') PathAreaUtils.output('mem')
PathAreaUtils.feedrate_hv(obj.HorizFeed.Value, obj.VertFeed.Value) PathAreaUtils.feedrate_hv(obj.HorizFeed.Value, obj.VertFeed.Value)
@ -192,9 +192,9 @@ class ObjectPocket:
global feedxy global feedxy
retstr = "G01 F" retstr = "G01 F"
if(x == None) and (y == None): if(x == None) and (y == None):
retstr += str("%.4f" % obj.HorizFeed) retstr += str("%.4f" % obj.HorizFeed.Value)
else: else:
retstr += str("%.4f" % obj.VertFeed) retstr += str("%.4f" % obj.VertFeed.Value)
if (x != None) or (y != None) or (z != None): if (x != None) or (y != None) or (z != None):
if (x != None): if (x != None):
@ -223,7 +223,7 @@ class ObjectPocket:
retstr += "G03 F" retstr += "G03 F"
else: else:
retstr += "G02 F" retstr += "G02 F"
retstr += str(obj.HorizFeed) retstr += str(obj.HorizFeed.Value)
#End location #End location
retstr += " X" + str("%.4f" % ex) + " Y" + str("%.4f" % ey) retstr += " X" + str("%.4f" % ex) + " Y" + str("%.4f" % ey)

View File

@ -225,6 +225,7 @@ class ObjectProfile:
PathKurveUtils.feedrate_hv(obj.HorizFeed.Value, obj.VertFeed.Value) PathKurveUtils.feedrate_hv(obj.HorizFeed.Value, obj.VertFeed.Value)
output = "" output = ""
output += "G0 Z" + str(clearance)
curve = PathKurveUtils.makeAreaCurve(edgelist,direction,startpoint, endpoint) curve = PathKurveUtils.makeAreaCurve(edgelist,direction,startpoint, endpoint)
'''The following line uses a profile function written for use with FreeCAD. It's clean but incomplete. It doesn't handle '''The following line uses a profile function written for use with FreeCAD. It's clean but incomplete. It doesn't handle