From c60e626cbf244645ed6acd50c3608b3aaebd2623 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Wed, 12 Oct 2022 22:24:32 +0200 Subject: [PATCH] Fix for type Scalar --- src/libslic3r/AABBTreeLines.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/AABBTreeLines.hpp b/src/libslic3r/AABBTreeLines.hpp index e8497c5ac3..6426b7d121 100644 --- a/src/libslic3r/AABBTreeLines.hpp +++ b/src/libslic3r/AABBTreeLines.hpp @@ -100,10 +100,11 @@ inline typename VectorType::Scalar squared_distance_to_indexed_lines( Eigen::PlainObjectBase &hit_point_out, typename VectorType::Scalar max_sqr_dist = std::numeric_limits::infinity()) { - if (tree.empty()) return VectorType::Scalar(-1); + using Scalar = typename VectorType::Scalar; + if (tree.empty()) return Scalar(-1); auto distancer = detail::IndexedLinesDistancer{lines, tree, point}; return AABBTreeIndirect::detail::squared_distance_to_indexed_primitives_recursive( - distancer, size_t(0), VectorType::Scalar(0), max_sqr_dist, hit_idx_out, hit_point_out); + distancer, size_t(0), Scalar(0), max_sqr_dist, hit_idx_out, hit_point_out); } // Returns all lines within the given radius limit