diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index 94f0b5658..d9274bea9 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -42,7 +42,6 @@ use Slic3r::ExtrusionLoop; use Slic3r::ExtrusionPath; use Slic3r::Flow; use Slic3r::GCode::Reader; -use Slic3r::Geometry::Clipper; use Slic3r::Layer; use Slic3r::Line; use Slic3r::Model; diff --git a/lib/Slic3r/ExPolygon.pm b/lib/Slic3r/ExPolygon.pm index 6337cb9a1..4ab1bc8ab 100644 --- a/lib/Slic3r/ExPolygon.pm +++ b/lib/Slic3r/ExPolygon.pm @@ -4,14 +4,6 @@ use warnings; # an ExPolygon is a polygon with holes -use List::Util qw(first); -use Slic3r::Geometry::Clipper qw(union_ex diff_pl); - -sub offset { - my $self = shift; - return Slic3r::Geometry::Clipper::offset(\@$self, @_); -} - sub noncollapsing_offset_ex { my $self = shift; my ($distance, @params) = @_; diff --git a/lib/Slic3r/Geometry/Clipper.pm b/lib/Slic3r/Geometry/Clipper.pm index cfcb622fd..c1fa81d9f 100644 --- a/lib/Slic3r/Geometry/Clipper.pm +++ b/lib/Slic3r/Geometry/Clipper.pm @@ -7,8 +7,7 @@ our @ISA = qw(Exporter); our @EXPORT_OK = qw( offset offset2_ex - diff_ex diff union_ex intersection_ex - JT_ROUND JT_MITER JT_SQUARE - intersection diff_pl union); + diff_ex diff union_ex + union); 1; diff --git a/lib/Slic3r/Line.pm b/lib/Slic3r/Line.pm index bf53520d2..c06f9a1fa 100644 --- a/lib/Slic3r/Line.pm +++ b/lib/Slic3r/Line.pm @@ -5,12 +5,6 @@ use warnings; # a line is a two-points line use parent 'Slic3r::Polyline'; -sub intersection { - my $self = shift; - my ($line, $require_crossing) = @_; - return Slic3r::Geometry::line_intersection($self, $line, $require_crossing); -} - sub grow { my $self = shift; return Slic3r::Polyline->new(@$self)->grow(@_); diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index f03a97ea3..64480e08f 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -5,9 +5,6 @@ use warnings; 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_ex JT_MITER); use Slic3r::Print::State ':steps'; use Slic3r::Surface ':types'; diff --git a/t/perimeters.t b/t/perimeters.t index adc2a6cec..c4aef6e7e 100644 --- a/t/perimeters.t +++ b/t/perimeters.t @@ -14,7 +14,7 @@ use List::Util qw(first); use Slic3r; use Slic3r::Flow ':roles'; use Slic3r::Geometry qw(PI scale unscale); -use Slic3r::Geometry::Clipper qw(union_ex diff union offset); +use Slic3r::Geometry::Clipper qw(union_ex diff); use Slic3r::Surface ':types'; use Slic3r::Test; diff --git a/xs/xsp/Clipper.xsp b/xs/xsp/Clipper.xsp index 18f8dec07..5f9f35906 100644 --- a/xs/xsp/Clipper.xsp +++ b/xs/xsp/Clipper.xsp @@ -9,16 +9,6 @@ %{ -IV -_constant() - ALIAS: - JT_MITER = jtMiter - JT_ROUND = jtRound - JT_SQUARE = jtSquare - CODE: - RETVAL = ix; - OUTPUT: RETVAL - Polygons offset(polygons, delta, joinType = Slic3r::ClipperLib::jtMiter, miterLimit = 3) Polygons polygons @@ -62,35 +52,6 @@ diff_ex(subject, clip, safety_offset = false) OUTPUT: RETVAL -Polylines -diff_pl(subject, clip) - Polylines subject - Polygons clip - CODE: - RETVAL = diff_pl(subject, clip); - OUTPUT: - RETVAL - -Polygons -intersection(subject, clip, safety_offset = false) - Polygons subject - Polygons clip - bool safety_offset - CODE: - RETVAL = intersection(subject, clip, safety_offset ? ApplySafetyOffset::Yes : ApplySafetyOffset::No); - OUTPUT: - RETVAL - -ExPolygons -intersection_ex(subject, clip, safety_offset = false) - Polygons subject - Polygons clip - bool safety_offset - CODE: - RETVAL = intersection_ex(subject, clip, safety_offset ? ApplySafetyOffset::Yes : ApplySafetyOffset::No); - OUTPUT: - RETVAL - Polygons union(subject, safety_offset = false) Polygons subject diff --git a/xs/xsp/Polygon.xsp b/xs/xsp/Polygon.xsp index 6b6d52524..984eb16a9 100644 --- a/xs/xsp/Polygon.xsp +++ b/xs/xsp/Polygon.xsp @@ -41,12 +41,6 @@ Clone bounding_box(); Clone point_projection(Point* point) %code{% RETVAL = THIS->point_projection(*point); %}; - Clone intersection(Line* line) - %code{% - Point p; - (void)THIS->intersection(*line, &p); - RETVAL = p; - %}; Clone first_intersection(Line* line) %code{% Point p;