From: mpv Date: Tue, 23 Dec 2014 14:29:48 +0000 (+0300) Subject: Fix of creation of sketch-distance to external sketch elements: first to a vertex... X-Git-Tag: V_0.7.0_rc1~55^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ad7c21c053ba989be61739e59d36c11c00cc53b;p=modules%2Fshaper.git Fix of creation of sketch-distance to external sketch elements: first to a vertex, then to an edge --- diff --git a/src/GeomAPI/GeomAPI_Edge.cpp b/src/GeomAPI/GeomAPI_Edge.cpp index d2d0248f2..06c733f3b 100644 --- a/src/GeomAPI/GeomAPI_Edge.cpp +++ b/src/GeomAPI/GeomAPI_Edge.cpp @@ -104,7 +104,10 @@ bool GeomAPI_Edge::isEqual(std::shared_ptr theEdge) { 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;