Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-06-02 14:33:19 +0300
committerbubnikv <bubnikv@gmail.com>2017-06-02 14:33:19 +0300
commitb5f38dd23f413b06e87ebf005a658bf85bb70af6 (patch)
tree0cebb2e1e885defa764742f5666ba29040af8422 /xs/src/libslic3r/ClipperUtils.hpp
parentef73bb404bd4241b9bc576eae7409ebf9013e914 (diff)
Fixed the "avoid crossing perimeters" bug introduced in Slic3r 1.34.1.24version_1.35.1
https://github.com/prusa3d/Slic3r/issues/311 https://github.com/prusa3d/Slic3r/issues/317 https://github.com/prusa3d/Slic3r/issues/323
Diffstat (limited to 'xs/src/libslic3r/ClipperUtils.hpp')
-rw-r--r--xs/src/libslic3r/ClipperUtils.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/xs/src/libslic3r/ClipperUtils.hpp b/xs/src/libslic3r/ClipperUtils.hpp
index b14232d90..3c0bec1ec 100644
--- a/xs/src/libslic3r/ClipperUtils.hpp
+++ b/xs/src/libslic3r/ClipperUtils.hpp
@@ -170,12 +170,18 @@ intersection_pl(const Slic3r::Polylines &subject, const Slic3r::Polygons &clip,
return _clipper_pl(ClipperLib::ctIntersection, subject, clip, safety_offset_);
}
-inline Slic3r::Lines
-intersection_ln(const Slic3r::Lines &subject, const Slic3r::Polygons &clip, bool safety_offset_ = false)
+inline Slic3r::Lines intersection_ln(const Slic3r::Lines &subject, const Slic3r::Polygons &clip, bool safety_offset_ = false)
{
return _clipper_ln(ClipperLib::ctIntersection, subject, clip, safety_offset_);
}
+inline Slic3r::Lines intersection_ln(const Slic3r::Line &subject, const Slic3r::Polygons &clip, bool safety_offset_ = false)
+{
+ Slic3r::Lines lines;
+ lines.emplace_back(subject);
+ return _clipper_ln(ClipperLib::ctIntersection, lines, clip, safety_offset_);
+}
+
// union
inline Slic3r::Polygons
union_(const Slic3r::Polygons &subject, bool safety_offset_ = false)