From: jfa Date: Thu, 8 Apr 2021 12:13:43 +0000 (+0300) Subject: Fix selection by filters on sphere. Check for degenerated edge before calling filters. X-Git-Tag: V9_7_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3aa9a52cf58020ce0505dcaf0196984de1326567;p=modules%2Fshaper.git Fix selection by filters on sphere. Check for degenerated edge before calling filters. --- diff --git a/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp b/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp index 741298f5a..2c10b1adb 100644 --- a/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp @@ -34,7 +34,9 @@ #include #include #include + #include +#include #include #include @@ -472,8 +474,15 @@ void ModuleBase_WidgetSelectionFilter::onSelect() TopoDS_Shape aTShape = aSubShape->impl(); if (!alreadyThere.Add(aTShape)) continue; + + // degenerated edge is not valid selection + if ((GeomAPI_Shape::ShapeType)mySelectionType == GeomAPI_Shape::EDGE) + if (aSubShape->edge()->isDegenerated()) + continue; + static SessionPtr aSession = ModelAPI_Session::get(); bool isValid = aSession->filters()->isValid(myFeature, aBody, aSubShape); + if (isValid) { aBuilder.Add(aComp, aTShape); // bos #24043: Naming on a compsolid works wrong.