From 151522fa57d73767f1423a3f75408fe3deae5b13 Mon Sep 17 00:00:00 2001 From: ccolin Date: Tue, 8 Mar 2022 10:21:52 +0100 Subject: [PATCH] still doesn't werk --- src/remove_external_cells_filter.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/remove_external_cells_filter.cc b/src/remove_external_cells_filter.cc index c16f2e0..f3a2455 100644 --- a/src/remove_external_cells_filter.cc +++ b/src/remove_external_cells_filter.cc @@ -126,7 +126,7 @@ vtkTypeBool RemoveExternalCellsFilter::RequestData( vtkNew outPoints; vtkNew outPointIds; vtkIdType outPointId = 0; - outPointIds->Allocate(3); + outPointIds->SetNumberOfIds(4); output->Allocate(); auto it = tetMesh->NewCellIterator(); for (it->InitTraversal(); @@ -140,12 +140,14 @@ vtkTypeBool RemoveExternalCellsFilter::RequestData( outPointIds->SetId(0, outPointId + 0); outPointIds->SetId(1, outPointId + 1); outPointIds->SetId(2, outPointId + 2); - outPointId += 3; + outPointIds->SetId(3, outPointId + 3); + outPointId += 4; outPoints->InsertPoints(outPointIds, pointIds, tetMesh->GetPoints()); output->InsertNextCell(it->GetCellType(), outPointIds); } } + outPoints->SetNumberOfPoints(outPointId + 3); output->SetPoints(outPoints); return true;