From: Anthony Geay Date: Tue, 21 Sep 2021 05:26:10 +0000 (+0200) Subject: [EDF23941] : Fix problem of visualization with SurfaceWithEdge in PV590. X-Git-Tag: V9_8_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6e67af436d503032acedb9022113795aa672402d;p=tools%2Fparavisaddons_common.git [EDF23941] : Fix problem of visualization with SurfaceWithEdge in PV590. --- diff --git a/src/RosetteCIH/plugin/RosetteCIHFilters/vtkRosetteCIH.cxx b/src/RosetteCIH/plugin/RosetteCIHFilters/vtkRosetteCIH.cxx index ac060ce..f35664b 100644 --- a/src/RosetteCIH/plugin/RosetteCIHFilters/vtkRosetteCIH.cxx +++ b/src/RosetteCIH/plugin/RosetteCIHFilters/vtkRosetteCIH.cxx @@ -41,6 +41,7 @@ #include #include #include +#include //----------------------------------------------------------------------------- void vtkRosetteCIH::ExtractInfo( @@ -408,7 +409,7 @@ void vtkRosetteCIH::PostTraitementOnlyOneCompo(vtkUnstructuredGrid* usgIn, vtkNew normals; normals->ComputeCellNormalsOn(); - normals->ComputePointNormalsOff(); + normals->ComputePointNormalsOn(); normals->SplittingOff(); normals->SetInputConnection(surface->GetOutputPort()); normals->Update(); @@ -423,8 +424,14 @@ void vtkRosetteCIH::PostTraitementOnlyOneCompo(vtkUnstructuredGrid* usgIn, normals->GetOutput()->GetCellData()->AddArray(savedNormalsArray); + vtkNew warp; + warp->SetInputConnection(normals->GetOutputPort()); + warp->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "Normals"); + warp->SetScaleFactor(normals->GetOutput()->GetLength()/1000); + warp->Update(); + vtkNew glyph; - glyph->SetInputConnection(normals->GetOutputPort()); + glyph->SetInputConnection(warp->GetOutputPort()); glyph->SetGlyphMode(0); // vtkPVGlyphFilter::ALL_POINTS glyph->SetVectorScaleMode(0); // vtkPVGlyphFilter::SCALE_BY_MAGNITUDE glyph->SetSourceConnection(arrow->GetOutputPort());