X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Face.cpp;h=b569598357b982526ca0221c1332289ac200bbfb;hb=61cd0845b41710ad4e7eae07cc6106904be67b9f;hp=ba111a67d1936924af2049b606c934f33b45f4f9;hpb=a7f44a41bdf29e7bd978ff3b8c8bd514d1223be7;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Face.cpp b/src/GeomAPI/GeomAPI_Face.cpp index ba111a67d..b56959835 100644 --- a/src/GeomAPI/GeomAPI_Face.cpp +++ b/src/GeomAPI/GeomAPI_Face.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_Face.cpp // Created: 2 Dec 2014 // Author: Artem ZHIDKOV @@ -14,6 +16,7 @@ #include #include #include +#include GeomAPI_Face::GeomAPI_Face() : GeomAPI_Shape() @@ -62,9 +65,8 @@ bool GeomAPI_Face::isPlanar() const { const TopoDS_Shape& aShape = const_cast(this)->impl(); 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() == Standard_True; } std::shared_ptr GeomAPI_Face::getPlane() const