X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Validators.cpp;h=f8d05fe0a6c011c731d314ee19bc06739368b871;hb=d7144bf137b2ea4f8c7bfbc6b678e1a762e98653;hp=4b72de19888a5286ef2696dc4b2e3c3a50581179;hpb=6e421e939851e0de46554ae45a3ca0e1f67cd91d;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Validators.cpp b/src/PartSet/PartSet_Validators.cpp index 4b72de198..f8d05fe0a 100644 --- a/src/PartSet/PartSet_Validators.cpp +++ b/src/PartSet/PartSet_Validators.cpp @@ -282,26 +282,19 @@ bool PartSet_TangentSelection::isValid(const ModuleBase_ISelection* theSelection return false; GeomAPI_Edge aEdge1(aShape); - if (aEdge1.isLine() || aEdge1.isArc()) { - if (aList.size() == 2) { - // Check second selection - aPrs = aList.last(); - const GeomShapePtr& aShape2 = aPrs->shape(); - if (!aShape2.get() || aShape2->isNull() || aShape2->shapeType() != GeomAPI_Shape::EDGE) - return false; - GeomAPI_Edge aEdge2(aShape2); - - if (aEdge1.isLine() && aEdge2.isArc()) - return true; - else if (aEdge1.isArc() && aEdge2.isLine()) - return true; - else - return false; - } else - return true; + if (aList.size() == 2) { + // Check second selection + aPrs = aList.last(); + const GeomShapePtr& aShape2 = aPrs->shape(); + if (!aShape2.get() || aShape2->isNull() || aShape2->shapeType() != GeomAPI_Shape::EDGE) + return false; + GeomAPI_Edge aEdge2(aShape2); + + if (aEdge1.isLine() && aEdge2.isLine()) + return false; } - return false; } + return true; } bool PartSet_AngleSelection::isValid(const ModuleBase_ISelection* theSelection, @@ -335,12 +328,12 @@ bool PartSet_EqualSelection::isValid(const ModuleBase_ISelection* theSelection, aType = 1; else if (aType != 1) return false; - } else if (aEdge.isCircle()) { + } else if (aEdge.isCircle() || aEdge.isArc()) { if (aCount == 1) aType = 2; else if (aType != 2) return false; - } else if (aEdge.isArc()) { + } else if (aEdge.isEllipse()) { if (aCount == 1) aType = 3; else if (aType != 3)