// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SMESH SMDS : implementaion of Salome mesh data structure
+// SMESH SMDS : implementation of Salome mesh data structure
//
#ifdef _MSC_VER
#pragma warning(disable:4786)
SMDS_UnstructuredGrid * grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
vtkPoints *points = grid->GetPoints();
points->InsertPoint(myVtkID, x, y, z);
- grid->GetLinks()->ResizeForPoint( myVtkID );
+ if ( grid->HasLinks() )
+ grid->GetLinks()->ResizeForPoint( myVtkID );
}
SMDS_MeshNode::~SMDS_MeshNode()
cellList.push_back(vtkId);
}
}
- myCells = cellList.empty() ? 0 : &cellList[0];
- myNcells = cellList.size();
}
+ myCells = cellList.empty() ? 0 : &cellList[0];
+ myNcells = cellList.size();
}
}
void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME)
{
SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
- vtkCellLinks *Links = grid->GetLinks();
- Links->ResizeCellList(myVtkID, 1);
- Links->AddCellReference(ME->getVtkId(), myVtkID);
+ if ( grid->HasLinks() )
+ {
+ vtkCellLinks *Links = grid->GetLinks();
+ Links->ResizeCellList(myVtkID, 1);
+ Links->AddCellReference(ME->getVtkId(), myVtkID);
+ }
}
//=======================================================================