From 0ef51a842655a8ca05b074ac5a5c87f165a6b276 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 4 Mar 2016 15:28:18 -0600 Subject: [PATCH] Fixed problem with rapid and feedrate. --- src/Mod/Path/PathScripts/PathKurveUtils.py | 2 -- src/Mod/Path/PathScripts/PathPocket.py | 12 ++++++------ src/Mod/Path/PathScripts/PathProfile.py | 1 + 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathKurveUtils.py b/src/Mod/Path/PathScripts/PathKurveUtils.py index f65c4d6b5..dacf6c120 100644 --- a/src/Mod/Path/PathScripts/PathKurveUtils.py +++ b/src/Mod/Path/PathScripts/PathKurveUtils.py @@ -121,8 +121,6 @@ def makeAreaCurve(edges,direction,startpt=None,endpt=None): curveobj.Reverse() elif not curveobj.IsClockwise() and direction == 'CW': curveobj.Reverse() - print "direction is clockwise: " + str(curveobj.IsClockwise()) - print "numvertices: " + str(curveobj.getNumVertices()) return curveobj diff --git a/src/Mod/Path/PathScripts/PathPocket.py b/src/Mod/Path/PathScripts/PathPocket.py index 5caf748aa..a41610ddf 100644 --- a/src/Mod/Path/PathScripts/PathPocket.py +++ b/src/Mod/Path/PathScripts/PathPocket.py @@ -105,7 +105,6 @@ class ObjectPocket: def onChanged(self,obj,prop): if prop == "UseEntry": if obj.UseEntry: - print "made it" obj.setEditorMode('HelixSize',0) #make this visible obj.setEditorMode('RampAngle',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) - horizfeed = obj.HorizFeed + horizfeed = obj.HorizFeed.Value extraoffset = obj.MaterialAllowance stepover = obj.StepOver use_zig_zag = obj.UseZigZag @@ -153,7 +152,8 @@ class ObjectPocket: zig_unidirectional = obj.ZigUnidirectional start_point = None cut_mode = obj.CutMode - + + PathAreaUtils.flush_nc() PathAreaUtils.output('mem') PathAreaUtils.feedrate_hv(obj.HorizFeed.Value, obj.VertFeed.Value) @@ -192,9 +192,9 @@ class ObjectPocket: global feedxy retstr = "G01 F" if(x == None) and (y == None): - retstr += str("%.4f" % obj.HorizFeed) + retstr += str("%.4f" % obj.HorizFeed.Value) else: - retstr += str("%.4f" % obj.VertFeed) + retstr += str("%.4f" % obj.VertFeed.Value) if (x != None) or (y != None) or (z != None): if (x != None): @@ -223,7 +223,7 @@ class ObjectPocket: retstr += "G03 F" else: retstr += "G02 F" - retstr += str(obj.HorizFeed) + retstr += str(obj.HorizFeed.Value) #End location retstr += " X" + str("%.4f" % ex) + " Y" + str("%.4f" % ey) diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py index d6320a2e4..ebc290b81 100644 --- a/src/Mod/Path/PathScripts/PathProfile.py +++ b/src/Mod/Path/PathScripts/PathProfile.py @@ -225,6 +225,7 @@ class ObjectProfile: PathKurveUtils.feedrate_hv(obj.HorizFeed.Value, obj.VertFeed.Value) output = "" + output += "G0 Z" + str(clearance) 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