From f6408e3ea76639dab6dc8c017fd4f2f7710876cc Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 26 Apr 2017 13:28:03 +0300 Subject: [PATCH] Fix for the center of edge computation functionality. --- src/Model/Model_AttributeSelection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.2