]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
TC5.1.4: filter for "Curve Construction" dialog box
authordmv <dmv@opencascade.com>
Wed, 21 Apr 2010 11:53:07 +0000 (11:53 +0000)
committerdmv <dmv@opencascade.com>
Wed, 21 Apr 2010 11:53:07 +0000 (11:53 +0000)
src/BasicGUI/BasicGUI_CurveDlg.cxx
src/GEOMImpl/GEOMImpl_PolylineDriver.cxx

index 901da0f467c6cc3788bb20bd53bcabb4c558f132..6804419db8494c862abc2ef58936bd99f579dcd4 100644 (file)
@@ -342,10 +342,12 @@ void BasicGUI_CurveDlg::SelectionIntoArgument()
           }
         }
         else { // aMap.Extent() == 0
-          int pos = isPointInList( myOrderedSel, aSelectedObject );
-          if ( pos == -1 )
-            myOrderedSel.push_back( aSelectedObject );
-          aList.push_back( aSelectedObject );
+          if ( aShape.ShapeType() == TopAbs_VERTEX ) {
+            int pos = isPointInList( myOrderedSel, aSelectedObject );
+            if ( pos == -1 )
+              myOrderedSel.push_back( aSelectedObject );
+            aList.push_back( aSelectedObject );
+          }
         }
       }
     }
index 7775c5183a5e3fef299e251f073f9d050d59cd97..2de6d2a941a0df152d95dfc83a490381579cfa9a 100644 (file)
@@ -80,6 +80,11 @@ Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const
     {
       Handle(GEOM_Function) aRefPoint = aCI.GetPoint(ind);
       TopoDS_Shape aShapePnt = aRefPoint->GetValue();
+      if (aShapePnt.ShapeType() != TopAbs_VERTEX) {
+        Standard_TypeMismatch::Raise
+          ("Polyline creation aborted : arguments are not a vertexes");
+        return 0;
+      }
       if (aShapePnt.ShapeType() == TopAbs_VERTEX) {
         aMakePoly.Add(TopoDS::Vertex(aShapePnt));
 //        if (!aMakePoly.Added()) return 0;