void SMDS_VtkFace::init(std::vector<vtkIdType> nodeIds, SMDS_Mesh* mesh)
{
+ SMDS_MeshFace::init();
vtkUnstructuredGrid* grid = mesh->getGrid();
- myIdInShape = -1;
myMeshId = mesh->getMeshId();
vtkIdType aType = VTK_TRIANGLE;
switch (nodeIds.size())
void SMDS_VtkFace::initPoly(std::vector<vtkIdType> nodeIds, SMDS_Mesh* mesh)
{
+ SMDS_MeshFace::init();
vtkUnstructuredGrid* grid = mesh->getGrid();
- myIdInShape = -1;
myMeshId = mesh->getMeshId();
myVtkID = grid->InsertNextLinkedCell(VTK_POLYGON, nodeIds.size(), &nodeIds[0]);
mesh->setMyModified();
}
//! change only the first node, used for temporary triangles in quadrangle to triangle adaptor
-void SMDS_VtkFace::ChangeApex(const SMDS_MeshNode* node)
+void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node)
{
vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
vtkIdType npts = 0;
grid->GetCellPoints(myVtkID, npts, pts);
grid->RemoveReferenceToCell(pts[0], myVtkID);
pts[0] = node->getVtkId();
- grid->AddReferenceToCell(pts[0], myVtkID);
+ node->AddInverseElement(this),
SMDS_Mesh::_meshList[myMeshId]->setMyModified();
}