[vtkusers] vtkBooleanOperationPolyDataFilter for clipping (issue) in VTK 7.1
Seun Odutola
seun at rogue-research.com
Fri Dec 23 12:49:51 EST 2016
Hello everyone,
I have a reproducible case where I am trying to clip two meshes, when the function vtkBooleanOperationPolyDataFilter::RequestData is executed its call to SortPolyData fails triggering a crash trying to access the first index of polydata’s cell (see vtkBooleanOperationPolyDataFilter::SortPolyData line 62). On tracing the cause of the crash, I noticed that the polydata’s cell data array is null and there seems to be no guard against trying to probe its value, secondly prior to calling SortPolyData, two vtkPolyData’s pd0 & pd1 of which the latter possess no poly and both have their cells and links generated but the latter still lacks poly. I decided to introduce a condition just before building the cells and links for both pd0 and pd1 to check if either have no poly and if so exit the function (return 0), doing so completely prevents my program from crashing. I am not sure if this is the right approach nor if adding the check is necessary.
More information about the vtkusers
mailing list