X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2FPartSet%2FPartSet_Validators.cpp;h=f8d05fe0a6c011c731d314ee19bc06739368b871;hb=d7144bf137b2ea4f8c7bfbc6b678e1a762e98653;hp=0b5a42bd5e9613775ef46c7f02a74037bec0a1fa;hpb=5ef1bee9097c46f0d8effbac12cd5f179b542d0f;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Validators.cpp b/src/PartSet/PartSet_Validators.cpp index 0b5a42bd5..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,