Fixed a regression issue in the triangle mesh slicing code, where

a broken contour was not glued together using the closest neighbors.
This commit is contained in:
bubnikv 2019-03-11 17:18:38 +01:00
parent a0d5a961bd
commit c482933845
4 changed files with 7 additions and 6 deletions

View file

@ -224,7 +224,7 @@ public:
const ValueType &value = it->second;
const Vec2crd *pt2 = m_point_accessor(value);
if (pt2 != nullptr) {
const double d2 = (pt - *pt2).squaredNorm();
const double d2 = (pt - *pt2).cast<double>().squaredNorm();
if (d2 < dist_min) {
dist_min = d2;
value_min = &value;