-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "PartSet_Validators.h"
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,
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)