From 0d21e94d3fbfbd99c83ecd2cae9f1f151a5e455e Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Thu, 11 Jan 2018 10:44:49 +0100 Subject: [PATCH] Sketcher: Improve validation ui to select whether to ignore construction geometry or not ======================================================================================== Users generally expect that validate Sketch checks the visible part, perhaps because it is not called from the sketcher's edit view, but from the 3D view, perhaps because that part is relevant for further construction. On the other hand the tool's name is Validate Sketch and construction geometry belongs to the sketch. So a new checkbox is introduced, by default enabled to ignore construction, but still allowing the user to make it operate in one direction or the other. See: https://forum.freecadweb.org/viewtopic.php?f=3&t=26139&p=208582#p208693 --- .../Sketcher/Gui/TaskSketcherValidation.cpp | 3 ++- .../Sketcher/Gui/TaskSketcherValidation.ui | 20 ++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp b/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp index b67ab21ff3..378ebf5d7c 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp @@ -70,6 +70,7 @@ SketcherValidation::SketcherValidation(Sketcher::SketchObject* Obj, QWidget* par ui->fixButton->setEnabled(false); ui->fixConstraint->setEnabled(false); ui->swapReversed->setEnabled(false); + ui->checkBoxIgnoreConstruction->setEnabled(true); double tolerances[8] = { Precision::Confusion() / 100, Precision::Confusion() / 10, @@ -180,7 +181,7 @@ void SketcherValidation::on_findButton_clicked() for (std::size_t i=0; iConstruction) + if(g->Construction && ui->checkBoxIgnoreConstruction->isChecked()) continue; if (g->getTypeId() == Part::GeomLineSegment::getClassTypeId()) { diff --git a/src/Mod/Sketcher/Gui/TaskSketcherValidation.ui b/src/Mod/Sketcher/Gui/TaskSketcherValidation.ui index 3a4f01be82..2e22ca0fef 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherValidation.ui +++ b/src/Mod/Sketcher/Gui/TaskSketcherValidation.ui @@ -6,8 +6,8 @@ 0 0 - 242 - 423 + 311 + 453 @@ -57,7 +57,7 @@ - + Fix @@ -67,20 +67,30 @@ - + Find - + Highlight open vertexes + + + + Ignore construction geometry + + + true + + +