}
}
+ if ( aZonePolylines.IsEmpty() )
+ {
+ theErrorMsg = tr( "POLYLINES_NOT_DEFINED" );
+ return false;
+ }
+
QString aSelectedStricklerType = aPanel->getSelectedAdditionalParamName();
- // TODO: Generate TopoDS_Shape based on the set of polylines, implement generateTopShape data model method
- /*
- if ( HYDROData_LandCover::generateTopShape( aZonePolylines ).IsNull() )
+ TCollection_AsciiString anError;
+ if ( HYDROData_LandCover::buildShape( aZonePolylines, anError ).IsNull() )
{
- theErrorMsg = tr( "ZONE_OBJECT_CANNOT_BE_CREATED" );
+ if ( !anError.IsEmpty() ) {
+ theErrorMsg = HYDROGUI_Tool::ToQString( anError );
+ } else {
+ theErrorMsg = tr( "LAND_COVER_OBJECT_CANNOT_BE_CREATED" );
+ }
return false;
}
- */
-
+
Handle(HYDROData_LandCover) aZoneObj = myIsEdit ? myEditedObject :
Handle(HYDROData_LandCover)::DownCast( doc()->CreateObject( KIND_LAND_COVER ) );