X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshCell.cxx;h=f2998c111b8805582df2bddf7f4f51a3cc30a8af;hb=HEAD;hp=3628aafe31ec31303989b396e010b60793db9668;hpb=c9c3fe8924452af01274d358e5d6d391b1b27375;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_MeshCell.cxx b/src/SMDS/SMDS_MeshCell.cxx index 3628aafe3..987bef623 100644 --- a/src/SMDS/SMDS_MeshCell.cxx +++ b/src/SMDS/SMDS_MeshCell.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2019 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2010-2024 CEA, EDF, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -461,8 +461,8 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity, int theNbNodes, ... ) } va_end( vl ); - int vtkType = toVtkType( theEntity ); - int vtkID = getGrid()->InsertNextLinkedCell( vtkType, theNbNodes, vtkIds ); + int vtkType = toVtkType( theEntity ); + vtkIdType vtkID = getGrid()->InsertNextLinkedCell( vtkType, theNbNodes, vtkIds ); setVtkID( vtkID ); } @@ -473,17 +473,17 @@ void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity, for ( size_t i = 0; i < nodes.size(); ++i ) vtkIds[i] = nodes[i]->GetVtkID(); - int vtkType = toVtkType( theEntity ); - int vtkID = getGrid()->InsertNextLinkedCell( vtkType, nodes.size(), &vtkIds[0] ); + int vtkType = toVtkType( theEntity ); + vtkIdType vtkID = getGrid()->InsertNextLinkedCell( vtkType, nodes.size(), &vtkIds[0] ); setVtkID( vtkID ); } void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity, const std::vector& vtkNodeIds ) { - int vtkType = toVtkType( theEntity ); - int vtkID = getGrid()->InsertNextLinkedCell( vtkType, vtkNodeIds.size(), - const_cast< vtkIdType* > ( &vtkNodeIds[0] )); + int vtkType = toVtkType( theEntity ); + vtkIdType vtkID = getGrid()->InsertNextLinkedCell( vtkType, vtkNodeIds.size(), + const_cast< vtkIdType* > ( &vtkNodeIds[0] )); setVtkID( vtkID ); } @@ -521,9 +521,7 @@ int SMDS_MeshCell::NbNodes() const { if ( GetVtkType() == VTK_POLYHEDRON ) return static_cast< const SMDS_MeshVolume* >( this )->SMDS_MeshVolume::NbNodes(); - vtkIdType npts; - vtkIdType const *pts; - getGrid()->GetCellPoints( GetVtkID(), npts, pts ); + vtkIdType npts = getGrid()->GetCells()->GetCellSize( GetVtkID() ); return npts; }