diff --git a/lib/Slic3r/Geometry/Clipper.pm b/lib/Slic3r/Geometry/Clipper.pm index 0c35c93d9..b7a7da772 100644 --- a/lib/Slic3r/Geometry/Clipper.pm +++ b/lib/Slic3r/Geometry/Clipper.pm @@ -5,7 +5,7 @@ use warnings; require Exporter; our @ISA = qw(Exporter); our @EXPORT_OK = qw( - offset offset2 + offset offset_ex offset2_ex diff_ex diff union_ex intersection_ex JT_ROUND JT_MITER JT_SQUARE diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index 7370881ea..0385f88b8 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -7,7 +7,7 @@ use List::Util qw(min max sum first); use Slic3r::Flow ':roles'; use Slic3r::Geometry qw(scale epsilon); use Slic3r::Geometry::Clipper qw(diff diff_ex intersection intersection_ex union union_ex - offset offset2 offset_ex offset2_ex JT_MITER); + offset offset_ex offset2_ex JT_MITER); use Slic3r::Print::State ':steps'; use Slic3r::Surface ':types'; diff --git a/src/libslic3r/Geometry.cpp b/src/libslic3r/Geometry.cpp index d5ef41125..e60eb01b6 100644 --- a/src/libslic3r/Geometry.cpp +++ b/src/libslic3r/Geometry.cpp @@ -1083,8 +1083,7 @@ MedialAxis::process_edge_neighbors(const VD::edge_type* edge, ThickPolyline* pol } } -bool -MedialAxis::validate_edge(const VD::edge_type* edge) +bool MedialAxis::validate_edge(const VD::edge_type* edge) { // prevent overflows and detect almost-infinite edges #ifndef CLIPPERLIB_INT32 diff --git a/src/libslic3r/PNGReadWrite.cpp b/src/libslic3r/PNGReadWrite.cpp index 3308f1fd4..51bf7de7c 100644 --- a/src/libslic3r/PNGReadWrite.cpp +++ b/src/libslic3r/PNGReadWrite.cpp @@ -103,6 +103,7 @@ bool decode_png(IStream &in_buf, ImageGreyscale &out_img) // Down to earth function to store a packed RGB image to file. Mostly useful for debugging purposes. // Based on https://www.lemoda.net/c/write-png/ // png_color_type is PNG_COLOR_TYPE_RGB or PNG_COLOR_TYPE_GRAY +//FIXME maybe better to use tdefl_write_image_to_png_file_in_memory() instead? static bool write_rgb_or_gray_to_file(const char *file_name_utf8, size_t width, size_t height, int png_color_type, const uint8_t *data) { bool result = false; diff --git a/tests/libslic3r/test_elephant_foot_compensation.cpp b/tests/libslic3r/test_elephant_foot_compensation.cpp index a1c23f4a9..09ad33f41 100644 --- a/tests/libslic3r/test_elephant_foot_compensation.cpp +++ b/tests/libslic3r/test_elephant_foot_compensation.cpp @@ -15,22 +15,6 @@ using namespace Slic3r; namespace Slic3r { ClipperLib::Path mittered_offset_path_scaled(const Points& contour, const std::vector& deltas, double miter_limit); - -#if 0 - static Points mittered_offset_path_scaled_points(const Points& contour, const std::vector& deltas, double miter_limit) - { - Points out; - ClipperLib::Path scaled = mittered_offset_path_scaled(contour, deltas, miter_limit); - for (ClipperLib::IntPoint& pt : scaled) { - pt.X += CLIPPER_OFFSET_SCALE_ROUNDING_DELTA; - pt.Y += CLIPPER_OFFSET_SCALE_ROUNDING_DELTA; - pt.X >>= CLIPPER_OFFSET_POWER_OF_2; - pt.Y >>= CLIPPER_OFFSET_POWER_OF_2; - out.emplace_back(coord_t(pt.x()), coord_t(pt.y())); - } - return out; - } -#endif } static ExPolygon spirograph_gear_1mm() diff --git a/xs/xsp/Clipper.xsp b/xs/xsp/Clipper.xsp index 40ee6480b..bae6a103e 100644 --- a/xs/xsp/Clipper.xsp +++ b/xs/xsp/Clipper.xsp @@ -41,18 +41,6 @@ offset_ex(polygons, delta, joinType = Slic3r::ClipperLib::jtMiter, miterLimit = OUTPUT: RETVAL -Polygons -offset2(polygons, delta1, delta2, joinType = Slic3r::ClipperLib::jtMiter, miterLimit = 3) - Polygons polygons - const float delta1 - const float delta2 - Slic3r::ClipperLib::JoinType joinType - double miterLimit - CODE: - RETVAL = offset2(polygons, delta1, delta2, joinType, miterLimit); - OUTPUT: - RETVAL - ExPolygons offset2_ex(polygons, delta1, delta2, joinType = Slic3r::ClipperLib::jtMiter, miterLimit = 3) Polygons polygons