diff options
Diffstat (limited to 'xs/src/libslic3r/ClipperUtils.hpp')
-rw-r--r-- | xs/src/libslic3r/ClipperUtils.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xs/src/libslic3r/ClipperUtils.hpp b/xs/src/libslic3r/ClipperUtils.hpp index ccdf75588..9f3fca9e9 100644 --- a/xs/src/libslic3r/ClipperUtils.hpp +++ b/xs/src/libslic3r/ClipperUtils.hpp @@ -49,6 +49,16 @@ Slic3r::Polygons offset(const Slic3r::Polygons &polygons, const float delta, double scale = CLIPPER_OFFSET_SCALE, ClipperLib::JoinType joinType = ClipperLib::jtMiter, double miterLimit = 3); +// This is a safe variant of the polygon offset, tailored for a single ExPolygon: +// a single polygon with multiple non-overlapping holes. +// Each contour and hole is offsetted separately, then the holes are subtracted from the outer contours. +void offset(const Slic3r::ExPolygon &expolygon, ClipperLib::Paths* retval, const float delta, + double scale = CLIPPER_OFFSET_SCALE, ClipperLib::JoinType joinType = ClipperLib::jtMiter, + double miterLimit = 3); +Slic3r::Polygons offset(const Slic3r::ExPolygon &expolygon, const float delta, + double scale = CLIPPER_OFFSET_SCALE, ClipperLib::JoinType joinType = ClipperLib::jtMiter, + double miterLimit = 3); + // offset Polylines void offset(const Slic3r::Polylines &polylines, ClipperLib::Paths* retval, const float delta, double scale = CLIPPER_OFFSET_SCALE, ClipperLib::JoinType joinType = ClipperLib::jtSquare, |