More minor fixes

This commit is contained in:
Alessandro Ranellucci 2016-12-01 19:47:44 +01:00
parent f16aaeafba
commit f43bb9eb75
2 changed files with 4 additions and 3 deletions

View File

@ -220,10 +220,11 @@ 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<g id=\"layer%zu\" slic3r:z=\"%0.4f\" slic3r:slice-z=\"%0.4f\" slic3r:layer-height=\"%0.4f\">\n", i,
"\t<g id=\"layer%zu\" slic3r:z=\"%0.4f\" slic3r:slice-z=\"%0.4f\" slic3r:layer-height=\"%0.4f\">\n",
i,
layer.print_z,
layer.slice_z,
layer.print_z - (i == 0 ? 0 : this->layers[i-1].print_z)
layer.print_z - ((i == 0) ? 0. : this->layers[i-1].print_z)
);
if (layer.solid) {

View File

@ -20,7 +20,7 @@ SVG::SVG(const char* filename)
}
SVG::SVG(const char* filename, const BoundingBox &bbox)
: arrows(false), fill("grey"), stroke("black"), filename(filename), origin(bbox.min)
: arrows(false), fill("grey"), stroke("black"), origin(bbox.min), filename(filename)
{
this->f = fopen(filename, "w");
float w = COORD(bbox.max.x - bbox.min.x);