Skip to content

Commit

Permalink
version 2.5.59.4
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Dec 25, 2023
2 parents 84f7810 + 6e6e99b commit c5c8cd3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
15 changes: 13 additions & 2 deletions src/libslic3r/GCode.cpp
Expand Up @@ -1451,9 +1451,20 @@ void GCode::_do_export(Print& print_mod, GCodeOutputStream &file, ThumbnailsGene
if (print.config().gcode_flavor.value == gcfKlipper) {
Polygon poly = print_object->model_object()->convex_hull_2d(
print_instance.model_instance->get_matrix());
poly.douglas_peucker(0.1);
Polygon poly_old = poly;
coord_t simplify_size = scale_t(0.1);
// simplify as long as there is too many points
while (poly.size() > 20 && simplify_size < 100) {
poly_old = poly;
poly.douglas_peucker(simplify_size);
simplify_size *= 2;
}
//if gone too far, get the previous one.
if (poly.size() < 10) {
poly = poly_old;
}

const boost::format format_point("[%f,%f]");
const boost::format format_point("[%.2f,%.2f]");
std::string s_poly;
for (const Point& point : poly.points)
s_poly += (boost::format(format_point) % unscaled(point.x()) % unscaled(point.y())).str() + ",";
Expand Down
4 changes: 2 additions & 2 deletions version.inc
Expand Up @@ -9,9 +9,9 @@ set(SLIC3R_APP_KEY "SuperSlicer")
set(SLIC3R_APP_CMD "superslicer")
# versions
set(SLIC3R_VERSION "2.5.59")
set(SLIC3R_VERSION_FULL "2.5.59.3")
set(SLIC3R_VERSION_FULL "2.5.59.4")
set(SLIC3R_BUILD_ID "${SLIC3R_APP_KEY}_${SLIC3R_VERSION_FULL}+UNKNOWN")
set(SLIC3R_RC_VERSION "2,5,59,3")
set(SLIC3R_RC_VERSION "2,5,59,4")
set(SLIC3R_RC_VERSION_DOTS "${SLIC3R_VERSION_FULL}")

# Same as the slicer name but for gcodeviewer
Expand Down

0 comments on commit c5c8cd3

Please sign in to comment.