aPolylineObj = Handle(HYDROData_Polyline)::DownCast( anIter.Current() );
if ( !aPolylineObj.IsNull() && aPolylineObj->IsClosed() )
- {
- aPolylineName = aPolylineObj->GetName();
- if ( !aPolylineName.isEmpty() )
- {
- aList.append( aPolylineName );
- anEntryList.append( HYDROGUI_DataObject::dataObjectEntry( aPolylineObj ) );
+ {
+ // Check the polyline shape
+ TopoDS_Shape aPolylineShape = aPolylineObj->GetTopShape();
+ if ( !aPolylineShape.IsNull() && aPolylineShape.ShapeType() == TopAbs_WIRE ) {
+ aPolylineName = aPolylineObj->GetName();
+ if ( !aPolylineName.isEmpty() )
+ {
+ aList.append( aPolylineName );
+ anEntryList.append( HYDROGUI_DataObject::dataObjectEntry( aPolylineObj ) );
+ }
}
}
}