]> SALOME platform Git repositories - tools/paravisaddons_common.git/commitdiff
Salome HOME
mode T1&T2 avec la grille
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 2 Mar 2021 20:15:59 +0000 (21:15 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 2 Mar 2021 20:15:59 +0000 (21:15 +0100)
src/RosetteCIH/plugin/RosetteCIHFilters/vtkRosetteCIH.cxx

index 8f38c11a4a7c7d8cf110d604e52c3e9ab839f32a..6a2b19144db7da1bc24addf2848a2ece352acac1 100644 (file)
@@ -176,8 +176,23 @@ void vtkRosetteCIH::PostTraitementT1etT2(
   vtkSmartPointer<vtkDataSet> gl2 =
     this->GenerateGlyphLinesFor(usgIn, "T2", COMPRESS_TRACTION);
   //
+  vtkNew<vtkDataSetSurfaceFilter> surface;
+  surface->SetNonlinearSubdivisionLevel(0);
+  surface->SetInputData(usgIn);
+  surface->Update();
+  vtkNew<vtkPolyData> surfaceCpy;
+  surfaceCpy->ShallowCopy(surface->GetOutput());
+  vtkNew<vtkDoubleArray> compressionOrTraction;
+  auto nbOfTuples(surface->GetOutput()->GetNumberOfPoints());
+  compressionOrTraction->SetNumberOfComponents(1);
+  compressionOrTraction->SetNumberOfTuples(nbOfTuples);
+  compressionOrTraction->SetName(COMPRESS_TRACTION);
+  compressionOrTraction->Fill(NAN);
+  surfaceCpy->GetPointData()->AddArray(compressionOrTraction);
+  //
   vtkNew<vtkMultiBlockDataGroupFilter> mb;
   vtkNew<vtkCompositeDataToUnstructuredGridFilter> cd;
+  mb->AddInputData(surfaceCpy);
   mb->AddInputData(gl1);
   mb->AddInputData(gl2);
   cd->SetInputConnection(mb->GetOutputPort());