]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Bug PAL7334
authorapo <apo@opencascade.com>
Mon, 27 Dec 2004 12:49:55 +0000 (12:49 +0000)
committerapo <apo@opencascade.com>
Mon, 27 Dec 2004 12:49:55 +0000 (12:49 +0000)
  DEVELOPMENT : Control Improvement

src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_ActorUtils.cxx
src/OBJECT/SMESH_ActorUtils.h
src/OBJECT/SMESH_DeviceActor.cxx
src/OBJECT/SMESH_Object.cxx
src/OBJECT/SMESH_ObjectDef.h

index f29273b4c9ed2b3ae031d8041e37f3e3344c58a1..41b7668f222ff4f4d544b2108b5c9f6f2d459f48 100644 (file)
@@ -826,6 +826,8 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
   my3DActor->Init(myVisualObj,myImplicitBoolean);
   
   my1DActor->GetMapper()->SetLookupTable(myLookupTable);
+  my1DExtActor->GetMapper()->SetLookupTable(myLookupTable);
+
   my2DActor->GetMapper()->SetLookupTable(myLookupTable);
   my3DActor->GetMapper()->SetLookupTable(myLookupTable);
     
@@ -1136,11 +1138,6 @@ void SMESH_ActorDef::SetRepresentation(int theMode){
     if(myRepresentation != ePoint)
       aReperesent = SMESH_DeviceActor::eInsideframe;
     break;
-  case eLength2D:
-  case eFreeEdges:
-  case eFreeBorders:
-    my1DExtActor->SetVisibility(true);
-    break;
   }
   
   my1DActor->SetProperty(aProp);
index a5823c66f03ef69b34823b038bd0a72039e37131..fdaa86c251d9f09a99fa622439afb9f024c00a6a 100644 (file)
@@ -23,6 +23,9 @@
 #include "QAD_Config.h"
 #include "utilities.h"
 
+#include <vtkUnstructuredGrid.h>
+#include <vtkUnstructuredGridWriter.h>
+
 #ifdef _DEBUG_
 static int MYDEBUG = 1;
 #else
@@ -30,10 +33,22 @@ static int MYDEBUG = 0;
 #endif
 
 namespace SMESH{
+
   float GetFloat(const QString& theValue, float theDefault){
     if(theValue.isEmpty()) return theDefault;
     QString aValue = QAD_CONFIG->getSetting(theValue);
     if(aValue.isEmpty()) return theDefault;
     return aValue.toFloat();
   }
+
+  void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName){
+    vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
+    aWriter->SetFileName(theFileName);
+    aWriter->SetInput(theGrid);
+    if(theGrid->GetNumberOfCells()){
+      aWriter->Write();
+    }
+    aWriter->Delete();
+  }
+
 }
index 4595495244e191733922426f2207bca901fc7208..b9a01e003fdb9e8250cdf8dabd776e3be6c7a30b 100644 (file)
 
 #include <qstring.h>
 
+class vtkUnstructuredGrid;
 
 namespace SMESH{
+  
   float GetFloat(const QString& theValue, float theDefault = 0);
-}
 
+  void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName);
+
+}
 
 #endif
index 9670ad3d03ac33c6965c03659c74dc0b1ae65fa8..c46bbe2240de523e405fe4fe5c9eb2673fe25867 100644 (file)
@@ -30,6 +30,7 @@
 #include "SMESH_DeviceActor.h"
 #include "SMESH_ExtractGeometry.h"
 #include "SMESH_ControlsDef.hxx"
+#include "SMESH_ActorUtils.h"
 
 #include "SALOME_Transform.h"
 #include "SALOME_TransformFilter.h"
@@ -331,8 +332,6 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor
       theLookupTable->SetRange(aScalars->GetRange());
       theLookupTable->Build();
       
-      SetUnstructuredGrid(aDataSet);
-      
       myMergeFilter->SetScalars(aDataSet);
       aDataSet->Delete();
     }
index e4d4a910793733473bb182581c623f8ac47820e7..c640f676435e0e41f1897696c14c192b624b62c5 100644 (file)
@@ -26,6 +26,7 @@
 //  Module : SMESH
 
 #include "SMESH_ObjectDef.h"
+#include "SMESH_ActorUtils.h"
 
 #include "SMDS_Mesh.hxx"
 #include "SMESH_Actor.h"
@@ -41,8 +42,6 @@
 #include <vtkUnsignedCharArray.h>
 
 #include <vtkUnstructuredGrid.h>
-#include <vtkUnstructuredGridWriter.h>
-#include <vtkUnstructuredGridReader.h>
 
 #include <memory>
 #include <sstream>     
@@ -70,17 +69,6 @@ static int MYDEBUGWITHFILES = 0;
 #endif
 
 
-void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName){
-  vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
-  aWriter->SetFileName(theFileName);
-  aWriter->SetInput(theGrid);
-  if(theGrid->GetNumberOfCells()){
-    aWriter->Write();
-  }
-  aWriter->Delete();
-}
-
-
 namespace{
 
   inline const SMDS_MeshNode* FindNode(const SMDS_Mesh* theMesh, int theId){
@@ -393,7 +381,7 @@ void SMESH_VisualObjDef::buildPrs()
   }
   
   if( MYDEBUG ) MESSAGE( "Update - myGrid->GetNumberOfCells() = "<<myGrid->GetNumberOfCells() );
-  if( MYDEBUGWITHFILES ) WriteUnstructuredGrid( myGrid,"/tmp/buildPrs" );
+  if( MYDEBUGWITHFILES ) SMESH::WriteUnstructuredGrid( myGrid,"/tmp/buildPrs" );
 }
 
 //=================================================================================
index eabede8b3ca0f758161c2fa0c76415608026f52b..16cda551887953be5a9079737615cb81bfed9bfe 100644 (file)
@@ -201,7 +201,4 @@ protected:
 };
 
 
-extern void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName);
-
-
 #endif