Ported nearest_point() and nearest_point_index()

This commit is contained in:
Alessandro Ranellucci 2013-08-27 00:52:20 +02:00
parent f1e9216c70
commit b11b595c97
18 changed files with 79 additions and 69 deletions

View file

@ -20,6 +20,9 @@
%code{% RETVAL = THIS->x; %};
long y()
%code{% RETVAL = THIS->y; %};
int nearest_point_index(Points points);
Point* nearest_point(Points points)
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = new Point(*(THIS->nearest_point(points))); %};
%{

View file

@ -28,6 +28,8 @@
bool make_counter_clockwise();
bool make_clockwise();
bool is_valid();
Point* first_point()
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = new Point(*(THIS->first_point())); %};
%{
Polygon*

View file

@ -19,6 +19,8 @@
%code{% THIS->points.pop_back(); %};
void reverse();
Lines lines();
Point* first_point()
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = new Point(*(THIS->first_point())); %};
%{
Polyline*

View file

@ -17,6 +17,7 @@ SurfaceType T_UV
ClipperLib::JoinType T_UV
ClipperLib::PolyFillType T_UV
Points T_ARRAYREF
Lines T_ARRAYREF
Polygons T_ARRAYREF
ExPolygons T_ARRAYREF

View file

@ -10,6 +10,7 @@
%typemap{ExtrusionEntityCollection*};
%typemap{ExtrusionPath*};
%typemap{ExtrusionLoop*};
%typemap{Points};
%typemap{Lines};
%typemap{Polygons};
%typemap{ExPolygons};