5
#include "BoundingBox.hpp"
9
%name{Slic3r::Polygon} class Polygon {
11
Clone<Polygon> clone()
12
%code{% RETVAL = THIS; %};
14
%code{% RETVAL = THIS->to_AV(); %};
16
%code{% RETVAL = THIS->to_SV_pureperl(); %};
17
void scale(double factor);
18
void translate(double x, double y);
21
Polyline* split_at_vertex(Point* point)
22
%code{% RETVAL = new Polyline(); THIS->split_at_vertex(*point, RETVAL); %};
23
Polyline* split_at_index(int index)
24
%code{% RETVAL = new Polyline(); THIS->split_at_index(index, RETVAL); %};
25
Polyline* split_at_first_point()
26
%code{% RETVAL = new Polyline(); THIS->split_at_first_point(RETVAL); %};
27
Points equally_spaced_points(double distance)
28
%code{% THIS->equally_spaced_points(distance, &RETVAL); %};
31
bool is_counter_clockwise();
33
bool make_counter_clockwise();
34
bool make_clockwise();
36
Clone<Point> first_point();
37
bool contains_point(Point* point)
38
%code{% RETVAL = THIS->contains_point(*point); %};
39
Polygons simplify(double tolerance);
40
Polygons triangulate_convex()
41
%code{% THIS->triangulate_convex(&RETVAL); %};
42
Clone<Point> centroid();
43
BoundingBox* bounding_box()
45
RETVAL = new BoundingBox();
46
THIS->bounding_box(RETVAL);
53
RETVAL = new Polygon ();
54
// ST(0) is class name, ST(1) is first point
55
RETVAL->points.resize(items-1);
56
for (unsigned int i = 1; i < items; i++) {
57
RETVAL->points[i-1].from_SV_check( ST(i) );
63
Polygon::rotate(angle, center_sv)
68
center.from_SV_check(center_sv);
69
THIS->rotate(angle, center);