2013-11-22 21:38:30 +00:00
|
|
|
%module{Slic3r::XS};
|
|
|
|
|
|
|
|
%{
|
|
|
|
#include <myinit.h>
|
|
|
|
#include "Geometry.hpp"
|
|
|
|
%}
|
|
|
|
|
2013-11-23 20:54:56 +00:00
|
|
|
|
2013-11-22 21:38:30 +00:00
|
|
|
%package{Slic3r::Geometry};
|
|
|
|
|
|
|
|
%{
|
|
|
|
|
|
|
|
Polygon*
|
|
|
|
convex_hull(points)
|
|
|
|
Points points
|
|
|
|
PREINIT:
|
|
|
|
const char* CLASS = "Slic3r::Polygon";
|
|
|
|
CODE:
|
|
|
|
RETVAL = new Polygon ();
|
2013-11-23 20:54:56 +00:00
|
|
|
Slic3r::Geometry::convex_hull(points, *RETVAL);
|
2013-11-22 21:38:30 +00:00
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-11-23 20:39:05 +00:00
|
|
|
std::vector<Points::size_type>
|
|
|
|
chained_path(points)
|
|
|
|
Points points
|
|
|
|
CODE:
|
2013-11-23 20:54:56 +00:00
|
|
|
Slic3r::Geometry::chained_path(points, RETVAL);
|
2013-11-23 20:39:05 +00:00
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
|
|
|
std::vector<Points::size_type>
|
|
|
|
chained_path_from(points, start_from)
|
|
|
|
Points points
|
|
|
|
Point* start_from
|
|
|
|
CODE:
|
2013-11-23 20:54:56 +00:00
|
|
|
Slic3r::Geometry::chained_path(points, RETVAL, *start_from);
|
2013-11-23 20:39:05 +00:00
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-11-22 21:38:30 +00:00
|
|
|
%}
|