Slic3r/xs/xsp/Geometry.xsp

34 lines
618 B
Plaintext

%module{Slic3r::XS};
%{
#include <myinit.h>
#include "Point.hpp"
#include <boost/geometry/algorithms/convex_hull.hpp>
%}
%package{Slic3r::Geometry};
%{
Polygon*
convex_hull(points)
Points points
PREINIT:
const char* CLASS = "Slic3r::Polygon";
CODE:
RETVAL = new Polygon;
boost::geometry::convex_hull(points, *RETVAL);
OUTPUT:
RETVAL
Polylines
expolygons_polylines_intersection(expolygons, polylines)
ExPolygons expolygons
Polylines polylines
CODE:
boost::geometry::intersection(expolygons, polylines, RETVAL);
OUTPUT:
RETVAL
%}