Multiple labels with equal coordinates cause spiral-shaped movements of the labels
I am displaying a set of labels using vtkPointSetToLabelHierarchy
and vtkLabelPlacementMapper
.
Whenever the positions of two labels match exactly, the position of those labels gets screwed up and at least one of them is moving along spiral-shaped ways around the position that was set for the label.
I verified this bug with VTK 7.0, 7.1 and 8.0 on Ubuntu 17.04 (64-bit).
I attached an example program that shows this bug: LabelBug.cpp (needs to be compiled with C++11 support)
It displays two sets of point + label: One is static (0.5, 0, 0), the other one is moving from (0, 0, 0) to (1, 0, 0). As soon as the moving point hits the static point, the label of the static point starts moving. The point stays at its correct position.
The actual modification of the point data seems to happen in vtkLabelHierarchy::ComputeHierarchy
.
EDIT: Improved description of example program.