0005-fix-scale-calculation.patch 877 B

123456789101112131415161718192021
  1. diff --git a/thirdparty/vhacd/inc/vhacdVolume.h b/thirdparty/vhacd/inc/vhacdVolume.h
  2. index 8c47fa1e2c..c445f20122 100644
  3. --- a/thirdparty/vhacd/inc/vhacdVolume.h
  4. +++ b/thirdparty/vhacd/inc/vhacdVolume.h
  5. @@ -316,13 +316,13 @@ void Volume::Voxelize(const T* const points, const uint32_t stridePoints, const
  6. double d[3] = { m_maxBB[0] - m_minBB[0], m_maxBB[1] - m_minBB[1], m_maxBB[2] - m_minBB[2] };
  7. double r;
  8. - if (d[0] > d[1] && d[0] > d[2]) {
  9. + if (d[0] >= d[1] && d[0] >= d[2]) {
  10. r = d[0];
  11. m_dim[0] = dim;
  12. m_dim[1] = 2 + static_cast<size_t>(dim * d[1] / d[0]);
  13. m_dim[2] = 2 + static_cast<size_t>(dim * d[2] / d[0]);
  14. }
  15. - else if (d[1] > d[0] && d[1] > d[2]) {
  16. + else if (d[1] >= d[0] && d[1] >= d[2]) {
  17. r = d[1];
  18. m_dim[1] = dim;
  19. m_dim[0] = 2 + static_cast<size_t>(dim * d[0] / d[1]);