]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAPI/GeomAPI_Shape.cpp
Salome HOME
Sources formated according to the codeing standards
[modules/shaper.git] / src / GeomAPI / GeomAPI_Shape.cpp
1 // File:        GeomAPI_Shape.cpp
2 // Created:     23 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #include<GeomAPI_Shape.h>
6
7 #include <TopoDS_Shape.hxx>
8
9 #define MY_PNT static_cast<gp_Pnt*>(myImpl)
10
11 GeomAPI_Shape::GeomAPI_Shape()
12     : GeomAPI_Interface(new TopoDS_Shape())
13 {
14 }
15
16 bool GeomAPI_Shape::isNull()
17 {
18   return MY_SHAPE->IsNull();
19 }
20
21 bool GeomAPI_Shape::isVertex() const
22 {
23   const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
24   return aShape.TShape()->ShapeType() == TopAbs_VERTEX;
25 }
26
27 bool GeomAPI_Shape::isEdge() const
28 {
29   const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
30   return aShape.TShape()->ShapeType() == TopAbs_EDGE;
31 }