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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2016-09-30 16:23:18 +0300
committerbubnikv <bubnikv@gmail.com>2016-09-30 16:23:18 +0300
commit3a81e6bee420196698e3f1409a8a7318dd35965b (patch)
tree70574b85f26c77406691b1ed188049fd201911ee /xs/src/libslic3r/Polyline.cpp
parentb5e24d3527db0bc9153365b0709787e145aeb982 (diff)
Bugfix of bottom bridges. If close regions shall be closed by bridges,
these regions are grown to anchor the bridge lines to the bottom surface. The grown regions may overlap. In that case the regions are now merged before the bridging direction is calculated for the merged region.
Diffstat (limited to 'xs/src/libslic3r/Polyline.cpp')
-rw-r--r--xs/src/libslic3r/Polyline.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/xs/src/libslic3r/Polyline.cpp b/xs/src/libslic3r/Polyline.cpp
index baa2bbf5d..08717b57c 100644
--- a/xs/src/libslic3r/Polyline.cpp
+++ b/xs/src/libslic3r/Polyline.cpp
@@ -1,3 +1,4 @@
+#include "BoundingBox.hpp"
#include "Polyline.hpp"
#include "ExPolygon.hpp"
#include "ExPolygonCollection.hpp"
@@ -220,6 +221,22 @@ Polyline::wkt() const
return wkt.str();
}
+BoundingBox get_extents(const Polyline &polyline)
+{
+ return polyline.bounding_box();
+}
+
+BoundingBox get_extents(const Polylines &polylines)
+{
+ BoundingBox bb;
+ if (! polylines.empty()) {
+ bb = polylines.front().bounding_box();
+ for (size_t i = 1; i < polylines.size(); ++ i)
+ bb.merge(polylines[i]);
+ }
+ return bb;
+}
+
ThickLines
ThickPolyline::thicklines() const
{