FIX: sharp tail detection may fail

1. In small overhang detection, some sharp tail cases are missed because
  the max_layer was not compared.
2. In normal support, previously the lower layer's expolys were not right,
  should only keep the ones that won't vanish when extruding.

Jira: STUDIO-1977, STUDIO-2200
Change-Id: Ia09ff1ab4870b7e3c199a827932536867644c76c
(cherry picked from commit e3ba3a3114821e951d6eb00b4c95e6e63ffe00d4)
This commit is contained in:
Arthur 2023-03-06 18:23:15 +08:00 committed by Lane.Wei
parent dce7751750
commit 017707e575
3 changed files with 27 additions and 12 deletions

View file

@ -279,13 +279,14 @@ std::string SVG::get_path_d(const ClipperLib::Path &path, double scale, bool clo
return d.str();
}
// font_size: font-size={font_size*10}px
void SVG::draw_text(const Point &pt, const char *text, const char *color, int font_size)
{
fprintf(this->f,
"<text x=\"%f\" y=\"%f\" font-family=\"sans-serif\" font-size=\"20px\" fill=\"%s\">%s</text>",
"<text x=\"%f\" y=\"%f\" font-family=\"sans-serif\" font-size=\"%dpx\" fill=\"%s\">%s</text>",
to_svg_x(pt(0)-origin(0)),
to_svg_y(pt(1)-origin(1)),
color, text);
font_size*10, color, text);
}
void SVG::draw_legend(const Point &pt, const char *text, const char *color)