From 3ad7c21c053ba989be61739e59d36c11c00cc53b Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 23 Dec 2014 17:29:48 +0300 Subject: [PATCH] Fix of creation of sketch-distance to external sketch elements: first to a vertex, then to an edge --- src/GeomAPI/GeomAPI_Edge.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.2