#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;
+}
/// Creation of empty (null) shape
GeomAPI_Shape();
+ bool isNull();
+
+ /// Returns whether the shape is a vertex
+ virtual bool isVertex() const;
+
+ /// Returns whether the shape is an edge
+ virtual bool isEdge() const;
};
#endif