]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMDS/SMDS_MeshNode.cxx
Salome HOME
PR: synchro V6_main tag mergeto_V7_main_11Feb13
[modules/smesh.git] / src / SMDS / SMDS_MeshNode.cxx
index 4e5e21fe64fcd0461185ba346a56ced9fadeaff6..91fd238eca0f7905157683e6f44a5d240a82c107 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  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
@@ -71,8 +71,7 @@ void SMDS_MeshNode::init(int id, int meshId, int shapeId, double x, double y, do
   points->InsertPoint(myVtkID, x, y, z);
   SMDS_CellLinks *cellLinks = dynamic_cast<SMDS_CellLinks*>(grid->GetCellLinks());
   assert(cellLinks);
-  if (myVtkID >= cellLinks->GetLinksSize())
-          cellLinks->ResizeL(myVtkID+SMDS_Mesh::chunkSize);
+  cellLinks->ResizeForPoint( myVtkID );
 }
 
 SMDS_MeshNode::~SMDS_MeshNode()
@@ -289,6 +288,15 @@ double SMDS_MeshNode::Z() const
   return coord[2];
 }
 
+//================================================================================
+/*!
+ * \brief thread safe getting coords
+ */
+void SMDS_MeshNode::GetXYZ(double xyz[3]) const
+{
+  return SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetPoint(myVtkID,xyz);
+}
+
 //* resize the vtkPoints structure every SMDS_Mesh::chunkSize points
 void SMDS_MeshNode::setXYZ(double x, double y, double z)
 {