Porting to ParaView 5.8

This commit is contained in:
Pascal Obry 2020-01-31 11:56:07 +01:00 committed by vsr
parent 54db132ba1
commit c9c3fe8924
35 changed files with 95 additions and 99 deletions

View File

@ -31,7 +31,7 @@ class SalomeSession(object):
pass
sys.argv = [run_script]
sys.argv += ["--terminal"]
sys.argv += ["--modules=GEOM,MED,SMESH"]
sys.argv += ["--modules=GEOM,SMESH"]
sys.argv += ["%s" % script]
if sys.platform == 'win32':
main_module_path = sys.modules['__main__'].__file__

View File

@ -21,7 +21,6 @@
# additional include directories
INCLUDE_DIRECTORIES(
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/SMDS
@ -37,13 +36,13 @@ ADD_DEFINITIONS(
# libraries to link to
SET(_link_LIBRARIES
${VTK_LIBRARIES}
${OpenCASCADE_FoundationClasses_LIBRARIES}
${OpenCASCADE_ModelingData_LIBRARIES}
${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
SMDS
SMESHDS
SMESHUtils
VTK::FiltersVerdict
)
# --- headers ---

View File

@ -23,7 +23,6 @@ INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${CGNS_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/Driver
${PROJECT_SOURCE_DIR}/src/SMDS

View File

@ -22,7 +22,6 @@
INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/Driver
${PROJECT_SOURCE_DIR}/src/SMDS

View File

@ -22,7 +22,6 @@
INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/Driver
${PROJECT_SOURCE_DIR}/src/SMDS

View File

@ -24,7 +24,6 @@ INCLUDE_DIRECTORIES(
${HDF5_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/MEDWrapper
${PROJECT_SOURCE_DIR}/src/Driver

View File

@ -22,7 +22,6 @@
INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/Driver
${PROJECT_SOURCE_DIR}/src/SMDS

View File

@ -22,7 +22,6 @@
INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/Driver
${PROJECT_SOURCE_DIR}/src/SMDS

View File

@ -26,7 +26,6 @@ INCLUDE_DIRECTORIES(
${QWT_INCLUDE_DIR}
${GEOM_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/Controls
@ -50,19 +49,19 @@ ADD_DEFINITIONS(
# libraries to link to
SET(_link_LIBRARIES
${QT_LIBRARIES}
${VTK_LIBRARIES}
${OpenCASCADE_KERNEL}
${GEOM_GEOMObject}
${GUI_SalomeApp}
${GUI_SalomeObject}
${GUI_SVTK}
${GUI_VTKViewer}
${GUI_qtx}
${GUI_suit}
${GUI_std}
${GUI_SalomeApp}
SMESHClient
SMDS
SMESHControls
VTK::RenderingLabel
)
IF(SALOME_USE_PLOT2DVIEWER)

View File

@ -431,7 +431,8 @@ SMESH_DeviceActor
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 ) );
aDataSet->SetCells( aCellTypesArray, aCellLocationsArray, aConnectivity );
@ -495,7 +496,8 @@ SMESH_DeviceActor
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 ) );
aDataSet->SetCells( aCellTypesArray, aCellLocationsArray,aConnectivity );
@ -589,7 +591,8 @@ SMESH_DeviceActor
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 ) );
aDataSet->SetCells( aCellTypesArray, aCellLocationsArray,aConnectivity );

View File

@ -472,7 +472,8 @@ void SMESH_VisualObjDef::buildElemPrs()
SMDS_Mesh::CheckMemory(); // PAL16631
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 );

View File

@ -52,8 +52,6 @@ SET(_link_LIBRARIES
${QT_MT_LIBS}
${GUI_SalomeObject}
${GUI_suit}
${GUI_LightApp}
${GUI_SalomeApp}
SalomeIDLSMESH
SMESH
)

View File

@ -21,7 +21,6 @@
# additional include directories
INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
@ -32,9 +31,10 @@ ADD_DEFINITIONS(
# libraries to link to
SET(_link_LIBRARIES
${VTK_LIBRARIES}
${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil}
VTK::CommonCore
VTK::CommonDataModel
)
# --- headers ---

View File

@ -304,7 +304,7 @@ int SMDS_Down1D::getNodeSet(int cellId, int* nodeSet)
void SMDS_Down1D::setNodes(int cellId, int vtkId)
{
vtkIdType npts = 0;
vtkIdType *pts; // will refer to the point id's of the face
vtkIdType const *pts(nullptr); // will refer to the point id's of the face
_grid->GetCellPoints(vtkId, npts, pts);
// MESSAGE(vtkId << " " << npts << " " << _nbDownCells);
//ASSERT(npts == _nbDownCells);
@ -533,7 +533,7 @@ int SMDS_Down2D::computeVolumeIds(int cellId, int* ids)
// --- find point id's of the face
vtkIdType npts = 0;
vtkIdType *pts; // will refer to the point id's of the face
vtkIdType const *pts(nullptr); // will refer to the point id's of the face
_grid->GetCellPoints(cellId, npts, pts);
vector<int> nodes;
for (int i = 0; i < npts; i++)
@ -628,7 +628,7 @@ int SMDS_Down2D::computeVolumeIdsFromNodesFace(int* pts, int npts, int* ids)
void SMDS_Down2D::setTempNodes(int cellId, int vtkId)
{
vtkIdType npts = 0;
vtkIdType *pts; // will refer to the point id's of the face
vtkIdType const *pts(nullptr); // will refer to the point id's of the face
_grid->GetCellPoints(vtkId, npts, pts);
// MESSAGE(vtkId << " " << npts << " " << _nbNodes);
//ASSERT(npts == _nbNodes);
@ -796,7 +796,7 @@ void SMDS_Down3D::getNodeIds(int cellId, std::set<int>& nodeSet)
{
int vtkId = this->_vtkCellIds[cellId];
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(vtkId, npts, nodes);
for (int i = 0; i < npts; i++)
nodeSet.insert(nodes[i]);
@ -1127,7 +1127,7 @@ void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
//MESSAGE("cellId = " << cellId);
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
set<int> tofind;
@ -1179,7 +1179,7 @@ void SMDS_DownTetra::computeFacesWithNodes(int cellId, ListElemByNodesType& face
// --- find point id's of the volume
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(cellId, npts, nodes);
// --- create all the ordered list of node id's for each face
@ -1235,7 +1235,7 @@ void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
//MESSAGE("cellId = " << cellId);
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
set<int> tofind;
@ -1289,7 +1289,7 @@ void SMDS_DownQuadTetra::computeFacesWithNodes(int cellId, ListElemByNodesType&
// --- find point id's of the volume
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(cellId, npts, nodes);
// --- create all the ordered list of node id's for each face
@ -1358,7 +1358,7 @@ void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>&
//MESSAGE("cellId = " << cellId);
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
set<int> tofind;
@ -1436,7 +1436,7 @@ void SMDS_DownPyramid::computeFacesWithNodes(int cellId, ListElemByNodesType& fa
// --- find point id's of the volume
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(cellId, npts, nodes);
// --- create all the ordered list of node id's for each face
@ -1501,7 +1501,7 @@ void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdTy
//MESSAGE("cellId = " << cellId);
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
set<int> tofind;
@ -1581,7 +1581,7 @@ void SMDS_DownQuadPyramid::computeFacesWithNodes(int cellId, ListElemByNodesType
// --- find point id's of the volume
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(cellId, npts, nodes);
// --- create all the ordered list of node id's for each face
@ -1661,7 +1661,7 @@ void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
//MESSAGE("cellId = " << cellId);
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
set<int> tofind;
@ -1745,7 +1745,7 @@ void SMDS_DownPenta::computeFacesWithNodes(int cellId, ListElemByNodesType& face
// --- find point id's of the volume
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(cellId, npts, nodes);
// --- create all the ordered list of node id's for each face
@ -1811,7 +1811,7 @@ void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
//MESSAGE("cellId = " << cellId);
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
set<int> tofind;
@ -1897,7 +1897,7 @@ void SMDS_DownQuadPenta::computeFacesWithNodes(int cellId, ListElemByNodesType&
// --- find point id's of the volume
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(cellId, npts, nodes);
// --- create all the ordered list of node id's for each face
@ -1982,7 +1982,7 @@ void SMDS_DownHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& or
//MESSAGE("cellId = " << cellId);
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
set<int> tofind;
@ -2037,7 +2037,7 @@ void SMDS_DownHexa::computeFacesWithNodes(int cellId, ListElemByNodesType& faces
// --- find point id's of the volume
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(cellId, npts, nodes);
// --- create all the ordered list of node id's for each face
@ -2113,7 +2113,7 @@ void SMDS_DownQuadHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>
//MESSAGE("cellId = " << cellId);
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes(nullptr); // will refer to the point id's of the volume
_grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
set<int> tofind;
@ -2168,7 +2168,7 @@ void SMDS_DownQuadHexa::computeFacesWithNodes(int cellId, ListElemByNodesType& f
// --- find point id's of the volume
vtkIdType npts = 0;
vtkIdType *nodes; // will refer to the point id's of the volume
vtkIdType const *nodes; // will refer to the point id's of the volume
_grid->GetCellPoints(cellId, npts, nodes);
// --- create all the ordered list of node id's for each face

View File

@ -490,8 +490,10 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity,
bool SMDS_MeshCell::ChangeNodes(const SMDS_MeshNode* nodes[], const int theNbNodes)
{
vtkIdType npts = 0;
vtkIdType* pts = 0;
getGrid()->GetCellPoints( GetVtkID(), npts, pts );
vtkIdType *pts(nullptr);
vtkIdType const *tmp(nullptr);
getGrid()->GetCellPoints( GetVtkID(), npts, tmp );
pts = const_cast<vtkIdType *>(tmp);
if ( theNbNodes != npts )
{
MESSAGE("ChangeNodes problem: not the same number of nodes " << npts << " -> " << theNbNodes);
@ -519,7 +521,8 @@ int SMDS_MeshCell::NbNodes() const
{
if ( GetVtkType() == VTK_POLYHEDRON )
return static_cast< const SMDS_MeshVolume* >( this )->SMDS_MeshVolume::NbNodes();
vtkIdType *pts, npts;
vtkIdType npts;
vtkIdType const *pts;
getGrid()->GetCellPoints( GetVtkID(), npts, pts );
return npts;
}
@ -631,7 +634,8 @@ const SMDS_MeshNode* SMDS_MeshCell::GetNode(const int ind) const
if ( GetVtkType() == VTK_POLYHEDRON )
return static_cast< const SMDS_MeshVolume* >( this )->SMDS_MeshVolume::GetNode( ind );
vtkIdType npts, *pts;
vtkIdType npts;
vtkIdType const *pts;
getGrid()->GetCellPoints( GetVtkID(), npts, pts );
const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( GetVtkType() ));
return GetMesh()->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ ind ]]);
@ -645,7 +649,8 @@ int SMDS_MeshCell::GetNodeIndex( const SMDS_MeshNode* node ) const
if ( GetVtkType() == VTK_POLYHEDRON )
return static_cast< const SMDS_MeshVolume* >( this )->SMDS_MeshVolume::GetNodeIndex( node );
vtkIdType npts, *pts;
vtkIdType npts;
vtkIdType const *pts;
getGrid()->GetCellPoints( GetVtkID(), npts, pts );
for ( vtkIdType i = 0; i < npts; ++i )
if ( pts[i] == node->GetVtkID() )

View File

@ -82,8 +82,9 @@ bool SMDS_MeshVolume::ChangeNodes(const std::vector<const SMDS_MeshNode*>& nodes
return false;
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
vtkIdType const *tmp(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, tmp );
vtkIdType *ptIds = const_cast<vtkIdType*>( tmp );
// stream size and nb faces should not change
@ -91,14 +92,14 @@ bool SMDS_MeshVolume::ChangeNodes(const std::vector<const SMDS_MeshNode*>& nodes
{
return false;
}
int id = 0, nbPoints = 0;
size_t id = 0, nbPoints = 0;
for ( int i = 0; i < nFaces; i++ )
{
int nodesInFace = ptIds[id];
nbPoints += nodesInFace;
id += (nodesInFace + 1);
}
if ((int) nodes.size() != nbPoints )
if ( nodes.size() != nbPoints )
{
return false;
}
@ -120,7 +121,7 @@ const SMDS_MeshNode* SMDS_MeshVolume::GetNode(const int ind) const
return SMDS_MeshCell::GetNode( ind );
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0, nbPoints = 0;
for (int i = 0; i < nFaces; i++)
@ -139,7 +140,7 @@ int SMDS_MeshVolume::NbNodes() const
return SMDS_MeshCell::NbNodes();
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0, nbPoints = 0;
for (int i = 0; i < nFaces; i++)
@ -157,7 +158,7 @@ int SMDS_MeshVolume::NbFaces() const
return SMDS_MeshCell::NbFaces();
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
return nFaces;
@ -168,7 +169,7 @@ int SMDS_MeshVolume::NbEdges() const
return SMDS_MeshCell::NbEdges();
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0, nbEdges = 0;
for (int i = 0; i < nFaces; i++)
@ -187,7 +188,7 @@ int SMDS_MeshVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
return SMDS_MeshCell::GetNodeIndex( node );
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0;
for (int iF = 0; iF < nFaces; iF++)
@ -227,7 +228,7 @@ int SMDS_MeshVolume::NbFaceNodes (const int face_ind) const
return SMDS_VolumeTool( this ).NbFaceNodes( face_ind-1 );
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0, nbNodes = 0;
for (int i = 0; i < nFaces; i++)
@ -249,7 +250,7 @@ const SMDS_MeshNode* SMDS_MeshVolume::GetFaceNode (const int face_ind, const int
return SMDS_VolumeTool( this ).GetFaceNodes( face_ind-1 )[ node_ind - 1 ];
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds);
int id = 0;
for (int i = 0; i < nFaces; i++)
@ -271,7 +272,7 @@ std::vector<int> SMDS_MeshVolume::GetQuantities() const
if ( IsPoly() )
{
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
int id = 0;
for (int i = 0; i < nFaces; i++)

View File

@ -59,7 +59,7 @@ void SMDS_CellLinks::BuildLinks(vtkDataSet *data, vtkCellArray *Connectivity, vt
vtkIdType j, cellId = 0;
unsigned short *linkLoc;
vtkIdType npts=0;
vtkIdType *pts=0;
vtkIdType const *pts(nullptr);
vtkIdType loc = Connectivity->GetTraversalLocation();
// traverse data to determine number of uses of each point
@ -160,8 +160,8 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
{
if ( setOfNodes.insert( pts[i] ).second )
{
this->Links->ResizeCellList( pts[i], 1 );
this->Links->AddCellReference( cellid, pts[i] );
(static_cast< vtkCellLinks * >(this->Links.GetPointer()))->ResizeCellList( pts[i], 1 );
(static_cast< vtkCellLinks * >(this->Links.GetPointer()))->AddCellReference( cellid, pts[i] );
}
i++;
}
@ -225,7 +225,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
if ( false /*!updateCells*/ ) // no holes in elements
{
this->Connectivity->Squeeze();
this->Locations->Squeeze();
this->CellLocations->Squeeze();
this->Types->Squeeze();
if ( this->FaceLocations )
{
@ -249,7 +249,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
if ( newCellSize != oldCellSize )
for ( int i = 0; i < oldCellSize - 1; ++i )
if ( this->Types->GetValue( i ) == VTK_EMPTY_CELL )
newConnectivitySize -= this->Locations->GetValue( i+1 ) - this->Locations->GetValue( i );
newConnectivitySize -= this->Connectivity->GetCellSize( i );
vtkCellArray *newConnectivity = vtkCellArray::New();
newConnectivity->Initialize();
@ -320,12 +320,14 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
newFaceLocations->Squeeze();
newFaces->Squeeze();
this->SetCells( newTypes, newLocations, newConnectivity, newFaceLocations, newFaces );
this->CellLocations = newLocations;
newFaceLocations->Delete();
newFaces->Delete();
}
else
{
this->SetCells( newTypes, newLocations, newConnectivity, FaceLocations, Faces );
this->CellLocations = newLocations;
}
newTypes->Delete();
@ -360,10 +362,11 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray * newTypes,
{
int iOld = idCellsNewToOld[ iNew ];
newTypes->SetValue( iNew, this->Types->GetValue( iOld ));
vtkIdType oldLoc = this->Locations->GetValue( iOld );
vtkIdType oldLoc = ((vtkIdTypeArray *)(this->Connectivity->GetOffsetsArray()))->GetValue( iOld );
vtkIdType nbpts;
vtkIdType *oldPtsCell = 0;
this->Connectivity->GetCell( oldLoc, nbpts, oldPtsCell );
vtkIdType const *oldPtsCell(nullptr);
this->Connectivity->GetCell( oldLoc+iOld, nbpts, oldPtsCell );
if ((vtkIdType) pointsCell.size() < nbpts )
pointsCell.resize( nbpts );
for ( int l = 0; l < nbpts; l++ )
@ -976,8 +979,10 @@ void SMDS_UnstructuredGrid::GetNodeIds(std::set<int>& nodeSet, int downId, unsig
void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds)
{
vtkIdType npts = 0;
vtkIdType const *tmp(nullptr); // will refer to the point id's of the face
vtkIdType *pts; // will refer to the point id's of the face
this->GetCellPoints(vtkVolId, npts, pts);
this->GetCellPoints(vtkVolId, npts, tmp);
pts = const_cast< vtkIdType*>( tmp );
for (int i = 0; i < npts; i++)
{
if (localClonedNodeIds.count(pts[i]))
@ -1020,7 +1025,7 @@ void SMDS_UnstructuredGrid::BuildLinks()
SMDS_CellLinks* links;
this->Links = links = SMDS_CellLinks::New();
this->Links->Allocate(this->GetNumberOfPoints());
(static_cast< vtkCellLinks *>(this->Links.GetPointer()))->Allocate(this->GetNumberOfPoints());
this->Links->Register(this);
links->BuildLinks(this, this->Connectivity,this->GetCellTypesArray() );
this->Links->Delete();
@ -1039,7 +1044,7 @@ SMDS_CellLinks* SMDS_UnstructuredGrid::GetLinks()
{
if ( !this->Links )
BuildLinks();
return static_cast< SMDS_CellLinks* >( this->Links );
return static_cast< SMDS_CellLinks* >( this->Links.GetPointer() );
}
/*! Create a volume (prism or hexahedron) by duplication of a face.
@ -1202,4 +1207,3 @@ double SMDS_UnstructuredGrid::GetBallDiameter( vtkIdType vtkID ) const
return vtkDoubleArray::SafeDownCast( vtkDataSet::CellData->GetScalars() )->GetValue( vtkID );
return 0;
}

View File

@ -30,7 +30,8 @@ _GetVtkNodes::_GetVtkNodes( TVtkIdList& vtkIds,
{
vtkUnstructuredGrid* grid = mesh->GetGrid();
const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( type );
vtkIdType npts, *pts;
vtkIdType npts;
vtkIdType const *pts(nullptr);
grid->GetCellPoints( vtkCellId, npts, pts );
vtkIds.resize( npts );
if ( interlace.empty() )
@ -50,7 +51,8 @@ _GetVtkNodesToUNV::_GetVtkNodesToUNV( TVtkIdList& vtkIds,
SMDSAbs_EntityType type )
{
vtkUnstructuredGrid* grid = mesh->GetGrid();
vtkIdType npts, *pts;
vtkIdType npts;
vtkIdType const *pts(nullptr);
grid->GetCellPoints( vtkCellId, npts, pts );
const int *ids = 0;
switch ( type )
@ -140,7 +142,7 @@ _GetVtkNodesPolyh::_GetVtkNodesPolyh( TVtkIdList& vtkIds,
case SMDSEntity_Polyhedra:
{
vtkIdType nFaces = 0;
vtkIdType* ptIds = 0;
vtkIdType const *ptIds(nullptr);
grid->GetFaceStream( vtkCellId, nFaces, ptIds );
int id = 0, nbNodesInFaces = 0;
for ( int i = 0; i < nFaces; i++ )

View File

@ -23,7 +23,6 @@ INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${GEOM_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${TBB_INCLUDE_DIRS}

View File

@ -11197,7 +11197,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
{
int oldId = *itn;
//MESSAGE(" node " << oldId);
vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
vtkCellLinks::Link l = (static_cast <vtkCellLinks *>(grid->GetCellLinks()))->GetLink(oldId);
for (int i=0; i<l.ncells; i++)
{
int vtkId = l.cells[i];
@ -11376,7 +11376,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
//MESSAGE(" domain " << idom << " volume " << elem->GetID());
double values[3] = { 0,0,0 };
vtkIdType npts = 0;
vtkIdType* pts = 0;
vtkIdType const *pts(nullptr);
grid->GetCellPoints(vtkVolIds[ivol], npts, pts);
for ( vtkIdType i = 0; i < npts; ++i )
{
@ -11559,7 +11559,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
{
int oldId = itnod->first;
//MESSAGE(" node " << oldId);
vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
vtkCellLinks::Link l = (static_cast< vtkCellLinks *>(grid->GetCellLinks()))->GetLink(oldId);
for (int i = 0; i < l.ncells; i++)
{
int vtkId = l.cells[i];
@ -12011,7 +12011,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
//MESSAGE("volume to check, vtkId " << vtkId << " smdsId " << meshDS->FromVtkToSmds(vtkId));
bool volInside = false;
vtkIdType npts = 0;
vtkIdType* pts = 0;
vtkIdType const *pts(nullptr);
grid->GetCellPoints(vtkId, npts, pts);
for (int i=0; i<npts; i++)
{

View File

@ -24,7 +24,6 @@ INCLUDE_DIRECTORIES(
${MEDFILE_INCLUDE_DIRS}
${GEOM_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/src/Controls

View File

@ -27,7 +27,6 @@ ENDIF(SALOME_SMESH_USE_TBB)
INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/SMDS
${TBB_INCLUDES}

View File

@ -23,7 +23,6 @@ INCLUDE_DIRECTORIES(
${OpenCASCADE_INCLUDE_DIR}
${QT_INCLUDES}
${PYTHON_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
${GEOM_INCLUDE_DIRS}
@ -46,8 +45,6 @@ SET(_link_LIBRARIES
${KERNEL_SalomeDS}
${GUI_SalomeApp}
${GUI_suit}
${GUI_LightApp}
${GEOM_GEOM}
${GEOM_GEOMClient}
${OpenCASCADE_FoundationClasses_LIBRARIES}
${OpenCASCADE_ModelingData_LIBRARIES}

View File

@ -23,7 +23,6 @@ INCLUDE(UseQtExt)
# additional include directories
INCLUDE_DIRECTORIES(
${QT_INCLUDES}
${VTK_INCLUDE_DIRS}
${OGL_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}

View File

@ -361,7 +361,8 @@ void SMESHGUI_MinDistance::createPreview( double x1, double y1, double z1, doubl
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( 1 );
aCells->InitTraversal();
for( vtkIdType idType = 0, *pts, npts; aCells->GetNextCell( npts, pts ); idType++ )
vtkIdType const *pts(nullptr);
for( vtkIdType idType = 0, npts; aCells->GetNextCell( npts, pts ); idType++ )
aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
aCellLocationsArray->Delete();
@ -894,7 +895,8 @@ void SMESHGUI_BoundingBox::createPreview( double minX, double maxX, double minY,
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( 12 );
aCells->InitTraversal();
for( vtkIdType idType = 0, *pts, npts; aCells->GetNextCell( npts, pts ); idType++ )
vtkIdType const *pts(nullptr);
for( vtkIdType idType = 0, npts; aCells->GetNextCell( npts, pts ); idType++ )
aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
aCellLocationsArray->Delete();

View File

@ -222,7 +222,8 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct& previewD
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 );

View File

@ -1344,7 +1344,8 @@ vtkUnstructuredGrid* SMESHGUI_MeshPatternDlg::getGrid()
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));
aGrid->SetPoints(aPoints);

View File

@ -1509,7 +1509,8 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
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));
aGrid->SetPoints(aPoints);

View File

@ -22,7 +22,6 @@
INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/SMDS
)

View File

@ -24,7 +24,6 @@ INCLUDE_DIRECTORIES(
${OpenCASCADE_INCLUDE_DIR}
${HDF5_INCLUDE_DIRS}
${MEDFILE_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
@ -75,6 +74,7 @@ SET(_link_LIBRARIES
${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${GEOM_GEOMClient}
${GEOM_SalomeIDLGEOM}
VTK::IOLegacy
SalomeIDLSMESH
SMESHimpl
SMDS

View File

@ -25,7 +25,6 @@ INCLUDE_DIRECTORIES(
${QT_INCLUDES}
${PYTHON_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OGL_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${GUI_INCLUDE_DIRS}
@ -56,7 +55,6 @@ SET(_link_LIBRARIES
${GUI_CAM}
${GUI_suit}
${GUI_qtx}
${GUI_SalomeApp}
${GUI_std}
${GUI_Event}
SMESH

View File

@ -27,7 +27,6 @@ ENDIF(SALOME_SMESH_USE_TBB)
INCLUDE_DIRECTORIES(
${OpenCASCADE_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
${GEOM_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/SMESHUtils

View File

@ -23,7 +23,6 @@ INCLUDE(UseQtExt)
# additional include directories
INCLUDE_DIRECTORIES(
${QT_INCLUDES}
${VTK_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${KERNEL_INCLUDE_DIRS}
@ -56,7 +55,6 @@ ADD_DEFINITIONS(
# libraries to link to
SET(_link_LIBRARIES
${GUI_SalomeApp}
${OpenCASCADE_FoundationClasses_LIBRARIES}
${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${QWT_LIBRARY}

View File

@ -26,7 +26,6 @@ INCLUDE_DIRECTORIES(
${GEOM_INCLUDE_DIRS}
${MEDFILE_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/src/SMESHImpl
${PROJECT_SOURCE_DIR}/src/SMESH

View File

@ -22,7 +22,6 @@
INCLUDE_DIRECTORIES(
${KERNEL_INCLUDE_DIRS}
${GEOM_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${OpenCASCADE_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}