From: dmv Date: Wed, 21 Apr 2010 11:53:07 +0000 (+0000) Subject: TC5.1.4: filter for "Curve Construction" dialog box X-Git-Tag: V5_1_4rc1~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bb8f6db5541d83ca59f8bf1f3d9f814b2808e721;p=modules%2Fgeom.git TC5.1.4: filter for "Curve Construction" dialog box --- diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index 901da0f46..6804419db 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -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 ); + } } } } diff --git a/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx b/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx index 7775c5183..2de6d2a94 100644 --- a/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx @@ -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;