Boolean operation to perform a substraction between polydatas is very slow

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.


// Triangle Filter
vtkTriangleFilter * triangle_filter
	= vtkTriangleFilter::New();

vtkTriangleFilter * triangle_filter2
	= vtkTriangleFilter::New();

vtkSmartPointer<vtkBooleanOperationPolyDataFilter> boolFilter = 	      
boolFilter->SetInputConnection(0, triangle_filter2->GetOutputPort()); 	  
boolFilter->SetInputConnection(1, triangle_filter->GetOutputPort()); 	

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.

Make sure that the meshes are well designed.