Salome HOME
Merge branch 'Dev_0.6.1' of ssh://newgeom.redmine.opencascade.com:322/newgeom into...
[modules/shaper.git] / src / GeomAPI / GeomAPI_Edge.cpp
index d2d0248f29a880bccb33505b4145ed5cabc1c25d..759b0b323cb2c90205d2fef862abfe9c3fbc9c97 100644 (file)
@@ -100,11 +100,14 @@ std::shared_ptr<GeomAPI_Circ> GeomAPI_Edge::circle()
 }
 
 
-bool GeomAPI_Edge::isEqual(std::shared_ptr<GeomAPI_Shape> theEdge)
+bool GeomAPI_Edge::isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const
 {
   const TopoDS_Shape& aMyShape = const_cast<GeomAPI_Edge*>(this)->impl<TopoDS_Shape>();
   const TopoDS_Shape& aInShape = theEdge->impl<TopoDS_Shape>();
-  
+
+  if (aMyShape.ShapeType() != aInShape.ShapeType())
+    return false;
+
   double aMyStart, aMyEnd;
   Handle(Geom_Curve) aMyCurve = BRep_Tool::Curve(TopoDS::Edge(aMyShape), aMyStart, aMyEnd);
   double aInStart, aInEnd;