X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MeshEditPreview.cxx;h=b411a3f4d73736d9e3e6e8dc0f2587f7823e1a0d;hp=7dca619fb97c75670ee3ead61eb71c461f293899;hb=b09372829929f8f561495d6c16527134971a1909;hpb=30ce546b0c5099ad1112929e2db94810e683e54b diff --git a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx index 7dca619fb..b411a3f4d 100644 --- a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -34,7 +34,7 @@ // SALOME GUI includes #include #include -#include +//#include // VTK includes #include @@ -167,10 +167,10 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType, */ //================================================================================ -void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewData) +void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct& previewData) { // Create points - const SMESH::nodes_array& aNodesXYZ = previewData->nodesXYZ; + const SMESH::nodes_array& aNodesXYZ = previewData.nodesXYZ; vtkPoints* aPoints = vtkPoints::New(); aPoints->SetNumberOfPoints(aNodesXYZ.length()); @@ -182,8 +182,8 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewD aPoints->Delete(); // Create cells - const SMESH::long_array& anElemConnectivity = previewData->elementConnectivities; - const SMESH::types_array& anElemTypes = previewData->elementTypes; + const SMESH::long_array& anElemConnectivity = previewData.elementConnectivities; + const SMESH::types_array& anElemTypes = previewData.elementTypes; vtkIdType aCellsSize = anElemConnectivity.length() + anElemTypes.length(); vtkIdType aNbCells = anElemTypes.length(); @@ -217,12 +217,13 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewD anIdList->Delete(); // Insert cells in grid - VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents( 1 ); aCellLocationsArray->SetNumberOfTuples( aNbCells ); aConnectivity->InitTraversal(); - for( vtkIdType idType = 0, *pts, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ) + vtkIdType const *pts(nullptr); + for( vtkIdType idType = 0, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ) aCellLocationsArray->SetValue( idType, aConnectivity->GetTraversalLocation( npts ) ); myGrid->SetCells( aCellTypesArray, aCellLocationsArray, aConnectivity );