]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FiltersPlugin/FiltersPlugin_VerticalFace.cpp
Salome HOME
Unit tests for already implemented filters.
[modules/shaper.git] / src / FiltersPlugin / FiltersPlugin_VerticalFace.cpp
index 97235249f66144c888292877208d6bacecd3fb71..49fd944c6e7098826aa69d809b79ed56dabceec6 100644 (file)
@@ -33,14 +33,12 @@ bool FiltersPlugin_VerticalFace::isSupported(GeomAPI_Shape::ShapeType theType) c
 bool FiltersPlugin_VerticalFace::isOk(
   const GeomShapePtr& theShape, const ModelAPI_FiltersArgs& theArgs) const
 {
-  if (!theShape->isFace())
+  if (!theShape->isFace() || !theShape->isPlanar())
     return false;
-  if (theShape->isPlanar()) {
-    GeomFacePtr aFace(new GeomAPI_Face(theShape));
 
-    GeomPlanePtr aPlane = aFace->getPlane();
-    GeomDirPtr aDir = aPlane->direction();
-    return fabs(aDir->z()) <= 1.e-7;
-  }
-  return false;
+  GeomFacePtr aFace(new GeomAPI_Face(theShape));
+
+  GeomPlanePtr aPlane = aFace->getPlane();
+  GeomDirPtr aDir = aPlane->direction();
+  return fabs(aDir->z()) <= 1.e-7;
 }