Prevents infinite loop in rtweight when using incorrect .density file
Open Source Solid Modeling CAD
Brought to you by:
brlcad
This fixes the bug where the rtweight function is stuck in an infinite loop when presented with an empty or incorrectly formatted (less than 3 values per line) .density file. It does not output Weights or Centroid information in this case, and instead outputs an error in a user friendly way.
I've also added a patch that addresses this issue here:
https://sourceforge.net/p/brlcad/patches/275/