[vtkusers] Iteratively deleting PolyData cells causes silent crash. Why?

danielson fmalan at medvis.org
Fri Nov 23 11:01:44 EST 2012


Dear All

I've been banging my head against my monitor for hours and hours over this
one. Please help.
I'm using VTK5.8.0 via its Python bindings.

I want to iteratively subdivide triangles in an existing polydata. My
planned method is:
a) Identify a triangle that needs subdivision
b) Insert a new point in the interior region
c) Delete the original triangle
d) Define new triangles connecting the new point with the original
triangle's edges

The problem comes with c). For this I do:
> poly.DeleteCell(id)
> poly.RemoveDeletedCells()
> poly.BuildLinks()
> poly.BuildCells()

This works perfectly for the FIRST triangle I delete. But, if I perform this
process in an iterative loop, it silently crashes at the second iteration
(no exception), exiting the for loop. I have no idea why this is the case,
and can't figure out what alternative option to take. I noted that the
question of how to delete cells comes up on other fora as well, and hasn't
been successfully answered anywhere that I could find.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Iteratively-deleting-PolyData-cells-causes-silent-crash-Why-tp5717255.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list