From bb8f6db5541d83ca59f8bf1f3d9f814b2808e721 Mon Sep 17 00:00:00 2001 From: dmv Date: Wed, 21 Apr 2010 11:53:07 +0000 Subject: [PATCH] TC5.1.4: filter for "Curve Construction" dialog box --- src/BasicGUI/BasicGUI_CurveDlg.cxx | 10 ++++++---- src/GEOMImpl/GEOMImpl_PolylineDriver.cxx | 5 +++++ 2 files changed, 11 insertions(+), 4 deletions(-) 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; -- 2.39.2