From ac92b13e522d997c4e882833dbf75c0fb493d047 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Mon, 30 Apr 2018 22:15:56 -0500 Subject: [PATCH] scale Pointf array into Points array. --- xs/src/libslic3r/Point.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xs/src/libslic3r/Point.hpp b/xs/src/libslic3r/Point.hpp index 048e6c227..57a9ef7e8 100644 --- a/xs/src/libslic3r/Point.hpp +++ b/xs/src/libslic3r/Point.hpp @@ -152,6 +152,15 @@ to_points(const std::vector &items) return pp; } +inline Points +scale(const std::vector&in ) { + Points out; + for (const auto& p : in) {out.push_back(Point(scale_(p.x), scale_(p.y))); } + return out; +} + + + } // start Boost