Fixed triangulation of meshes split by the cut tool.

This commit is contained in:
Vojtech Bubnik 2021-09-21 11:07:33 +02:00
parent 40e4116d9a
commit 7e3306c68f
2 changed files with 31 additions and 11 deletions

View file

@ -418,7 +418,7 @@ template<class Tout = double,
class = FloatingOnly<Tout>>
inline constexpr Tout unscaled(const Tin &v) noexcept
{
return Tout(v * Tout(SCALING_FACTOR));
return Tout(v) * Tout(SCALING_FACTOR);
}
// Unscaling for Eigen vectors. Input base type can be arithmetic, output base
@ -432,7 +432,7 @@ template<class Tout = double,
inline constexpr Eigen::Matrix<Tout, N, EigenArgs...>
unscaled(const Eigen::Matrix<Tin, N, EigenArgs...> &v) noexcept
{
return v.template cast<Tout>() * SCALING_FACTOR;
return v.template cast<Tout>() * Tout(SCALING_FACTOR);
}
// Align a coordinate to a grid. The coordinate may be negative,