2013-07-16 18:09:53 +00:00
|
|
|
%module{Slic3r::XS};
|
|
|
|
|
|
|
|
%{
|
|
|
|
#include <myinit.h>
|
|
|
|
#include "clipper.hpp"
|
|
|
|
#include "ClipperUtils.hpp"
|
|
|
|
%}
|
|
|
|
|
|
|
|
%package{Slic3r::Geometry::Clipper};
|
|
|
|
|
|
|
|
%{
|
|
|
|
|
2013-07-16 22:48:29 +00:00
|
|
|
Polygons
|
|
|
|
offset(polygons, delta, scale = 100000, joinType = ClipperLib::jtMiter, miterLimit = 3)
|
|
|
|
Polygons polygons
|
|
|
|
const float delta
|
|
|
|
double scale
|
|
|
|
ClipperLib::JoinType joinType
|
|
|
|
double miterLimit
|
|
|
|
CODE:
|
|
|
|
offset(polygons, RETVAL, delta, scale, joinType, miterLimit);
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-07-16 18:09:53 +00:00
|
|
|
ExPolygons
|
|
|
|
offset_ex(polygons, delta, scale = 100000, joinType = ClipperLib::jtMiter, miterLimit = 3)
|
|
|
|
Polygons polygons
|
|
|
|
const float delta
|
|
|
|
double scale
|
|
|
|
ClipperLib::JoinType joinType
|
|
|
|
double miterLimit
|
|
|
|
CODE:
|
2013-07-16 18:36:27 +00:00
|
|
|
offset_ex(polygons, RETVAL, delta, scale, joinType, miterLimit);
|
2013-07-16 18:09:53 +00:00
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-07-16 22:48:29 +00:00
|
|
|
Polygons
|
|
|
|
offset2(polygons, delta1, delta2, scale = 100000, joinType = ClipperLib::jtMiter, miterLimit = 3)
|
|
|
|
Polygons polygons
|
|
|
|
const float delta1
|
|
|
|
const float delta2
|
|
|
|
double scale
|
|
|
|
ClipperLib::JoinType joinType
|
|
|
|
double miterLimit
|
|
|
|
CODE:
|
|
|
|
offset2(polygons, RETVAL, delta1, delta2, scale, joinType, miterLimit);
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-07-16 18:09:53 +00:00
|
|
|
ExPolygons
|
|
|
|
offset2_ex(polygons, delta1, delta2, scale = 100000, joinType = ClipperLib::jtMiter, miterLimit = 3)
|
|
|
|
Polygons polygons
|
|
|
|
const float delta1
|
|
|
|
const float delta2
|
|
|
|
double scale
|
|
|
|
ClipperLib::JoinType joinType
|
|
|
|
double miterLimit
|
|
|
|
CODE:
|
2013-07-16 18:36:27 +00:00
|
|
|
offset2_ex(polygons, RETVAL, delta1, delta2, scale, joinType, miterLimit);
|
2013-07-16 18:09:53 +00:00
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-07-16 23:21:30 +00:00
|
|
|
Polygons
|
|
|
|
diff(subject, clip, safety_offset = false)
|
|
|
|
Polygons subject
|
|
|
|
Polygons clip
|
|
|
|
bool safety_offset
|
|
|
|
CODE:
|
|
|
|
diff(subject, clip, RETVAL, safety_offset);
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-07-16 18:29:15 +00:00
|
|
|
ExPolygons
|
|
|
|
diff_ex(subject, clip, safety_offset = false)
|
|
|
|
Polygons subject
|
|
|
|
Polygons clip
|
|
|
|
bool safety_offset
|
|
|
|
CODE:
|
2013-07-16 23:21:30 +00:00
|
|
|
diff(subject, clip, RETVAL, safety_offset);
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
|
|
|
Polygons
|
|
|
|
intersection(subject, clip, safety_offset = false)
|
|
|
|
Polygons subject
|
|
|
|
Polygons clip
|
|
|
|
bool safety_offset
|
|
|
|
CODE:
|
|
|
|
intersection(subject, clip, RETVAL, safety_offset);
|
2013-07-16 18:29:15 +00:00
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-07-16 22:29:09 +00:00
|
|
|
ExPolygons
|
|
|
|
intersection_ex(subject, clip, safety_offset = false)
|
|
|
|
Polygons subject
|
|
|
|
Polygons clip
|
|
|
|
bool safety_offset
|
|
|
|
CODE:
|
2013-07-16 23:21:30 +00:00
|
|
|
intersection(subject, clip, RETVAL, safety_offset);
|
2013-07-16 22:29:09 +00:00
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
|
|
|
ExPolygons
|
|
|
|
xor_ex(subject, clip, safety_offset = false)
|
|
|
|
Polygons subject
|
|
|
|
Polygons clip
|
|
|
|
bool safety_offset
|
|
|
|
CODE:
|
|
|
|
xor_ex(subject, clip, RETVAL, safety_offset);
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
|
|
|
ExPolygons
|
|
|
|
union_ex(subject, safety_offset = false)
|
|
|
|
Polygons subject
|
|
|
|
bool safety_offset
|
|
|
|
CODE:
|
|
|
|
union_ex(subject, RETVAL, safety_offset);
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
2013-07-16 18:09:53 +00:00
|
|
|
%}
|