]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Polylines 3D partition is added to the objects tree.
authorrkv <rkv@opencascade.com>
Mon, 2 Dec 2013 06:42:19 +0000 (06:42 +0000)
committerrkv <rkv@opencascade.com>
Mon, 2 Dec 2013 06:42:19 +0000 (06:42 +0000)
src/HYDROData/HYDROData_Iterator.cxx
src/HYDROGUI/HYDROGUI_DataModel.cxx

index b29eec52cc9645442d8332cd36400bbeb82acdee..734356260d90a69f7bb04f0daae004ea1bf2dbbc 100644 (file)
@@ -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;
index ef8a9065d3da6c647a2f9b3216b381218e530d55..be45989678e6a60151b928f21bc4e0af6489b5f4 100644 (file)
@@ -34,6 +34,7 @@
 #include <HYDROData_Image.h>
 #include <HYDROData_ImmersibleZone.h>
 #include <HYDROData_Iterator.h>
+#include <HYDROData_Polyline3D.h>
 #include <HYDROData_PolylineXY.h>
 #include <HYDROData_Profile.h>
 #include <HYDROData_VisualState.h>
@@ -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";