- SMDS_MeshCell::init();
-}
-
-SMDS_BallElement::SMDS_BallElement (const SMDS_MeshNode * node, double diameter)
-{
- init( node->getVtkId(), diameter, SMDS_Mesh::_meshList[ node->getMeshId() ] );
-}
-
-SMDS_BallElement::SMDS_BallElement(vtkIdType nodeId, double diameter, SMDS_Mesh* mesh)
-{
- init( nodeId, diameter, mesh );
-}
-
-void SMDS_BallElement::init(vtkIdType nodeId, double diameter, SMDS_Mesh* mesh)
-{
- SMDS_MeshCell::init();
- myMeshId = mesh->getMeshId();
- myVtkID = mesh->getGrid()->InsertNextLinkedCell( GetVtkType(), 1, &nodeId );
- mesh->getGrid()->SetBallDiameter( myVtkID, diameter );
- mesh->setMyModified();
+ vtkIdType nodeVtkID = node->GetVtkID();
+ vtkIdType vtkID = getGrid()->InsertNextLinkedCell( toVtkType( SMDSEntity_Ball ), 1, &nodeVtkID );
+ setVtkID( vtkID );
+ getGrid()->SetBallDiameter( GetVtkID(), diameter );