From: Anthony Geay Date: Tue, 2 Mar 2021 20:15:59 +0000 (+0100) Subject: [EDF22802] : Rosette filter improvement X-Git-Tag: V9_7_0rc2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=716b4d07f97647c8a1035411075ba94bbe73508c;p=tools%2Fparavisaddons_common.git [EDF22802] : Rosette filter improvement --- diff --git a/src/RosetteCIH/plugin/RosetteCIHFilters/vtkRosetteCIH.cxx b/src/RosetteCIH/plugin/RosetteCIHFilters/vtkRosetteCIH.cxx index 8f38c11..ac060ce 100644 --- a/src/RosetteCIH/plugin/RosetteCIHFilters/vtkRosetteCIH.cxx +++ b/src/RosetteCIH/plugin/RosetteCIHFilters/vtkRosetteCIH.cxx @@ -176,8 +176,23 @@ void vtkRosetteCIH::PostTraitementT1etT2( vtkSmartPointer gl2 = this->GenerateGlyphLinesFor(usgIn, "T2", COMPRESS_TRACTION); // + vtkNew surface; + surface->SetNonlinearSubdivisionLevel(0); + surface->SetInputData(usgIn); + surface->Update(); + vtkNew surfaceCpy; + surfaceCpy->ShallowCopy(surface->GetOutput()); + vtkNew compressionOrTraction; + auto nbOfTuples(surface->GetOutput()->GetNumberOfPoints()); + compressionOrTraction->SetNumberOfComponents(1); + compressionOrTraction->SetNumberOfTuples(nbOfTuples); + compressionOrTraction->SetName(COMPRESS_TRACTION); + compressionOrTraction->Fill(NAN); + surfaceCpy->GetPointData()->AddArray(compressionOrTraction); + // vtkNew mb; vtkNew cd; + mb->AddInputData(surfaceCpy); mb->AddInputData(gl1); mb->AddInputData(gl2); cd->SetInputConnection(mb->GetOutputPort()); @@ -449,13 +464,8 @@ void vtkRosetteCIH::PostTraitementOnlyOneCompo(vtkUnstructuredGrid* usgIn, compressionOrTractionNaN->Fill(NAN); fieldData->AddArray(compressionOrTractionNaN); - vtkNew tesselator; - tesselator->SetOutputDimension(1); - tesselator->SetInputData(usgInCpy); - tesselator->Update(); - vtkNew mb; - mb->AddInputData(tesselator->GetOutput()); + mb->AddInputData(usgInCpy); mb->AddInputData(ret); vtkNew cd;