Ported ExtrusionPath to XS. Failing test for Surface

This commit is contained in:
Alessandro Ranellucci
2013-07-15 12:14:22 +02:00
parent 8c1e1cc3ea
commit f612d4c64e
24 changed files with 501 additions and 143 deletions

29
xs/xsp/Polygon.xsp Normal file
View File

@@ -0,0 +1,29 @@
%module{Slic3r::XS};
%{
#include <myinit.h>
#include "Polygon.hpp"
%}
%name{Slic3r::Polygon::XS} class Polygon {
~Polygon();
Polygon* clone()
%code{% const char* CLASS = "Slic3r::Polygon::XS"; RETVAL = new Polygon(*THIS); %};
SV* arrayref()
%code{% RETVAL = polygon2perl(*THIS); %};
%{
Polygon*
Polygon::new(...)
CODE:
RETVAL = new Polygon ();
// ST(0) is class name, ST(1) is first point
RETVAL->points.resize(items-1);
for (unsigned int i = 1; i < items; i++) {
perl2point(ST(i), RETVAL->points[i-1]);
}
OUTPUT:
RETVAL
%}
};