]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
merge BR_hydro_v1_0_3 on BR_quadtree
authorPaul RASCLE <paul.rascle@edf.fr>
Mon, 6 Oct 2014 21:48:58 +0000 (21:48 +0000)
committerPaul RASCLE <paul.rascle@edf.fr>
Mon, 6 Oct 2014 21:48:58 +0000 (21:48 +0000)
src/HYDROData/HYDROData_Document.cxx
src/HYDROData/HYDROData_SplitToZonesTool.cxx
src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx
src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.h

index 86d16b089d2686eb1e724daf1a5b521cef3e8d19..5f95e02b3a6736a697daf18e2dccf05db5bb6426 100644 (file)
@@ -205,6 +205,8 @@ bool HYDROData_Document::DumpToPython( const QString& theFileName,
   // Dump the local CS data to Python 
   UpdateLCSFields();
   QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX ).arg( myLY );
+  if( theIsMultiFile )
+    aLCS.prepend( "  " );
   HYDROData_Tool::WriteStringsToFile( aFile, QStringList() << aLCS );
 
   // Dump all model objects to Python script
index 16062cf5b19877fd96cb7f8a74be1b6e9aa15890..fabf15d9340c3b2e68d4ba38a4dda6aebf26cd1e 100644 (file)
@@ -266,13 +266,15 @@ HYDROData_SplitToZonesTool::SplitDataList
       TopTools_ListIteratorOfListOfShape it(aListOfNew);
       for(;it.More();it.Next())       
         aList.Append(it.Value());
+         /* *********************************************************************
       // Bug in History: partition should give only modified entities! => temporary solution is used
-      const TopTools_ListOfShape& aListOfGen = splitTool.Generated(anIt.Value());
-      if(!aListOfGen.IsEmpty())
-        foundF = Standard_True;
-      it.Initialize(aListOfGen);    
-      for(;it.More();it.Next())     
-        aList.Append(it.Value());
+      //const TopTools_ListOfShape& aListOfGen = splitTool.Generated(anIt.Value());
+      //if(!aListOfGen.IsEmpty())
+        //foundF = Standard_True;
+      //it.Initialize(aListOfGen);    
+      //for(;it.More();it.Next())     
+       // aList.Append(it.Value());  
+          ********************************************************************* */
       if(!foundF) // face is not modified
         aList.Append (anIt.Value());
       aDM1.Bind(anIt.Value(), aList);
@@ -295,12 +297,14 @@ HYDROData_SplitToZonesTool::SplitDataList
             //BRepTools::Write(it.Value(),aName.ToCString());
   #endif
           }
-          const TopTools_ListOfShape& aListG = splitTool.Generated(exp.Current());
-          if(aListG.Extent()) foundE = Standard_True;
-          it.Initialize(aListG);    
-          for(int k=1;it.More();it.Next(),k++)
-            aList.Append(it.Value());
+          /* *********************************************************************
+                 //const TopTools_ListOfShape& aListG = splitTool.Generated(exp.Current());
+          //if(aListG.Extent()) foundE = Standard_True;
+          //it.Initialize(aListG);    
+          //for(int k=1;it.More();it.Next(),k++)
+            //aList.Append(it.Value());
           //cout << "NB_EDGE = " << aList.Extent() <<endl;
+                 ************************************************************************** */
           if(!foundE) {
             aList.Append (exp.Current());
   #ifdef DEB_SPLIT_TO_ZONES
@@ -371,7 +375,7 @@ HYDROData_SplitToZonesTool::SplitDataList
                     if(!mkCom.IsDeleted(aFace)) {
                       const TopTools_ListOfShape& aListOfGen = mkCom.Generated(aFace);    
                       if(!aListOfGen.IsEmpty()) {
-                        aDM4.Bind(aFace, aListOfGen);    
+                        /* aDM4.Bind(aFace, aListOfGen); ???   */
 #ifdef DEB_SPLIT_TO_ZONES
                         //TCollection_AsciiString aName = aNam + i + "g.brep";
                         //BRepTools::Write(aListOfGen.Last(), aName.ToCString());
@@ -397,7 +401,7 @@ HYDROData_SplitToZonesTool::SplitDataList
                    if(!mkCom.IsDeleted(anEdge)) {
                      const TopTools_ListOfShape& aListOfGenEd = mkCom.Generated(anEdge);
                      if(!aListOfGenEd.IsEmpty()) {
-                       aDM4.Bind(anEdge, aListOfGenEd);
+                       /* aDM4.Bind(anEdge, aListOfGenEd); ???*/
                      } else {
                        TopTools_ListOfShape aList; 
                        aList.Append(anEdge);
@@ -433,7 +437,7 @@ HYDROData_SplitToZonesTool::SplitDataList
                if(!mkCom.IsDeleted(anEdge)) {
                  const TopTools_ListOfShape& aListOfGenEd = mkCom.Generated(anEdge);
                  if(!aListOfGenEd.IsEmpty()) {
-                   aDM4.Bind(anEdge, aListOfGenEd);
+                   /* aDM4.Bind(anEdge, aListOfGenEd); ??? */
                  } else {
                    TopTools_ListOfShape aList; 
                    aList.Append(anEdge);
index b096a067269bf316943b42c05495e80ab8ce7197..a3d00e2f5c348aa4e5c8dc9800dd0fb4b0399c04 100644 (file)
@@ -90,6 +90,43 @@ void HYDROGUI_VTKPrsDisplayer::SetToUpdate( const HYDROData_SequenceOfObjects& t
   }
 }
 
+void HYDROGUI_VTKPrsDisplayer::DisplayAll( const int theViewerId,
+                                           const bool theIsForced,
+                                           const bool theDoFitAll )
+{
+  HYDROGUI_AbstractDisplayer::DisplayAll( theViewerId, theIsForced, theDoFitAll );
+
+  bool isEraseScalarBar = true;
+
+  SVTK_Viewer* aViewer = module()->getVTKViewer( theViewerId );
+  if( aViewer )
+  {
+    SALOME_ListIO aListIO;
+    aViewer->GetVisible( aListIO );
+    
+    HYDROGUI_VTKPrs* aPrs;
+    SALOME_ListIteratorOfListIO anIter( aListIO );
+    for( ; anIter.More(); anIter.Next() )
+    {
+      Handle(SALOME_InteractiveObject) aPrsObj = anIter.Value();
+      if ( !aPrsObj.IsNull() )
+      {
+        Handle(HYDROData_Entity) anObj = 
+          module()->getDataModel()->objectByEntry( aPrsObj->getEntry() );
+        aPrs = module()->getObjectVTKPrs( (size_t)aViewer, anObj );
+        if( aPrs->needScalarBar() )
+        {
+          isEraseScalarBar = false;
+          break;
+        }
+      }
+    }
+  }
+
+  if( isEraseScalarBar )
+    EraseScalarBar( theViewerId );
+}
+
 void HYDROGUI_VTKPrsDisplayer::EraseAll( const int theViewerId )
 {
   SVTK_Viewer* aViewer = module()->getVTKViewer( theViewerId );
index 66e2f75111e7c47356c5178e309c620d0bbb5105..def7b8a4a0c8f8deee3d4b38560ad46bfd37b257 100644 (file)
@@ -78,6 +78,11 @@ public:
   void             EraseScalarBar( const int theViewerId, const bool theIsDelete = false );
 
 protected:
+
+  virtual void     DisplayAll( const int theViewerId,
+                               const bool theIsForced,
+                               const bool theDoFitAll );
+
   /**
    * \brief Erase all viewer objects.
    * \param theViewerId viewer identifier