]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAPI/GeomAPI_Face.cpp
Salome HOME
multi selector controls for boolean feature
[modules/shaper.git] / src / GeomAPI / GeomAPI_Face.cpp
index 2055bdc6dac6951b35fb2e822c1eb46b5eee628b..b9dbd45df2f45bf8127e0b0d8f18a20ff43d9dfa 100644 (file)
@@ -16,6 +16,7 @@
 #include <BRepAdaptor_Surface.hxx>
 #include <Geom_Surface.hxx>
 #include <Geom_Plane.hxx>
+#include <GeomLib_IsPlanarSurface.hxx>
 
 GeomAPI_Face::GeomAPI_Face()
   : GeomAPI_Shape()
@@ -64,9 +65,8 @@ bool GeomAPI_Face::isPlanar() const
 {
   const TopoDS_Shape& aShape = const_cast<GeomAPI_Face*>(this)->impl<TopoDS_Shape>();
   Handle(Geom_Surface) aSurf = BRep_Tool::Surface(TopoDS::Face(aShape));
-  if (aSurf->IsKind(STANDARD_TYPE(Geom_Plane)))
-    return true;
-  return false;
+  GeomLib_IsPlanarSurface isPlanar(aSurf);
+  return isPlanar.IsPlanar();
 }
 
 std::shared_ptr<GeomAPI_Pln> GeomAPI_Face::getPlane() const