fix ui bugs
This commit is contained in:
@@ -100,7 +100,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="threshold">
|
||||
<widget class="QSpinBox" name="colinearFilter">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Controls how aggressively colinear segments are filtered from the voronoi diagram</p><p>Valid values are 0 - 90 degrees (larger numbers filter more)</p><p>Default = 10</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
|
||||
@@ -179,13 +179,13 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
obj.addProperty("App::PropertyFloat", "Discretize", "Path",
|
||||
QtCore.QT_TRANSLATE_NOOP("PathVcarve",
|
||||
"The deflection value for discretizing arcs"))
|
||||
obj.addProperty("App::PropertyFloat", "Threshold", "Path",
|
||||
obj.addProperty("App::PropertyFloat", "Colinear", "Path",
|
||||
QtCore.QT_TRANSLATE_NOOP("PathVcarve",
|
||||
"cutoff for removing colinear segments (degrees). \
|
||||
"Cutoff for removing colinear segments (degrees). \
|
||||
default=10.0."))
|
||||
obj.addProperty("App::PropertyFloat", "Tolerance", "Path",
|
||||
QtCore.QT_TRANSLATE_NOOP("PathVcarve", ""))
|
||||
obj.Threshold = 10.0
|
||||
obj.Colinear = 10.0
|
||||
obj.Discretize = 0.01
|
||||
obj.Tolerance = PathPreferences.defaultGeometryTolerance()
|
||||
self.setupAdditionalProperties(obj)
|
||||
@@ -261,7 +261,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
vd.colorExterior(EXTERIOR2,
|
||||
lambda v: not f.isInside(v.toPoint(f.BoundBox.ZMin),
|
||||
obj.Tolerance, True))
|
||||
vd.colorColinear(COLINEAR, obj.Threshold)
|
||||
vd.colorColinear(COLINEAR, obj.Colinear)
|
||||
vd.colorTwins(TWIN)
|
||||
|
||||
wires = _collectVoronoiWires(vd);
|
||||
|
||||
@@ -120,15 +120,15 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
'''getFields(obj) ... transfers values from UI to obj's proprties'''
|
||||
if obj.Discretize != self.form.discretize.value():
|
||||
obj.Discretize = self.form.discretize.value()
|
||||
if obj.Threshold != self.form.threshold.value():
|
||||
obj.Threshold = self.form.threshold.value()
|
||||
if obj.Colinear != self.form.colinearFilter.value():
|
||||
obj.Colinear = self.form.colinearFilter.value()
|
||||
self.updateToolController(obj, self.form.toolController)
|
||||
self.updateCoolant(obj, self.form.coolantController)
|
||||
|
||||
def setFields(self, obj):
|
||||
'''setFields(obj) ... transfers obj's property values to UI'''
|
||||
self.form.discretize.setValue(obj.Discretize)
|
||||
self.form.threshold.setValue(obj.Threshold)
|
||||
self.form.colinearFilter.setValue(obj.Colinear)
|
||||
self.setupToolController(obj, self.form.toolController)
|
||||
self.setupCoolant(obj, self.form.coolantController)
|
||||
|
||||
@@ -136,7 +136,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
'''getSignalsForUpdate(obj) ... return list of signals for updating obj'''
|
||||
signals = []
|
||||
signals.append(self.form.discretize.editingFinished)
|
||||
signals.append(self.form.threshold.editingFinished)
|
||||
signals.append(self.form.colinearFilter.editingFinished)
|
||||
signals.append(self.form.toolController.currentIndexChanged)
|
||||
signals.append(self.form.coolantController.currentIndexChanged)
|
||||
return signals
|
||||
|
||||
Reference in New Issue
Block a user