Hi, Thanks for your help in advance.
I’ve the following two polydata as shown in the figure I’m trying to do boolean operation on them, but it says that the voronoi mesh has non manfiold data, and there is no contact. How to fix that ?
vtkNew tri1;
tri1->SetInputData(vornoi_2d->GetOutput());
vtkNew clean1;
clean1->SetInputConnection(tri1->GetOutputPort());
clean1->Update();vtkNew tri2;
tri2->SetInputData(polydata);
tri2->Update();
vtkNew clean2;
clean2->SetInputConnection(tri2->GetOutputPort());
clean2->Update();vtkNew extrude;
extrude->SetInputData(clean2->GetOutput());
extrude->SetExtrusionTypeToNormalExtrusion();
extrude->SetVector(0, 0, 1);
extrude->SetScaleFactor(120.5);
extrude->Update();vtkNew extrude_vornoi;
extrude_vornoi->SetInputData(clean1->GetOutput());
extrude_vornoi->SetExtrusionTypeToNormalExtrusion();
extrude_vornoi->SetVector(0, 0, 1);
extrude_vornoi->SetScaleFactor(120.5);
extrude_vornoi->Update();vtkNew plyWriter;
plyWriter->SetFileName(“curve1.obj”);
plyWriter->SetInputData(extrude->GetOutput());
plyWriter->Write();plyWriter->SetFileName(“curve2.obj”);
plyWriter->SetInputData(extrude_vornoi->GetOutput());
plyWriter->Write();vtkPolyDataBooleanFilter* bf2 =
vtkPolyDataBooleanFilter::New();
bf2->SetInputConnection(0, extrude->GetOutputPort());
bf2->SetInputConnection(1, extrude_vornoi->GetOutputPort());
bf2->SetOperModeToDifference();
bf2->Update();