vtkBooleanOperationPolyDataFilter SortPolyData Failure leads to crash
I have a reproducible situation where I have two meshes (one a rather big mesh i.e: human head and the other a little chamber tool) and depending on how both are placed I clip these two invoking the vtkBooleanOperationPolyDataFilter which tends to crash the program depending on the location and perhaps the orientation of these meshes (typically the chamber is moved in, out and around the surface of the head). I have been able to recreate a sample application that replicates this crash. clipping.zipclipping.zip Steps:
- Unzip the attached file
- cmake, make and run the resulting .app (Clipping.app) to reproduce the crash
- pay attention to the line of code (changing the value of the component to test various positioning along the Z-axis. The current value apparently causes a crash as the meshes are not being clipped properly. matrix2->SetElement(2, 3, 45.00000000000000000000 - 9.9); // this is to move the chamber in and out