}
}
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 );
+ }
}
}
}
{
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;