X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Edge.cpp;h=759b0b323cb2c90205d2fef862abfe9c3fbc9c97;hb=5453faccbabc730f9816c502460cd3ec37ef5621;hp=cdd471f4009b6d8ce46e2bb99c58cd1beb7a1151;hpb=c852965b2300f81aea972fe2a8013f495c61cba3;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Edge.cpp b/src/GeomAPI/GeomAPI_Edge.cpp index cdd471f40..759b0b323 100644 --- a/src/GeomAPI/GeomAPI_Edge.cpp +++ b/src/GeomAPI/GeomAPI_Edge.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_Edge.cpp // Created: 24 Jul 2014 // Author: Artem ZHIDKOV @@ -98,11 +100,14 @@ std::shared_ptr GeomAPI_Edge::circle() } -bool GeomAPI_Edge::isEqual(std::shared_ptr theEdge) +bool GeomAPI_Edge::isEqual(const std::shared_ptr theEdge) const { const TopoDS_Shape& aMyShape = const_cast(this)->impl(); const TopoDS_Shape& aInShape = theEdge->impl(); - + + 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;