Describe the bug
When coloring by scalar, the range is automatically computed by default.
However, in the case of vertex normal magnitude coloring, the range is degenerate since all values are approximately equal to 1, resulting in coloring noise:
To Reproduce
Steps to reproduce the behavior:
- Open the file using
f3d --no-config suzanne.ply -sb
- Observe noisy coloring and bar range from 1 to 1
Expected behavior
When the range is degenerate (abs(range[0] - range[1]) < epsilon), slightly expand the range by adding a safe margin so the result is a solid color corresponding to the middle of the colormap.
System Information:
N/A
F3D Information
All versions
Additional context
Once fixed, all affected test baselines must be updated
Describe the bug
When coloring by scalar, the range is automatically computed by default.
However, in the case of vertex normal magnitude coloring, the range is degenerate since all values are approximately equal to 1, resulting in coloring noise:
To Reproduce
Steps to reproduce the behavior:
f3d --no-config suzanne.ply -sbExpected behavior
When the range is degenerate (
abs(range[0] - range[1]) < epsilon), slightly expand the range by adding a safe margin so the result is a solid color corresponding to the middle of the colormap.System Information:
N/A
F3D Information
All versions
Additional context
Once fixed, all affected test baselines must be updated