2013-07-15 14:21:09 +00:00
|
|
|
%module{Slic3r::XS};
|
|
|
|
|
|
|
|
%{
|
2015-12-07 23:39:54 +00:00
|
|
|
#include <xsinit.h>
|
2014-08-03 17:42:29 +00:00
|
|
|
#include "libslic3r/ExtrusionEntity.hpp"
|
2013-07-15 14:21:09 +00:00
|
|
|
%}
|
|
|
|
|
|
|
|
%name{Slic3r::ExtrusionLoop} class ExtrusionLoop {
|
2014-05-08 09:07:37 +00:00
|
|
|
ExtrusionLoop();
|
2013-07-15 14:21:09 +00:00
|
|
|
~ExtrusionLoop();
|
2014-05-08 09:07:37 +00:00
|
|
|
Clone<ExtrusionLoop> clone()
|
|
|
|
%code{% RETVAL = THIS; %};
|
2014-05-07 10:02:09 +00:00
|
|
|
void reverse();
|
2014-05-08 09:07:37 +00:00
|
|
|
bool make_clockwise();
|
2013-08-28 23:40:42 +00:00
|
|
|
bool make_counter_clockwise();
|
2014-04-27 17:18:53 +00:00
|
|
|
Clone<Point> first_point();
|
|
|
|
Clone<Point> last_point();
|
2015-01-25 14:21:45 +00:00
|
|
|
Clone<Polygon> polygon();
|
2014-05-08 09:07:37 +00:00
|
|
|
void append(ExtrusionPath* path)
|
|
|
|
%code{% THIS->paths.push_back(*path); %};
|
|
|
|
double length();
|
2014-11-08 11:56:14 +00:00
|
|
|
bool split_at_vertex(Point* point)
|
2014-11-08 14:02:14 +00:00
|
|
|
%code{% RETVAL = THIS->split_at_vertex(*point); %};
|
2014-05-08 09:07:37 +00:00
|
|
|
void split_at(Point* point)
|
|
|
|
%code{% THIS->split_at(*point); %};
|
|
|
|
ExtrusionPaths clip_end(double distance)
|
|
|
|
%code{% THIS->clip_end(distance, &RETVAL); %};
|
|
|
|
bool has_overhang_point(Point* point)
|
|
|
|
%code{% RETVAL = THIS->has_overhang_point(*point); %};
|
2014-12-17 00:15:47 +00:00
|
|
|
bool is_perimeter();
|
|
|
|
bool is_infill();
|
|
|
|
bool is_solid_infill();
|
2015-01-15 19:06:30 +00:00
|
|
|
Polygons grow();
|
2013-07-15 14:21:09 +00:00
|
|
|
%{
|
|
|
|
|
2014-05-08 09:07:37 +00:00
|
|
|
SV*
|
|
|
|
ExtrusionLoop::arrayref()
|
2013-07-15 14:21:09 +00:00
|
|
|
CODE:
|
2014-05-08 09:07:37 +00:00
|
|
|
AV* av = newAV();
|
|
|
|
av_fill(av, THIS->paths.size()-1);
|
|
|
|
for (ExtrusionPaths::iterator it = THIS->paths.begin(); it != THIS->paths.end(); ++it) {
|
2015-07-02 12:29:20 +00:00
|
|
|
av_store(av, it - THIS->paths.begin(), perl_to_SV_ref(*it));
|
2014-04-29 21:15:36 +00:00
|
|
|
}
|
2014-05-08 09:07:37 +00:00
|
|
|
RETVAL = newRV_noinc((SV*)av);
|
2014-04-29 21:15:36 +00:00
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2014-05-12 19:49:17 +00:00
|
|
|
ExtrusionLoopRole
|
|
|
|
ExtrusionLoop::role(...)
|
|
|
|
CODE:
|
|
|
|
if (items > 1) {
|
|
|
|
THIS->role = (ExtrusionLoopRole)SvUV(ST(1));
|
|
|
|
}
|
|
|
|
RETVAL = THIS->role;
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-07-15 14:21:09 +00:00
|
|
|
%}
|
|
|
|
};
|
2014-05-12 19:49:17 +00:00
|
|
|
|
|
|
|
%package{Slic3r::ExtrusionLoop};
|
|
|
|
%{
|
|
|
|
|
|
|
|
IV
|
|
|
|
_constant()
|
|
|
|
ALIAS:
|
|
|
|
EXTRL_ROLE_DEFAULT = elrDefault
|
2014-05-22 17:34:49 +00:00
|
|
|
EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER = elrContourInternalPerimeter
|
2015-12-21 14:02:39 +00:00
|
|
|
EXTRL_ROLE_SKIRT = elrSkirt
|
2014-05-12 19:49:17 +00:00
|
|
|
PROTOTYPE:
|
|
|
|
CODE:
|
|
|
|
RETVAL = ix;
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
|
|
|
%}
|