Ported intersect_expolygons() and subtract_expolygons() to XS

This commit is contained in:
Alessandro Ranellucci 2013-11-21 17:53:50 +01:00
parent 5f81292f3f
commit 761f261a68
11 changed files with 95 additions and 29 deletions

View file

@ -16,6 +16,7 @@
void rotate(double angle, Point* center);
int count()
%code{% RETVAL = THIS->expolygons.size(); %};
bool contains_point(Point* point);
%{
ExPolygonCollection*

View file

@ -20,6 +20,10 @@
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = THIS->first_point(); %};
Point* last_point()
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = THIS->last_point(); %};
ExtrusionEntityCollection* intersect_expolygons(ExPolygonCollection* collection)
%code{% const char* CLASS = "Slic3r::ExtrusionPath::Collection"; RETVAL = THIS->intersect_expolygons(collection); %};
ExtrusionEntityCollection* subtract_expolygons(ExPolygonCollection* collection)
%code{% const char* CLASS = "Slic3r::ExtrusionPath::Collection"; RETVAL = THIS->subtract_expolygons(collection); %};
%{
ExtrusionPath*

View file

@ -7,6 +7,7 @@
%typemap{AV*};
%typemap{Point*};
%typemap{ExPolygon*};
%typemap{ExPolygonCollection*};
%typemap{Line*};
%typemap{Polyline*};
%typemap{Polygon*};