New attribute slic3r:area in SVG export

This commit is contained in:
Alessandro Ranellucci 2016-07-09 11:47:53 +02:00
parent 1ecf1c805f
commit f49458506f

View File

@ -68,8 +68,8 @@ SVGExport::writeSVG(const std::string &outputfile)
d << "z";
pd += d.str() + " ";
}
fprintf(f,"\t\t<path d=\"%s\" style=\"fill: %s; stroke: %s; stroke-width: %s; fill-type: evenodd\" />\n",
pd.c_str(),"white","black","0"
fprintf(f,"\t\t<path d=\"%s\" style=\"fill: %s; stroke: %s; stroke-width: %s; fill-type: evenodd\" slic3r:area=\"%0.4f\" />\n",
pd.c_str(), "white", "black", "0", unscale(unscale(it->area()))
);
}
fprintf(f,"\t</g>\n");