Skip to content

Commit

Permalink
libarea profile and pocket now pass hv feedrate.
Browse files Browse the repository at this point in the history
Warning:  The units may not be correct for your post processor.
Need to check this and find a better way.
  • Loading branch information
sliptonic authored and yorikvanhavre committed May 23, 2016
1 parent 26bef05 commit d5c3043
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
38 changes: 24 additions & 14 deletions src/Mod/Path/PathScripts/PathPocket.py
Expand Up @@ -68,11 +68,15 @@ def __init__(self,obj):
obj.addProperty("App::PropertyFloat", "FinishDepth", "Depth", translate("PathProject","Maximum material removed on final pass."))
#obj.addProperty("App::PropertyFloat", "RetractHeight", "Depth", translate("PathProject","The height desired to retract tool when path is finished"))

# #Feed Properties
# obj.addProperty("App::PropertyFloatConstraint", "VertFeed", "Feed",translate("Vert Feed","Feed rate for vertical moves in Z"))
# obj.VertFeed = (0.0, 0.0, 100000.0, 1.0)
# obj.addProperty("App::PropertyFloatConstraint", "HorizFeed", "Feed",translate("Horiz Feed","Feed rate for horizontal moves"))
# obj.HorizFeed = (0.0, 0.0, 100000.0, 1.0)

#Feed Properties
obj.addProperty("App::PropertyFloatConstraint", "VertFeed", "Feed",translate("Vert Feed","Feed rate for vertical moves in Z"))
obj.VertFeed = (0.0, 0.0, 100000.0, 1.0)
obj.addProperty("App::PropertyFloatConstraint", "HorizFeed", "Feed",translate("Horiz Feed","Feed rate for horizontal moves"))
obj.HorizFeed = (0.0, 0.0, 100000.0, 1.0)
obj.addProperty("App::PropertySpeed", "VertFeed", "Feed",translate("Path","Feed rate for vertical moves in Z"))
obj.addProperty("App::PropertySpeed", "HorizFeed", "Feed",translate("Path","Feed rate for horizontal moves"))

#Pocket Properties
obj.addProperty("App::PropertyEnumeration", "CutMode", "Pocket",translate("PathProject", "The direction that the toolpath should go around the part ClockWise CW or CounterClockWise CCW"))
Expand All @@ -95,10 +99,21 @@ def __init__(self,obj):
obj.HelixSize = (0.0, 0.01, 100.0, 0.5)
obj.addProperty("App::PropertyFloatConstraint", "RampAngle", "Entry", translate("PathProject","The Angle of the ramp entry."))
obj.RampAngle = (0.0, 0.01, 100.0, 0.5)



obj.Proxy = self

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
else:
obj.setEditorMode('HelixSize',2) #make this hidden
obj.setEditorMode('RampAngle',2) #make this hidden
obj.setEditorMode('RampSize',2) #make this hidden

def __getstate__(self):
return None

Expand Down Expand Up @@ -140,6 +155,8 @@ def buildpathlibarea(self, obj, a):
cut_mode = obj.CutMode

PathAreaUtils.output('mem')
PathAreaUtils.feedrate_hv(obj.HorizFeed.Value, obj.VertFeed.Value)


print "a," + str(self.radius) + "," + str(extraoffset) + "," + str(stepover) + ",depthparams, " + str(from_center) + "," + str(keep_tool_down) + "," + str(use_zig_zag) + "," + str(zig_angle) + "," + str(zig_unidirectional) + "," + str(start_point) + "," + str(cut_mode)

Expand Down Expand Up @@ -526,14 +543,7 @@ def execute(self,obj):

a.Reorder()
output += self.buildpathlibarea(obj, a)
if obj.UseEntry:
obj.setEditorMode('HelixSize',0) #make this visible
obj.setEditorMode('RampAngle',0) #make this visible
obj.setEditorMode('RampSize',0) #make this visible
else:
obj.setEditorMode('HelixSize',2) #make this hidden
obj.setEditorMode('RampAngle',2) #make this hidden
obj.setEditorMode('RampSize',2) #make this hidden


if obj.Active:
path = Path.Path(output)
Expand Down
2 changes: 2 additions & 0 deletions src/Mod/Path/PathScripts/PathProfile.py
Expand Up @@ -222,6 +222,8 @@ def execute(self,obj):
return

PathKurveUtils.output('mem')
PathKurveUtils.feedrate_hv(obj.HorizFeed.Value, obj.VertFeed.Value)

output = ""
curve = PathKurveUtils.makeAreaCurve(edgelist,direction,startpoint, endpoint)

Expand Down

0 comments on commit d5c3043

Please sign in to comment.