From 7c2065f9130884b137d042857bfd32661d5e6db1 Mon Sep 17 00:00:00 2001 From: sliptonic Date: Fri, 27 Nov 2020 10:11:26 -0600 Subject: [PATCH 1/3] Fix help text for filter control --- src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui b/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui index a484343d33..038b37c892 100644 --- a/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui +++ b/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui @@ -95,17 +95,17 @@ <html><head/><body><p><br/></p></body></html> - Threshold + Filter Colinear lines - <html><head/><body><p>Threshold is used by the medial axis filter to remove unwanted segments. If the resulting path contains unwanted segments, decrease this value. </p><p>Valid values are 0.0 - 1.0</p><p>Default = 0.8</p><p>1.0 will remove nothing.</p></body></html> + <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> - 180 + 90 10 From 3eb300a8c22745ab968f3d6e553249bdcd3a01d5 Mon Sep 17 00:00:00 2001 From: sliptonic Date: Sat, 28 Nov 2020 10:15:11 -0600 Subject: [PATCH 2/3] fix ui bugs --- src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui | 2 +- src/Mod/Path/PathScripts/PathVcarve.py | 8 ++++---- src/Mod/Path/PathScripts/PathVcarveGui.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui b/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui index 038b37c892..d0b2e52b92 100644 --- a/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui +++ b/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui @@ -100,7 +100,7 @@ - + <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> diff --git a/src/Mod/Path/PathScripts/PathVcarve.py b/src/Mod/Path/PathScripts/PathVcarve.py index 51609933a0..f380635882 100644 --- a/src/Mod/Path/PathScripts/PathVcarve.py +++ b/src/Mod/Path/PathScripts/PathVcarve.py @@ -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); diff --git a/src/Mod/Path/PathScripts/PathVcarveGui.py b/src/Mod/Path/PathScripts/PathVcarveGui.py index d2823939d7..60910d5d9a 100644 --- a/src/Mod/Path/PathScripts/PathVcarveGui.py +++ b/src/Mod/Path/PathScripts/PathVcarveGui.py @@ -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 From be2f0702af3394f150b669b007fcb1a59d50497f Mon Sep 17 00:00:00 2001 From: sliptonic Date: Mon, 30 Nov 2020 15:43:07 -0600 Subject: [PATCH 3/3] fixup vcarve threshold --- src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui b/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui index d0b2e52b92..eb09dd2b9d 100644 --- a/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui +++ b/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui @@ -102,7 +102,7 @@ - <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> + <html><head/><body><p>Sets 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> 90