From e8331f066dee9fc83fe3faa774419f4e56e71ef3 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 23 Nov 2016 18:58:40 +0100 Subject: [PATCH] Include layer-height as sttribute in SLA SVG output --- xs/src/libslic3r/SLAPrint.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/SLAPrint.cpp b/xs/src/libslic3r/SLAPrint.cpp index a50859fbd7..985e0e2cb5 100644 --- a/xs/src/libslic3r/SLAPrint.cpp +++ b/xs/src/libslic3r/SLAPrint.cpp @@ -147,8 +147,12 @@ SLAPrint::write_svg(const std::string &outputfile) const for (size_t i = 0; i < this->layers.size(); ++i) { const Layer &layer = this->layers[i]; - fprintf(f, "\t\n", i, - layer.print_z, layer.slice_z); + fprintf(f, + "\t\n", i, + layer.print_z, + layer.slice_z, + layer.print_z - (i == 0 ? 0 : this->layers[i-1].print_z) + ); const ExPolygons &slices = layer.slices.expolygons; for (ExPolygons::const_iterator it = slices.begin(); it != slices.end(); ++it) {