Little more reduce of Perl bindings

This commit is contained in:
Vojtech Bubnik 2022-04-28 17:02:33 +02:00
parent 3687bc28d5
commit d88e9634f5
8 changed files with 3 additions and 67 deletions

View File

@ -42,7 +42,6 @@ use Slic3r::ExtrusionLoop;
use Slic3r::ExtrusionPath; use Slic3r::ExtrusionPath;
use Slic3r::Flow; use Slic3r::Flow;
use Slic3r::GCode::Reader; use Slic3r::GCode::Reader;
use Slic3r::Geometry::Clipper;
use Slic3r::Layer; use Slic3r::Layer;
use Slic3r::Line; use Slic3r::Line;
use Slic3r::Model; use Slic3r::Model;

View File

@ -4,14 +4,6 @@ use warnings;
# an ExPolygon is a polygon with holes # 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 { sub noncollapsing_offset_ex {
my $self = shift; my $self = shift;
my ($distance, @params) = @_; my ($distance, @params) = @_;

View File

@ -7,8 +7,7 @@ our @ISA = qw(Exporter);
our @EXPORT_OK = qw( our @EXPORT_OK = qw(
offset offset
offset2_ex offset2_ex
diff_ex diff union_ex intersection_ex diff_ex diff union_ex
JT_ROUND JT_MITER JT_SQUARE union);
intersection diff_pl union);
1; 1;

View File

@ -5,12 +5,6 @@ use warnings;
# a line is a two-points line # a line is a two-points line
use parent 'Slic3r::Polyline'; use parent 'Slic3r::Polyline';
sub intersection {
my $self = shift;
my ($line, $require_crossing) = @_;
return Slic3r::Geometry::line_intersection($self, $line, $require_crossing);
}
sub grow { sub grow {
my $self = shift; my $self = shift;
return Slic3r::Polyline->new(@$self)->grow(@_); return Slic3r::Polyline->new(@$self)->grow(@_);

View File

@ -5,9 +5,6 @@ use warnings;
use List::Util qw(min max sum first); use List::Util qw(min max sum first);
use Slic3r::Flow ':roles'; 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::Print::State ':steps';
use Slic3r::Surface ':types'; use Slic3r::Surface ':types';

View File

@ -14,7 +14,7 @@ use List::Util qw(first);
use Slic3r; use Slic3r;
use Slic3r::Flow ':roles'; use Slic3r::Flow ':roles';
use Slic3r::Geometry qw(PI scale unscale); 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::Surface ':types';
use Slic3r::Test; use Slic3r::Test;

View File

@ -9,16 +9,6 @@
%{ %{
IV
_constant()
ALIAS:
JT_MITER = jtMiter
JT_ROUND = jtRound
JT_SQUARE = jtSquare
CODE:
RETVAL = ix;
OUTPUT: RETVAL
Polygons Polygons
offset(polygons, delta, joinType = Slic3r::ClipperLib::jtMiter, miterLimit = 3) offset(polygons, delta, joinType = Slic3r::ClipperLib::jtMiter, miterLimit = 3)
Polygons polygons Polygons polygons
@ -62,35 +52,6 @@ diff_ex(subject, clip, safety_offset = false)
OUTPUT: OUTPUT:
RETVAL 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 Polygons
union(subject, safety_offset = false) union(subject, safety_offset = false)
Polygons subject Polygons subject

View File

@ -41,12 +41,6 @@
Clone<BoundingBox> bounding_box(); Clone<BoundingBox> bounding_box();
Clone<Point> point_projection(Point* point) Clone<Point> point_projection(Point* point)
%code{% RETVAL = THIS->point_projection(*point); %}; %code{% RETVAL = THIS->point_projection(*point); %};
Clone<Point> intersection(Line* line)
%code{%
Point p;
(void)THIS->intersection(*line, &p);
RETVAL = p;
%};
Clone<Point> first_intersection(Line* line) Clone<Point> first_intersection(Line* line)
%code{% %code{%
Point p; Point p;