From: rkv Date: Mon, 2 Dec 2013 06:42:19 +0000 (+0000) Subject: Polylines 3D partition is added to the objects tree. X-Git-Tag: BR_hydro_v_0_4~114 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0c8c9e56851dc04f32e6f6485229568d8cc9a837;p=modules%2Fhydro.git Polylines 3D partition is added to the objects tree. --- diff --git a/src/HYDROData/HYDROData_Iterator.cxx b/src/HYDROData/HYDROData_Iterator.cxx index b29eec52..73435626 100644 --- a/src/HYDROData/HYDROData_Iterator.cxx +++ b/src/HYDROData/HYDROData_Iterator.cxx @@ -10,6 +10,7 @@ #include "HYDROData_Image.h" #include "HYDROData_ImmersibleZone.h" #include "HYDROData_Obstacle.h" +#include "HYDROData_Polyline3D.h" #include "HYDROData_PolylineXY.h" #include "HYDROData_Profile.h" #include "HYDROData_ProfileUZ.h" @@ -106,9 +107,9 @@ Handle(HYDROData_Entity) HYDROData_Iterator::Object( const TDF_Label& theLabel ) case KIND_IMAGE: aResult = new HYDROData_Image(); break; - //case KIND_POLYLINE: - //aResult = new HYDROData_Polyline(); - //break; + case KIND_POLYLINE: + aResult = new HYDROData_Polyline3D(); + break; case KIND_BATHYMETRY: aResult = new HYDROData_Bathymetry(); break; diff --git a/src/HYDROGUI/HYDROGUI_DataModel.cxx b/src/HYDROGUI/HYDROGUI_DataModel.cxx index ef8a9065..be459896 100644 --- a/src/HYDROGUI/HYDROGUI_DataModel.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModel.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -252,6 +253,9 @@ void HYDROGUI_DataModel::update( const int theStudyId ) // POLYLINES 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() ) ); @@ -355,6 +359,16 @@ void HYDROGUI_DataModel::update( const int theStudyId ) 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 = @@ -598,6 +612,7 @@ QString HYDROGUI_DataModel::partitionName( const ObjectKind theObjectKind ) switch( theObjectKind ) { case KIND_IMAGE: return "IMAGES"; + case KIND_POLYLINE: return "POLYLINES 3D"; case KIND_POLYLINEXY: return "POLYLINES"; case KIND_PROFILE: return "PROFILES"; case KIND_VISUAL_STATE: return "VISUAL_STATES";