]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Added VTK_EXPORT macros to class.
authormgn <mgn@opencascade.com>
Fri, 21 Nov 2014 07:57:47 +0000 (10:57 +0300)
committerrnv <rnv@opencascade.com>
Wed, 4 Feb 2015 13:25:25 +0000 (16:25 +0300)
src/Plugins/DifferenceTimesteps/CMakeLists.txt
src/Plugins/DifferenceTimesteps/DifferenceTimesteps.xml
src/Plugins/DifferenceTimesteps/plugin.cmake [new file with mode: 0644]
src/Plugins/DifferenceTimesteps/vtkDifferenceTimestepsFilter.cxx
src/Plugins/DifferenceTimesteps/vtkDifferenceTimestepsFilter.h

index 0568f112a1f34a91209d7157ee319bcf3cea97b3..b3e47361ab36f22ac152dfd6d901151470b7be7d 100644 (file)
@@ -16,6 +16,7 @@
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+# Author : Maxim Glibin
 
 PROJECT(DifferenceTimesteps)
 
@@ -31,7 +32,6 @@ ADD_PARAVIEW_PLUGIN(DifferenceTimesteps "1.0"
   GUI_RESOURCE_FILES DifferenceTimestepsGUI.xml
   )
 
-INSTALL(
-  TARGETS DifferenceTimesteps
+INSTALL(TARGETS DifferenceTimesteps
   DESTINATION lib/paraview
 )
index 669b722bc23901504d98491ca899c2651e59c2d8..e62195db05682952b94db236b6f9b334c8cdf733 100644 (file)
@@ -75,7 +75,7 @@
         command="SetFirstTimeStepIndex"
         number_of_elements="1"
         default_values="0"
-        animateable="1"
+        animateable="0"
         information_property="RangeIndicesTimeStepsInfo">
         <IntRangeDomain name="range" default_mode="min">
           <RequiredProperties>
         command="SetArrayNamePrefix"
         number_of_elements="1"
         animateable="0"
-        default_values="diff_" >
+        default_values="diff_"
+        panel_visibility="advanced" >
         <Documentation>
           Prefix to a new array name.
         </Documentation>
       </StringVectorProperty>
 
+      <PropertyGroup label="Timing">
+        <Property name="FirstTimeStepIndex" />
+        <Property name="SecondTimeStepIndex" />
+      </PropertyGroup>
+      <PropertyGroup label="Additional attributes">
+        <Property name="ArrayNamePrefix" />
+      </PropertyGroup>
+      <Hints>
+        <Visibility replace_input="0" />
+      </Hints>
+
     </SourceProxy>
   </ProxyGroup>
 </ServerManagerConfiguration>
diff --git a/src/Plugins/DifferenceTimesteps/plugin.cmake b/src/Plugins/DifferenceTimesteps/plugin.cmake
new file mode 100644 (file)
index 0000000..686ebde
--- /dev/null
@@ -0,0 +1,3 @@
+pv_plugin(DifferenceTimesteps
+  DESCRIPTION "Compute difference between two time steps"
+  DEFAULT_ENABLED)
index 9a8b3aa34ced7d7b72b55c56c3a20b03c1ce06fb..8cd7dafd4661e3d304d3e155848953dced90216b 100644 (file)
@@ -15,6 +15,8 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Maxim Glibin
 
 #include "vtkDifferenceTimestepsFilter.h"
 
@@ -213,7 +215,14 @@ int vtkDifferenceTimestepsFilter::RequestInformation(
   // Update range of indices of the time steps
   this->RangeIndicesTimeSteps[0] = 0;
   this->RangeIndicesTimeSteps[1] = this->NumberTimeSteps - 1;
-
+  
+  /*
+   * RNV: Temporary commented:
+   *      This piece of the code removes all time steps from the output object, 
+   *      but this leads to the strange side effect in the ParaView: time steps also disappears 
+   *      from the animation scene of the input (parent) object of this filter.
+   *      Seems it is a bug of the ParaView, to be investigated ...
+   *
   // The output data of this filter has no time associated with it.
   // It is the result of computation difference between two time steps.
   // Unset the time steps
@@ -223,7 +232,7 @@ int vtkDifferenceTimestepsFilter::RequestInformation(
   // Unset the time range
   if(anOutInfo->Has(vtkStreamingDemandDrivenPipeline::TIME_RANGE()))
     anOutInfo->Remove(vtkStreamingDemandDrivenPipeline::TIME_RANGE());
-
+  */
   return 1;
 }
 
@@ -416,12 +425,13 @@ vtkDataSet* vtkDifferenceTimestepsFilter::DifferenceDataSet(vtkDataSet* theInput
 
     anOutputArray = this->DifferenceDataArray(&anArrays[0], anArrays[0]->GetNumberOfTuples());
     // Determine a field association
-    if (this->GetInputFieldAssociation() == vtkDataObject::FIELD_ASSOCIATION_POINTS)
+    int aTypeFieldAssociation = this->GetInputFieldAssociation();
+    if (aTypeFieldAssociation == vtkDataObject::FIELD_ASSOCIATION_POINTS)
     {
       // For point data
       anOutput->GetPointData()->AddArray(anOutputArray);
     }
-    else if (this->GetInputFieldAssociation() == vtkDataObject::FIELD_ASSOCIATION_CELLS)
+    else if (aTypeFieldAssociation == vtkDataObject::FIELD_ASSOCIATION_CELLS)
     {
       // For cell data
       anOutput->GetCellData()->AddArray(anOutputArray);
index df06db6fb9b05536034b01d79f85b372f7efa8ef..12bbf63cec6857be177dfda881d82c56ce408322 100644 (file)
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Maxim Glibin
 
-#ifndef __DifferenceTimestepsFilter_h
-#define __DifferenceTimestepsFilter_h
+#ifndef __DifferenceTimestepsFilter_h_
+#define __DifferenceTimestepsFilter_h_
 
 #include <vtkMultiTimeStepAlgorithm.h>
 
@@ -143,4 +145,4 @@ private:
   bool VerifyArrays(vtkDataArray **theArrays, int theNumArrays);
 };
 
-#endif // __DifferenceTimestepsFilter_h
+#endif // __DifferenceTimestepsFilter_h_