From: azv Date: Thu, 24 Jul 2014 12:37:34 +0000 (+0400) Subject: Merge remote-tracking branch 'remotes/origin/master' X-Git-Tag: V_0.4.4~152^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3244e0f3d7e585ccfc3c37c56fbf5d6826055448;p=modules%2Fshaper.git Merge remote-tracking branch 'remotes/origin/master' Conflicts: src/GeomAPI/GeomAPI_Shape.cpp src/GeomAPI/GeomAPI_Shape.h --- 3244e0f3d7e585ccfc3c37c56fbf5d6826055448 diff --cc src/GeomAPI/GeomAPI_Shape.cpp index f7f05846a,ded200837..10bd21df9 --- a/src/GeomAPI/GeomAPI_Shape.cpp +++ b/src/GeomAPI/GeomAPI_Shape.cpp @@@ -9,17 -9,10 +9,23 @@@ #define MY_PNT static_cast(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(this)->impl(); + return aShape.TShape()->ShapeType() == TopAbs_VERTEX; +} + +bool GeomAPI_Shape::isEdge() const +{ + const TopoDS_Shape& aShape = const_cast(this)->impl(); + return aShape.TShape()->ShapeType() == TopAbs_EDGE; +} diff --cc src/GeomAPI/GeomAPI_Shape.h index 7394bee05,514287a03..b557e845e --- a/src/GeomAPI/GeomAPI_Shape.h +++ b/src/GeomAPI/GeomAPI_Shape.h @@@ -18,11 -21,8 +21,13 @@@ public /// 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