Salome HOME
Sources formated according to the codeing standards
[modules/shaper.git] / src / GeomAPI / GeomAPI_Shape.cpp
index ded2008375e370727b818657712fae59ee2c7634..30e2f342522498a2ea66f752eedd880f513b7584 100644 (file)
@@ -4,15 +4,28 @@
 
 #include<GeomAPI_Shape.h>
 
-#include<TopoDS_Shape.hxx>
+#include <TopoDS_Shape.hxx>
 
 #define MY_PNT static_cast<gp_Pnt*>(myImpl)
 
 GeomAPI_Shape::GeomAPI_Shape()
-    : GeomAPI_Interface(new TopoDS_Shape()) {
+    : GeomAPI_Interface(new TopoDS_Shape())
+{
 }
 
 bool GeomAPI_Shape::isNull()
 {
   return MY_SHAPE->IsNull();
 }
+
+bool GeomAPI_Shape::isVertex() const
+{
+  const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
+  return aShape.TShape()->ShapeType() == TopAbs_VERTEX;
+}
+
+bool GeomAPI_Shape::isEdge() const
+{
+  const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
+  return aShape.TShape()->ShapeType() == TopAbs_EDGE;
+}