X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_UnstructuredGrid.cxx;h=7e88bd37e86dd9008eef6f1c2409b1e68b9319c3;hp=e32eb798c36abd87b71863c4853e9a88eb889048;hb=6b1de623316c78e9bc6e18b7e2a98883bd800ff1;hpb=d2a8dd635ec65f5f0e21ce3d03d59d34f9b5291d;ds=sidebyside diff --git a/src/SMDS/SMDS_UnstructuredGrid.cxx b/src/SMDS/SMDS_UnstructuredGrid.cxx index e32eb798c..7e88bd37e 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.cxx +++ b/src/SMDS/SMDS_UnstructuredGrid.cxx @@ -139,10 +139,12 @@ vtkPoints* SMDS_UnstructuredGrid::GetPoints() int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *pts) { - if ( !this->Links ) - BuildLinks(); + if ( !this->Links ) // don't create Links until they are needed + { + return this->InsertNextCell(type, npts, pts); + } - if (type != VTK_POLYHEDRON) + if ( type != VTK_POLYHEDRON ) return vtkUnstructuredGrid::InsertNextLinkedCell(type, npts, pts); // --- type = VTK_POLYHEDRON