]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Issue 0051810: TC7.2.0: Impossible to build presentation on family before_mergefrom_V6_main_01Apr13
authorouv <ouv@opencascade.com>
Thu, 21 Mar 2013 10:02:26 +0000 (10:02 +0000)
committerouv <ouv@opencascade.com>
Thu, 21 Mar 2013 10:02:26 +0000 (10:02 +0000)
src/CONVERTOR/VISU_ConvertorDef_impl.hxx
src/CONVERTOR/VISU_Structures_impl.cxx
src/CONVERTOR/VISU_Structures_impl.hxx

index 061db3b2838b33d33609ac151b092bfa6e61bc1f..5cbeb22f2344b9cf0a4d423ddf19809fe46e9f96 100644 (file)
@@ -48,12 +48,14 @@ class VISU_AppendFilter;
 
 class VISU_MergeFilter;
 class VISU_CommonCellsFilter;
+class vtkPassThroughFilter;
 
 namespace VISU
 {
   //---------------------------------------------------------------
   typedef vtkSmartPointer<VISU_MergeFilter> PMergeFilter;
   typedef vtkSmartPointer<VISU_CommonCellsFilter> PCommonCellsFilter;
+  typedef vtkSmartPointer<vtkPassThroughFilter> PPassThroughFilter;
   
   //---------------------------------------------------------------
   typedef vtkSmartPointer<vtkPolyData> PPolyData;
index 96d596d1474158d444539e2742d9d1a09c0b653b..a86a6e32db0ee24f16d06b0c95266f2e988c52e8 100644 (file)
@@ -39,6 +39,7 @@
 #include <vtkPolyData.h>
 #include <vtkCellType.h>
 #include <vtkCell.h>
+#include <vtkPassThroughFilter.h>
 
 namespace VISU
 {
@@ -329,6 +330,18 @@ namespace VISU
     return mySource;
   }
 
+  const PPassThroughFilter&
+  TUnstructuredGridHolder
+  ::GetFilter() const
+  {
+    if(!myFilter.GetPointer()){
+      myFilter = vtkPassThroughFilter::New();
+      myFilter->Delete();
+      myFilter->SetInputData( GetSource() );
+    }
+    return myFilter;
+  }
+
   vtkUnstructuredGrid*
   TUnstructuredGridHolder
   ::GetUnstructuredGridOutput()
@@ -340,7 +353,7 @@ namespace VISU
   TUnstructuredGridHolder
   ::GetOutputPort()
   {
-    return NULL;
+    return GetFilter()->GetOutputPort();
   }
 
   unsigned long int
index 2598cd959fd15e90184166edeb76a8f79ed2c21c..c7e4629cbcf4f2ca8c0f6f2abccd7f544533aa14 100644 (file)
@@ -86,6 +86,10 @@ namespace VISU
     const PUnstructuredGrid& 
     GetSource() const;
 
+    //! This method allow to create corresponding VTK filter by demand (not at once)
+    const PPassThroughFilter& 
+    GetFilter() const;
+
     virtual
     vtkUnstructuredGrid* 
     GetUnstructuredGridOutput();
@@ -101,6 +105,7 @@ namespace VISU
 
   protected:
     mutable PUnstructuredGrid mySource;
+    mutable PPassThroughFilter myFilter;
   };