6
#include "ClipperUtils.hpp"
9
%name{Slic3r::Surface} class Surface {
11
Ref<ExPolygon> expolygon()
12
%code{% RETVAL = &(THIS->expolygon); %};
14
%code{% RETVAL = THIS->thickness; %};
15
unsigned short thickness_layers()
16
%code{% RETVAL = THIS->thickness_layers; %};
18
bool is_solid() const;
19
bool is_external() const;
20
bool is_bottom() const;
21
bool is_bridge() const;
25
_new(CLASS, expolygon, surface_type, thickness, thickness_layers, bridge_angle, extra_perimeters)
28
SurfaceType surface_type;
30
unsigned short thickness_layers;
32
unsigned short extra_perimeters;
34
RETVAL = new Surface ();
35
RETVAL->expolygon = *expolygon;
36
RETVAL->surface_type = surface_type;
37
RETVAL->thickness = thickness;
38
RETVAL->thickness_layers = thickness_layers;
39
RETVAL->bridge_angle = bridge_angle;
40
RETVAL->extra_perimeters = extra_perimeters;
41
// we don't delete expolygon here because it's referenced by a Perl SV
42
// whose DESTROY will take care of destruction
47
Surface::surface_type(...)
50
THIS->surface_type = (SurfaceType)SvUV(ST(1));
52
RETVAL = THIS->surface_type;
57
Surface::bridge_angle(...)
60
THIS->bridge_angle = (double)SvNV(ST(1));
62
RETVAL = THIS->bridge_angle;
67
Surface::extra_perimeters(...)
70
THIS->extra_perimeters = (double)SvUV(ST(1));
72
RETVAL = THIS->extra_perimeters;
79
RETVAL.push_back(THIS->expolygon.contour);
80
for (Polygons::iterator it = THIS->expolygon.holes.begin(); it != THIS->expolygon.holes.end(); ++it) {
81
RETVAL.push_back((*it));
87
Surface::offset(delta, scale = CLIPPER_OFFSET_SCALE, joinType = ClipperLib::jtMiter, miterLimit = 3)
90
ClipperLib::JoinType joinType
93
offset(*THIS, RETVAL, delta, scale, joinType, miterLimit);
100
%package{Slic3r::Surface};
107
S_TYPE_BOTTOM = stBottom
108
S_TYPE_BOTTOMBRIDGE = stBottomBridge
109
S_TYPE_INTERNAL = stInternal
110
S_TYPE_INTERNALSOLID = stInternalSolid
111
S_TYPE_INTERNALBRIDGE = stInternalBridge
112
S_TYPE_INTERNALVOID = stInternalVoid