[CAM] Add feed rate percent to lead in/out dressup
This commit is contained in:
@@ -175,6 +175,35 @@
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_feed_rate_percent">
|
||||
<property name="text">
|
||||
<string>Feed Rate Percent</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="dspFeedRatePercent">
|
||||
<property name="toolTip">
|
||||
<string>Horizontal feed rate during entrances and exits, 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>10.000000000000000</double>
|
||||
</property>
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chkRapidPlunge">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
|
||||
@@ -162,6 +162,15 @@ class ObjectDressup:
|
||||
"Path Lead-out",
|
||||
QT_TRANSLATE_NOOP("App::Property", "Move end point"),
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyInteger",
|
||||
"FeedRatePercent",
|
||||
"Path",
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property",
|
||||
"Percentage modifier to apply to feed rate while entering and exiting",
|
||||
),
|
||||
)
|
||||
obj.Proxy = self
|
||||
|
||||
def dumps(self):
|
||||
@@ -179,6 +188,7 @@ class ObjectDressup:
|
||||
obj.LeadOut = True
|
||||
obj.AngleIn = 90
|
||||
obj.AngleOut = 90
|
||||
obj.FeedRatePercent = 100
|
||||
obj.InvertIn = False
|
||||
obj.InvertOut = False
|
||||
obj.RapidPlunge = False
|
||||
@@ -251,7 +261,7 @@ class ObjectDressup:
|
||||
)
|
||||
return
|
||||
|
||||
self.horizFeed = self.toolController.HorizFeed.Value
|
||||
self.horizFeed = self.toolController.HorizFeed.Value * obj.FeedRatePercent / 100
|
||||
self.vertFeed = self.toolController.VertFeed.Value
|
||||
|
||||
obj.Path = self.generateLeadInOutCurve(obj)
|
||||
@@ -419,6 +429,18 @@ 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, "FeedRatePercent"):
|
||||
obj.addProperty(
|
||||
"App::PropertyInteger",
|
||||
"FeedRatePercent",
|
||||
"Path",
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property",
|
||||
"Percentage modifier to apply to feed rate while entering and exiting",
|
||||
),
|
||||
)
|
||||
obj.FeedRatePercent = 100
|
||||
|
||||
# Get direction for lead-in/lead-out in XY plane
|
||||
def getLeadDir(self, obj, invert=False):
|
||||
output = math.pi / 2
|
||||
@@ -1188,6 +1210,9 @@ class TaskDressupLeadInOut(SimpleEditPanel):
|
||||
def setupSpinBoxes(self):
|
||||
self.connectWidget("InvertIn", self.form.chkInvertDirectionIn)
|
||||
self.connectWidget("InvertOut", self.form.chkInvertDirectionOut)
|
||||
self.connectWidget("FeedRatePercent", self.form.dspFeedRatePercent)
|
||||
self.connectWidget("PercentageRadiusIn", self.form.dspPercentageRadiusIn)
|
||||
self.connectWidget("PercentageRadiusOut", self.form.dspPercentageRadiusOut)
|
||||
self.connectWidget("StyleIn", self.form.cboStyleIn)
|
||||
self.connectWidget("StyleOut", self.form.cboStyleOut)
|
||||
self.radiusIn = PathGuiUtil.QuantitySpinBox(self.form.dspRadiusIn, self.obj, "RadiusIn")
|
||||
|
||||
@@ -188,7 +188,7 @@ class ObjectDressup:
|
||||
QT_TRANSLATE_NOOP("App::Property", "Which feed rate to use for ramping"),
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyPercent",
|
||||
"App::PropertyInteger",
|
||||
"FeedRatePercent",
|
||||
"FeedRate",
|
||||
QT_TRANSLATE_NOOP(
|
||||
@@ -316,7 +316,7 @@ class ObjectDressup:
|
||||
def onDocumentRestored(self, obj):
|
||||
if not hasattr(obj, "FeedRatePercent"):
|
||||
obj.addProperty(
|
||||
"App::PropertyPercent",
|
||||
"App::PropertyInteger",
|
||||
"FeedRatePercent",
|
||||
"FeedRate",
|
||||
QT_TRANSLATE_NOOP(
|
||||
|
||||
Reference in New Issue
Block a user