Removing offset2 from Perl bindings and other minor cleanup.
This commit is contained in:
parent
1c6333e557
commit
f16d4953be
@ -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
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -15,22 +15,6 @@ using namespace Slic3r;
|
||||
|
||||
namespace Slic3r {
|
||||
ClipperLib::Path mittered_offset_path_scaled(const Points& contour, const std::vector<float>& deltas, double miter_limit);
|
||||
|
||||
#if 0
|
||||
static Points mittered_offset_path_scaled_points(const Points& contour, const std::vector<float>& 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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user