TC5.1.4: filter for "Curve Construction" dialog box

This commit is contained in:
dmv 2010-04-21 11:53:07 +00:00
parent 7e21a68ba0
commit bb8f6db554
2 changed files with 11 additions and 4 deletions

View File

@ -342,6 +342,7 @@ void BasicGUI_CurveDlg::SelectionIntoArgument()
} }
} }
else { // aMap.Extent() == 0 else { // aMap.Extent() == 0
if ( aShape.ShapeType() == TopAbs_VERTEX ) {
int pos = isPointInList( myOrderedSel, aSelectedObject ); int pos = isPointInList( myOrderedSel, aSelectedObject );
if ( pos == -1 ) if ( pos == -1 )
myOrderedSel.push_back( aSelectedObject ); myOrderedSel.push_back( aSelectedObject );
@ -350,6 +351,7 @@ void BasicGUI_CurveDlg::SelectionIntoArgument()
} }
} }
} }
}
myPoints->length( aList.size() ); myPoints->length( aList.size() );

View File

@ -80,6 +80,11 @@ Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const
{ {
Handle(GEOM_Function) aRefPoint = aCI.GetPoint(ind); Handle(GEOM_Function) aRefPoint = aCI.GetPoint(ind);
TopoDS_Shape aShapePnt = aRefPoint->GetValue(); 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) { if (aShapePnt.ShapeType() == TopAbs_VERTEX) {
aMakePoly.Add(TopoDS::Vertex(aShapePnt)); aMakePoly.Add(TopoDS::Vertex(aShapePnt));
// if (!aMakePoly.Added()) return 0; // if (!aMakePoly.Added()) return 0;