Skip to content

Commit

Permalink
Merge pull request #2901 from Schildkroet/master
Browse files Browse the repository at this point in the history
[Path] Added new feed rate (Ramp Feed Rate) option in PathDressupRampEntry.py
  • Loading branch information
sliptonic committed Jan 18, 2020
2 parents 099d06a + c9023a0 commit 2064410
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Mod/Path/PathScripts/PathDressupRampEntry.py
Expand Up @@ -52,11 +52,11 @@ def __init__(self, obj):
obj.addProperty("App::PropertyAngle", "Angle", "Path", QtCore.QT_TRANSLATE_NOOP("Path_DressupRampEntry", "Angle of ramp."))
obj.addProperty("App::PropertyEnumeration", "Method", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property", "Ramping Method"))
obj.addProperty("App::PropertyEnumeration", "RampFeedRate", "FeedRate", QtCore.QT_TRANSLATE_NOOP("App::Property", "Which feed rate to use for ramping"))
obj.addProperty("App::PropertySpeed", "CustomFeedRate", "FeedRate", QtCore.QT_TRANSLATE_NOOP("App::Property", "Custom feedrate"))
obj.addProperty("App::PropertySpeed", "CustomFeedRate", "FeedRate", QtCore.QT_TRANSLATE_NOOP("App::Property", "Custom feed rate"))
obj.addProperty("App::PropertyBool", "UseStartDepth", "StartDepth", QtCore.QT_TRANSLATE_NOOP("App::Property", "Should the dressup ignore motion commands above DressupStartDepth"))
obj.addProperty("App::PropertyDistance", "DressupStartDepth", "StartDepth", QtCore.QT_TRANSLATE_NOOP("App::Property", "The depth where the ramp dressup is enabled. Above this ramps are not generated, but motion commands are passed through as is."))
obj.Method = ['RampMethod1', 'RampMethod2', 'RampMethod3', 'Helix']
obj.RampFeedRate = ['Horizontal Feed Rate', 'Vertical Feed Rate', 'Custom']
obj.RampFeedRate = ['Horizontal Feed Rate', 'Vertical Feed Rate', 'Ramp Feed Rate', 'Custom']
obj.Proxy = self
self.setEditorProperties(obj)

Expand Down Expand Up @@ -582,12 +582,16 @@ def createCommands(self, obj, edges):

horizFeed = tc.HorizFeed.Value
vertFeed = tc.VertFeed.Value

if obj.RampFeedRate == "Horizontal Feed Rate":
rampFeed = tc.HorizFeed.Value
elif obj.RampFeedRate == "Vertical Feed Rate":
rampFeed = tc.VertFeed.Value
elif obj.RampFeedRate == 'Ramp Feed Rate':
rampFeed = math.sqrt(pow(tc.VertFeed.Value, 2) + pow(tc.HorizFeed.Value, 2))
else:
rampFeed = obj.CustomFeedRate.Value

horizRapid = tc.HorizRapid.Value
vertRapid = tc.VertRapid.Value

Expand Down

0 comments on commit 2064410

Please sign in to comment.