From b42c5d6dfa242c2001a36aa2127f3c191a605cf1 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 5 Jan 2017 09:10:16 +0100 Subject: [PATCH] Extended the SVG exporting class with export_expolygons() calculating the contour bounds internally. --- xs/src/libslic3r/SVG.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xs/src/libslic3r/SVG.hpp b/xs/src/libslic3r/SVG.hpp index 83bb586c9..3d459804c 100644 --- a/xs/src/libslic3r/SVG.hpp +++ b/xs/src/libslic3r/SVG.hpp @@ -12,7 +12,7 @@ namespace Slic3r { class SVG { - public: +public: bool arrows; std::string fill, stroke; Point origin; @@ -89,6 +89,10 @@ public: static void export_expolygons(const char *path, const BoundingBox &bbox, const Slic3r::ExPolygons &expolygons, std::string stroke_outer = "black", std::string stroke_holes = "blue", coordf_t stroke_width = 0); static void export_expolygons(const std::string &path, const BoundingBox &bbox, const Slic3r::ExPolygons &expolygons, std::string stroke_outer = "black", std::string stroke_holes = "blue", coordf_t stroke_width = 0) { export_expolygons(path.c_str(), bbox, expolygons, stroke_outer, stroke_holes, stroke_width); } + static void export_expolygons(const char *path, const Slic3r::ExPolygons &expolygons, std::string stroke_outer = "black", std::string stroke_holes = "blue", coordf_t stroke_width = 0) + { export_expolygons(path, get_extents(expolygons), expolygons, stroke_outer, stroke_holes, stroke_width); } + static void export_expolygons(const std::string &path, const Slic3r::ExPolygons &expolygons, std::string stroke_outer = "black", std::string stroke_holes = "blue", coordf_t stroke_width = 0) + { export_expolygons(path.c_str(), get_extents(expolygons), expolygons, stroke_outer, stroke_holes, stroke_width); } }; }