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:
Diffstat (limited to 'xs/src/libslic3r/BridgeDetector.cpp')
-rw-r--r--xs/src/libslic3r/BridgeDetector.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/xs/src/libslic3r/BridgeDetector.cpp b/xs/src/libslic3r/BridgeDetector.cpp
index da59a04d8..1dddf81ce 100644
--- a/xs/src/libslic3r/BridgeDetector.cpp
+++ b/xs/src/libslic3r/BridgeDetector.cpp
@@ -186,15 +186,11 @@ BridgeDetector::detect_angle()
}
void
-BridgeDetector::coverage(Polygons* coverage) const
-{
- if (this->angle == -1) return;
- return this->coverage(angle, coverage);
-}
-
-void
BridgeDetector::coverage(double angle, Polygons* coverage) const
{
+ if (angle == -1) angle = this->angle;
+ if (angle == -1) return;
+
// Clone our expolygon and rotate it so that we work with vertical lines.
ExPolygon expolygon = this->expolygon;
expolygon.rotate(PI/2.0 - angle, Point(0,0));
@@ -263,19 +259,23 @@ BridgeDetector::coverage(double angle, Polygons* coverage) const
*/
}
-/* This method returns the bridge edges (as polylines) that are not supported
- but would allow the entire bridge area to be bridged with detected angle
- if supported too */
-void
-BridgeDetector::unsupported_edges(Polylines* unsupported) const
+Polygons
+BridgeDetector::coverage(double angle) const
{
- if (this->angle == -1) return;
- return this->unsupported_edges(this->angle, unsupported);
+ Polygons pp;
+ this->coverage(angle, &pp);
+ return pp;
}
+/* This method returns the bridge edges (as polylines) that are not supported
+ but would allow the entire bridge area to be bridged with detected angle
+ if supported too */
void
BridgeDetector::unsupported_edges(double angle, Polylines* unsupported) const
{
+ if (angle == -1) angle = this->angle;
+ if (angle == -1) return;
+
// get bridge edges (both contour and holes)
Polylines bridge_edges;
{
@@ -319,6 +319,14 @@ BridgeDetector::unsupported_edges(double angle, Polylines* unsupported) const
*/
}
+Polylines
+BridgeDetector::unsupported_edges(double angle) const
+{
+ Polylines pp;
+ this->unsupported_edges(angle, &pp);
+ return pp;
+}
+
#ifdef SLIC3RXS
REGISTER_CLASS(BridgeDetector, "BridgeDetector");
#endif