Salome HOME
Merge branch 'V8_4_BR'
[modules/smesh.git] / src / SMDS / SMDS_BallElement.cxx
index 22d2d04078c6bc70860f0c84a19e4a1e7e5377e0..fd3859681325b9784447cf98be9a954d34516b46 100644 (file)
@@ -17,7 +17,7 @@
 // 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
 //  Module     : SMESH
 //  File       : SMDS_BallElement.cxx
 //  Author     : Edward AGAPOV (eap)
@@ -47,10 +47,9 @@ SMDS_BallElement::SMDS_BallElement(vtkIdType nodeId, double diameter, SMDS_Mesh*
 void SMDS_BallElement::init(vtkIdType nodeId, double diameter, SMDS_Mesh* mesh)
 {
   SMDS_MeshCell::init();
-  SMDS_UnstructuredGrid* grid = mesh->getGrid();
-  myVtkID = grid->InsertNextLinkedCell( GetVtkType(), 1, &nodeId );
   myMeshId = mesh->getMeshId();
-  grid->SetBallDiameter( myVtkID, diameter );
+  myVtkID = mesh->getGrid()->InsertNextLinkedCell( GetVtkType(), 1, &nodeId );
+  mesh->getGrid()->SetBallDiameter( myVtkID, diameter );
   mesh->setMyModified();
 }