Bad vtkCell.GetFace() issue
We have discovered a really bad vtkCell.GetFace() issue. Instantiated objects are not protecting their internal state. Here is how to replicate:
- 5.8.0, Linux, builtin server.
- Sources Wavelet. Apply.
- Open a View/ Python Shell. Here is what goes inside:
ww = GetActiveSource().GetClientSideObject().GetOutputDataObject(0) cc = ww.GetCell(137) ff1 = cc.GetFace(2) print(ff1.GetPointIds().GetId(0))
ff2 = cc.GetFace(5) print(ff2.GetPointIds().GetId(0))
584 <<<<<< This is an error.
From Jeff: You well see that the first point index for face ff1 has been changed to match the first point index for face ff2 after the call to set ff2 to face 5. In fact all of ff1 has been changed to match ff2. The also happens if the cell is different. It's like GetCell is one of those functions (python side or c side) which has a single internal state and you are only getting a reference to the internal state.
This is either a bug or an intentional behavior that is completely undocumented (and probably bad).
By the way, Jeff says "aaaarrrrgggggggghh"