From: mpv Date: Wed, 26 Apr 2017 10:28:03 +0000 (+0300) Subject: Fix for the center of edge computation functionality. X-Git-Tag: V_2.7.1.1~3^2~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f6408e3ea76639dab6dc8c017fd4f2f7710876cc;p=modules%2Fshaper.git Fix for the center of edge computation functionality. --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index b7f1d19d6..b457a428e 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -184,7 +184,7 @@ GeomShapePtr centerByEdge(GeomShapePtr theEdge, ModelAPI_AttributeSelection::Cen { if (theType != ModelAPI_AttributeSelection::NOT_CENTER && theEdge.get() != NULL) { TopoDS_Shape aShape = theEdge->impl(); - if (!aShape.IsNull()) { + if (!aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE) { TopoDS_Edge anEdge = TopoDS::Edge(aShape); double aFirst, aLast; Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, aFirst, aLast);