Salome HOME
Added a selection attribute and naming basic mechanisms
[modules/shaper.git] / src / GeomAPI / GeomAPI_Shape.cpp
index e51d30ca6bc6c75ecc79b3563163af554fb76c79..0e5bcb010afce528fa68654ab66f867f918af232 100644 (file)
@@ -13,11 +13,21 @@ GeomAPI_Shape::GeomAPI_Shape()
 {
 }
 
-bool GeomAPI_Shape::isNull()
+bool GeomAPI_Shape::isNull() const
 {
   return MY_SHAPE->IsNull() == Standard_True;
 }
 
+bool GeomAPI_Shape::isEqual(const boost::shared_ptr<GeomAPI_Shape> theShape) const
+{
+  if (isNull())
+    return theShape->isNull();
+  if (theShape->isNull())
+    return false;
+
+  return MY_SHAPE->IsEqual(theShape->impl<TopoDS_Shape>()) == Standard_True;
+}
+
 bool GeomAPI_Shape::isVertex() const
 {
   const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();