update lead in/out to use feed rate from tool controller
This commit is contained in:
@@ -175,64 +175,6 @@
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_feed_rate_percent">
|
||||
<property name="text">
|
||||
<string>Entrance Feed Rate Percent</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="dspFeedRatePercentIn">
|
||||
<property name="toolTip">
|
||||
<string>Feed rate to use when entering a cut, as a percentage of the normal feed rate.</string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>5.000000000000000</double>
|
||||
</property>
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_feed_rate_percent">
|
||||
<property name="text">
|
||||
<string>Exit Feed Rate Percent</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="dspFeedRatePercentOut">
|
||||
<property name="toolTip">
|
||||
<string>Feed rate to use when exiting a cut, as a percentage of the normal feed rate.</string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>5.000000000000000</double>
|
||||
</property>
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="chkRapidPlunge">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
|
||||
@@ -162,24 +162,6 @@ class ObjectDressup:
|
||||
"Path Lead-out",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Move end point"),
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyInteger",
|
||||
"FeedRatePercentIn",
|
||||
"Path",
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property",
|
||||
"Percentage modifier to apply to feed rate while entering the cut",
|
||||
),
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyInteger",
|
||||
"FeedRatePercentOut",
|
||||
"Path",
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property",
|
||||
"Percentage modifier to apply to feed rate while exiting the cut",
|
||||
),
|
||||
)
|
||||
obj.Proxy = self
|
||||
|
||||
def dumps(self):
|
||||
@@ -197,8 +179,6 @@ class ObjectDressup:
|
||||
obj.LeadOut = True
|
||||
obj.AngleIn = 90
|
||||
obj.AngleOut = 90
|
||||
obj.FeedRatePercentIn = 100
|
||||
obj.FeedRatePercentOut = 100
|
||||
obj.InvertIn = False
|
||||
obj.InvertOut = False
|
||||
obj.RapidPlunge = False
|
||||
@@ -273,8 +253,8 @@ class ObjectDressup:
|
||||
|
||||
self.horizFeed = self.toolController.HorizFeed.Value
|
||||
self.vertFeed = self.toolController.VertFeed.Value
|
||||
self.entranceFeed = self.horizFeed * obj.FeedRatePercentIn / 100
|
||||
self.exitFeed = self.horizFeed * obj.FeedRatePercentOut / 100
|
||||
self.entranceFeed = self.toolController.LeadInFeed.Value
|
||||
self.exitFeed = self.toolController.LeadOutFeed.Value
|
||||
|
||||
obj.Path = self.generateLeadInOutCurve(obj)
|
||||
|
||||
@@ -441,29 +421,6 @@ class ObjectDressup:
|
||||
obj.setEditorMode(k + "In", 2 if obj.StyleIn in v else 0)
|
||||
obj.setEditorMode(k + "Out", 2 if obj.StyleOut in v else 0)
|
||||
|
||||
if not hasattr(obj, "FeedRatePercentIn"):
|
||||
obj.addProperty(
|
||||
"App::PropertyInteger",
|
||||
"FeedRatePercentIn",
|
||||
"Path",
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property",
|
||||
"Percentage modifier to apply to feed rate while entering the cut",
|
||||
),
|
||||
)
|
||||
obj.FeedRatePercentIn = 100
|
||||
if not hasattr(obj, "FeedRatePercentOut"):
|
||||
obj.addProperty(
|
||||
"App::PropertyInteger",
|
||||
"FeedRatePercentOut",
|
||||
"Path",
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property",
|
||||
"Percentage modifier to apply to feed rate while exiting the cut",
|
||||
),
|
||||
)
|
||||
obj.FeedRatePercentOut = 100
|
||||
|
||||
# Get direction for lead-in/lead-out in XY plane
|
||||
def getLeadDir(self, obj, invert=False):
|
||||
output = math.pi / 2
|
||||
@@ -1245,8 +1202,6 @@ class TaskDressupLeadInOut(SimpleEditPanel):
|
||||
def setupSpinBoxes(self):
|
||||
self.connectWidget("InvertIn", self.form.chkInvertDirectionIn)
|
||||
self.connectWidget("InvertOut", self.form.chkInvertDirectionOut)
|
||||
self.connectWidget("FeedRatePercentIn", self.form.dspFeedRatePercentIn)
|
||||
self.connectWidget("FeedRatePercentOut", self.form.dspFeedRatePercentOut)
|
||||
self.connectWidget("PercentageRadiusIn", self.form.dspPercentageRadiusIn)
|
||||
self.connectWidget("PercentageRadiusOut", self.form.dspPercentageRadiusOut)
|
||||
self.connectWidget("StyleIn", self.form.cboStyleIn)
|
||||
|
||||
@@ -106,6 +106,31 @@ class ToolController:
|
||||
"Rapid",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Rapid rate for horizontal moves"),
|
||||
)
|
||||
|
||||
obj.addProperty(
|
||||
"App::PropertySpeed",
|
||||
"RampFeed",
|
||||
"Feed",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Feed rate for ramp moves"),
|
||||
)
|
||||
obj.setExpression("RampFeed", "HorizFeed")
|
||||
|
||||
obj.addProperty(
|
||||
"App::PropertySpeed",
|
||||
"LeadInFeed",
|
||||
"Feed",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Feed rate for lead-in moves"),
|
||||
)
|
||||
obj.setExpression("LeadInFeed", "HorizFeed")
|
||||
|
||||
obj.addProperty(
|
||||
"App::PropertySpeed",
|
||||
"LeadOutFeed",
|
||||
"Feed",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Feed rate for lead-out moves"),
|
||||
)
|
||||
obj.setExpression("LeadOutFeed", "HorizFeed")
|
||||
|
||||
obj.setEditorMode("Placement", 2)
|
||||
|
||||
for n in self.propertyEnumerations():
|
||||
@@ -166,6 +191,40 @@ class ToolController:
|
||||
|
||||
obj.setEditorMode("Placement", 2)
|
||||
|
||||
needsRecompute = False
|
||||
if not hasattr(obj, "RampFeed"):
|
||||
obj.addProperty(
|
||||
"App::PropertySpeed",
|
||||
"RampFeed",
|
||||
"Feed",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Feed rate for ramp moves"),
|
||||
)
|
||||
obj.setExpression("RampFeed", "HorizFeed")
|
||||
needsRecompute = True
|
||||
|
||||
if not hasattr(obj, "LeadInFeed"):
|
||||
obj.addProperty(
|
||||
"App::PropertySpeed",
|
||||
"LeadInFeed",
|
||||
"Feed",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Feed rate for lead-in moves"),
|
||||
)
|
||||
obj.setExpression("LeadInFeed", "HorizFeed")
|
||||
needsRecompute = True
|
||||
|
||||
if not hasattr(obj, "LeadOutFeed"):
|
||||
obj.addProperty(
|
||||
"App::PropertySpeed",
|
||||
"LeadOutFeed",
|
||||
"Feed",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Feed rate for lead-out moves"),
|
||||
)
|
||||
obj.setExpression("LeadOutFeed", "HorizFeed")
|
||||
needsRecompute = True
|
||||
|
||||
if needsRecompute:
|
||||
obj.recompute()
|
||||
|
||||
def onDelete(self, obj, arg2=None):
|
||||
if hasattr(obj.Tool, "InList") and len(obj.Tool.InList) == 1:
|
||||
if hasattr(obj.Tool.Proxy, "onDelete"):
|
||||
|
||||
Reference in New Issue
Block a user