#include <HYDROData_Image.h>
#include <HYDROData_ImmersibleZone.h>
#include <HYDROData_Iterator.h>
-#include <HYDROData_Polyline.h>
+#include <HYDROData_Polyline3D.h>
+#include <HYDROData_PolylineXY.h>
#include <HYDROData_Profile.h>
#include <HYDROData_VisualState.h>
#include <HYDROData_Region.h>
LightApp_DataObject* aCalculRootObj = createObject( aRootObj, tr( partitionName( KIND_CALCULATION ).toAscii() ) );
// POLYLINES
- LightApp_DataObject* aPolylineRootObj = createObject( aRootObj, tr( partitionName( KIND_POLYLINE ).toAscii() ) );
+ LightApp_DataObject* aPolylineRootObj = createObject( aRootObj, tr( partitionName( KIND_POLYLINEXY ).toAscii() ) );
+
+ // POLYLINES
+ LightApp_DataObject* aPolyline3DRootObj = createObject( aRootObj, tr( partitionName( KIND_POLYLINE ).toAscii() ) );
// PROFILES
LightApp_DataObject* aProfileRootObj = createObject( aRootObj, tr( partitionName( KIND_PROFILE ).toAscii() ) );
for( ; anIterator.More(); anIterator.Next() ) {
Handle(HYDROData_Entity) anObj = anIterator.Current();
- switch ( anObj->GetKind() ) {
- case KIND_IMAGE:
- {
- Handle(HYDROData_Image) anImageObj =
- Handle(HYDROData_Image)::DownCast( anObj );
- if( !anImageObj.IsNull() ) {
- createObject( anImageRootObj, anImageObj );
+ if ( !anObj.IsNull() )
+ {
+ switch ( anObj->GetKind() ) {
+ case KIND_IMAGE:
+ {
+ Handle(HYDROData_Image) anImageObj =
+ Handle(HYDROData_Image)::DownCast( anObj );
+ if( !anImageObj.IsNull() ) {
+ createObject( anImageRootObj, anImageObj );
+ }
+
+ break;
}
+ case KIND_BATHYMETRY:
+ {
+ Handle(HYDROData_Bathymetry) aBathymetryObj =
+ Handle(HYDROData_Bathymetry)::DownCast( anObj );
+ if( !aBathymetryObj.IsNull() ) {
+ createObject( aBathymetryRootObj, aBathymetryObj );
+ }
- break;
- }
- case KIND_BATHYMETRY:
- {
- Handle(HYDROData_Bathymetry) aBathymetryObj =
- Handle(HYDROData_Bathymetry)::DownCast( anObj );
- if( !aBathymetryObj.IsNull() ) {
- createObject( aBathymetryRootObj, aBathymetryObj );
+ break;
}
+ case KIND_CHANNEL:
+ {
+ Handle(HYDROData_Channel) aChannelObj =
+ Handle(HYDROData_Channel)::DownCast( anObj );
+ if( !aChannelObj.IsNull() ) {
+ createObject( anArtificialObjectsRootObj, aChannelObj );
+ }
- break;
- }
- case KIND_CHANNEL:
- {
- Handle(HYDROData_Channel) aChannelObj =
- Handle(HYDROData_Channel)::DownCast( anObj );
- if( !aChannelObj.IsNull() ) {
- createObject( anArtificialObjectsRootObj, aChannelObj );
+ break;
}
+ case KIND_DIGUE:
+ {
+ Handle(HYDROData_Digue) aDigueObj =
+ Handle(HYDROData_Digue)::DownCast( anObj );
+ if( !aDigueObj.IsNull() ) {
+ createObject( anArtificialObjectsRootObj, aDigueObj );
+ }
- break;
- }
- case KIND_DIGUE:
- {
- Handle(HYDROData_Digue) aDigueObj =
- Handle(HYDROData_Digue)::DownCast( anObj );
- if( !aDigueObj.IsNull() ) {
- createObject( anArtificialObjectsRootObj, aDigueObj );
+ break;
}
+ case KIND_IMMERSIBLE_ZONE:
+ {
+ Handle(HYDROData_ImmersibleZone) anImmersibleZoneObj =
+ Handle(HYDROData_ImmersibleZone)::DownCast( anObj );
+ if( !anImmersibleZoneObj.IsNull() ) {
+ createObject( aNaturalObjectsRootObj, anImmersibleZoneObj );
+ }
- break;
- }
- case KIND_IMMERSIBLE_ZONE:
- {
- Handle(HYDROData_ImmersibleZone) anImmersibleZoneObj =
- Handle(HYDROData_ImmersibleZone)::DownCast( anObj );
- if( !anImmersibleZoneObj.IsNull() ) {
- createObject( aNaturalObjectsRootObj, anImmersibleZoneObj );
+ break;
}
+ case KIND_RIVER:
+ {
+ Handle(HYDROData_River) aRiverObj =
+ Handle(HYDROData_River)::DownCast( anObj );
+ if( !aRiverObj.IsNull() ) {
+ createObject( aNaturalObjectsRootObj, aRiverObj );
+ }
- break;
- }
- case KIND_RIVER:
- {
- Handle(HYDROData_River) aRiverObj =
- Handle(HYDROData_River)::DownCast( anObj );
- if( !aRiverObj.IsNull() ) {
- createObject( aNaturalObjectsRootObj, aRiverObj );
+ break;
}
+ case KIND_OBSTACLE:
+ {
+ Handle(HYDROData_Obstacle) anObstacleObj =
+ Handle(HYDROData_Obstacle)::DownCast( anObj );
+ if( !anObstacleObj.IsNull() ) {
+ createObject( anObstaclesRootObj, anObstacleObj );
+ }
- break;
- }
- case KIND_OBSTACLE:
- {
- Handle(HYDROData_Obstacle) anObstacleObj =
- Handle(HYDROData_Obstacle)::DownCast( anObj );
- if( !anObstacleObj.IsNull() ) {
- createObject( anObstaclesRootObj, anObstacleObj );
+ break;
}
+ case KIND_CALCULATION:
+ {
+ Handle(HYDROData_CalculationCase) aCalculObj =
+ Handle(HYDROData_CalculationCase)::DownCast( anObj );
+ if( !aCalculObj.IsNull() ) {
+ createObject( aCalculRootObj, aCalculObj );
+ }
- break;
- }
- case KIND_CALCULATION:
- {
- Handle(HYDROData_CalculationCase) aCalculObj =
- Handle(HYDROData_CalculationCase)::DownCast( anObj );
- if( !aCalculObj.IsNull() ) {
- createObject( aCalculRootObj, aCalculObj );
+ break;
}
+ case KIND_POLYLINEXY:
+ {
+ Handle(HYDROData_PolylineXY) aPolylineObj =
+ Handle(HYDROData_PolylineXY)::DownCast( anObj );
+ if( !aPolylineObj.IsNull() ) {
+ createObject( aPolylineRootObj, aPolylineObj );
+ }
- break;
- }
- case KIND_POLYLINE:
- {
- Handle(HYDROData_Polyline) aPolylineObj =
- Handle(HYDROData_Polyline)::DownCast( anObj );
- if( !aPolylineObj.IsNull() ) {
- createObject( aPolylineRootObj, aPolylineObj );
+ break;
}
+ case KIND_POLYLINE:
+ {
+ Handle(HYDROData_Polyline3D) aPolylineObj =
+ Handle(HYDROData_Polyline3D)::DownCast( anObj );
+ if( !aPolylineObj.IsNull() ) {
+ createObject( aPolyline3DRootObj, aPolylineObj );
+ }
- break;
- }
- case KIND_PROFILE:
- {
- Handle(HYDROData_Profile) aProfileObj =
- Handle(HYDROData_Profile)::DownCast( anObj );
- if( !aProfileObj.IsNull() ) {
- createObject( aProfileRootObj, aProfileObj );
+ break;
}
+ case KIND_PROFILE:
+ {
+ Handle(HYDROData_Profile) aProfileObj =
+ Handle(HYDROData_Profile)::DownCast( anObj );
+ if( !aProfileObj.IsNull() ) {
+ createObject( aProfileRootObj, aProfileObj );
+ }
- break;
- }
- case KIND_VISUAL_STATE:
- {
- Handle(HYDROData_VisualState) aVisualStateObj =
- Handle(HYDROData_VisualState)::DownCast( anObj );
- if( !aVisualStateObj.IsNull() ) {
- createObject( aVisualStateRootObj, aVisualStateObj );
+ break;
}
+ case KIND_VISUAL_STATE:
+ {
+ Handle(HYDROData_VisualState) aVisualStateObj =
+ Handle(HYDROData_VisualState)::DownCast( anObj );
+ if( !aVisualStateObj.IsNull() ) {
+ createObject( aVisualStateRootObj, aVisualStateObj );
+ }
- break;
+ break;
+ }
}
}
}
switch( theObjectKind )
{
case KIND_IMAGE: return "IMAGES";
- case KIND_POLYLINE: return "POLYLINES";
+ case KIND_POLYLINE: return "POLYLINES_3D";
+ case KIND_POLYLINEXY: return "POLYLINES";
case KIND_PROFILE: return "PROFILES";
case KIND_VISUAL_STATE: return "VISUAL_STATES";
case KIND_BATHYMETRY: return "BATHYMETRIES";
LightApp_DataObject* aPolylineSect =
createObject( aGuiObj, tr( "ZONE_POLYLINE" ), aGuiObj->entry() );
- Handle(HYDROData_Polyline) aPolyline = aZoneObj->GetPolyline();
+ Handle(HYDROData_PolylineXY) aPolyline = aZoneObj->GetPolyline();
if ( !aPolyline.IsNull() && !aPolyline->IsRemoved() )
createObject( aPolylineSect, aPolyline, aGuiObj->entry(), false );
createZone( aGuiObj, aRegionZone, "", true );
}
}
+ else if ( anObjectKind == KIND_PROFILE )
+ {
+ Handle(HYDROData_Profile) aProfileObj =
+ Handle(HYDROData_Profile)::DownCast( aDataObj );
+
+ aGuiObj->setIsValid( aProfileObj->IsValid() );
+ }
}
void HYDROGUI_DataModel::buildCaseTree( SUIT_DataObject* theParent, Handle(HYDROData_CalculationCase) theCase )