Boolean operation to perform a substraction between polydatas is very slow

(ester) #1

Hi everybody,

I want to substract wo polydatas and i am using vtkBooleanOperationPolyDataFilter and it takes hours even for polydatas that are not very big. Any idea how to speed up the process? or any other way to do a substraction between 2 polydatas?. The inputs are correct because i visualized them.

Thanks

// Triangle Filter
vtkTriangleFilter * triangle_filter
	= vtkTriangleFilter::New();
triangle_filter->SetInputConnection
(fillHolesFilter->GetOutputPort());


vtkTriangleFilter * triangle_filter2
	= vtkTriangleFilter::New();
triangle_filter2->SetInputConnection
(warp->GetOutputPort());

vtkSmartPointer<vtkBooleanOperationPolyDataFilter> boolFilter = 	      
vtkSmartPointer<vtkBooleanOperationPolyDataFilter>::New(); 	
boolFilter->SetInputConnection(0, triangle_filter2->GetOutputPort()); 	  
boolFilter->SetInputConnection(1, triangle_filter->GetOutputPort()); 	
boolFilter->Update();
(Cory Quammen (Kitware)) #2

Sorry, it’s not a very fast algorithm :frowning_face: Building in release mode will speed things up if you are running in debug mode, but that’s about all I can suggest.