#include <BRepAdaptor_Surface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Plane.hxx>
+#include <Geom_CylindricalSurface.hxx>
#include <GeomLib_IsPlanarSurface.hxx>
GeomAPI_Face::GeomAPI_Face()
return isPlanar.IsPlanar() == Standard_True;
}
+bool GeomAPI_Face::isCylindrical() const
+{
+ const TopoDS_Shape& aShape = const_cast<GeomAPI_Face*>(this)->impl<TopoDS_Shape>();
+ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(TopoDS::Face(aShape));
+ return aSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) == Standard_True;
+}
+
std::shared_ptr<GeomAPI_Pln> GeomAPI_Face::getPlane() const
{
const TopoDS_Shape& aShape = const_cast<GeomAPI_Face*>(this)->impl<TopoDS_Shape>();
/// Returns true if the face is a planar face
bool isPlanar() const;
+ /// Returns true if the face is a cylindrical face
+ bool isCylindrical() const;
+
/// Returns the base plane of the face (if it is planar) with location in the center of the face
std::shared_ptr<GeomAPI_Pln> getPlane() const;
};