]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the center of edge computation functionality.
authormpv <mpv@opencascade.com>
Wed, 26 Apr 2017 10:28:03 +0000 (13:28 +0300)
committermpv <mpv@opencascade.com>
Wed, 26 Apr 2017 10:28:03 +0000 (13:28 +0300)
src/Model/Model_AttributeSelection.cpp

index b7f1d19d682d595bb0b0ee9bb4333c0d3895ec7a..b457a428e63a117f8526872d27688287dc4fb288 100644 (file)
@@ -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<TopoDS_Shape>();
-    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);