Changing int* to const vtkIdType* in vtkCell? (breaks VTK API)


I am posting to ask if anyone is against changing vtkCell3D API local ids representation. Currently they are stored as int*, which forces the user to make copies of the ids in a vtkIdType* if one wants to use an algorithm based on point ids, like vtkPolygon::ComputeNormal for example.

They are mainly accessible to the user from vtkCell3D::GetEdgePoints or vtkCell3D::GetFacePoints.

Changing those ids to const vtkIdType* would break the API, any ids written as int* would have to be changed to const vtkIdType*, but I think it would be worth being able to use those ids in VTK filters, which is mostly not the case presently.

Any thoughts?

Citing the VTK Style guide:

Minor backwards incompatible changes are allowed in general with the following deprecation policy. Code that is to be removed is marked using the VTK_LEGACY macros in Common/Core/vtkSetGet.h and with the use of @deprecated Doxygen comments in the header files. Deprecated code can then be removed after a minimum of one minor release, i.e. deprecated and released in 6.1, can be removed after 6.1 for the 6.2 release. Backward incompatible changes should be kept to a minimum, we aim for source but not ABI compatibility between minor releases.

So this change is fine, but the existing member functions should be deprecated (not just changed) for at least one release.

Privacy Notice