X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Edge.cpp;h=759b0b323cb2c90205d2fef862abfe9c3fbc9c97;hb=5453faccbabc730f9816c502460cd3ec37ef5621;hp=5e455f9f3dd3f3bd426fa0f85999859c4bac463f;hpb=9e869ede4d8c56262bb20534543c2bf56cd6a91b;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Edge.cpp b/src/GeomAPI/GeomAPI_Edge.cpp index 5e455f9f3..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; @@ -129,4 +134,4 @@ bool GeomAPI_Edge::isEqual(std::shared_ptr theEdge) return false; return true; -} \ No newline at end of file +}