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:
authorsupermerill <merill@fr.fr>2020-01-15 20:04:23 +0300
committersupermerill <merill@fr.fr>2020-01-15 20:04:23 +0300
commit705edaa7fbdac70b8efe9401378be0fe40a62c97 (patch)
tree097ceed2f4deab1aeaefb8246ab936b5d86ff8c2
parenteecf28c00cb43793f2e156eca1f3a9bf169ecb89 (diff)
up version to 47.12.2.47.1
fix macos/linux build
-rw-r--r--src/libslic3r/PrintObject.cpp56
-rw-r--r--version.inc4
2 files changed, 29 insertions, 31 deletions
diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp
index e7d77a909..d7d4f0799 100644
--- a/src/libslic3r/PrintObject.cpp
+++ b/src/libslic3r/PrintObject.cpp
@@ -2349,41 +2349,39 @@ end:
}
ExPolygons PrintObject::_offset_holes(double hole_delta, const ExPolygons &polys) const{
- if (hole_delta != 0.f) {
- ExPolygons new_polys;
- for (const ExPolygon &ex_poly : polys) {
- ExPolygon new_ex_poly(ex_poly);
- new_ex_poly.holes.clear();
- for (const Polygon &hole : ex_poly.holes) {
- //check if convex to reduce it
- // check whether first point forms a convex angle
- //note: we allow a deviation of 5.7° (0.01rad = 0.57°)
- bool ok = true;
- ok = (hole.points.front().ccw_angle(hole.points.back(), *(hole.points.begin() + 1)) <= PI + 0.1);
- // check whether points 1..(n-1) form convex angles
- if (ok)
- for (Points::const_iterator p = hole.points.begin() + 1; p != hole.points.end() - 1; ++p) {
- ok = (p->ccw_angle(*(p - 1), *(p + 1)) <= PI + 0.1);
- if (!ok) break;
- }
+ ExPolygons new_polys;
+ for (const ExPolygon &ex_poly : polys) {
+ ExPolygon new_ex_poly(ex_poly);
+ new_ex_poly.holes.clear();
+ for (const Polygon &hole : ex_poly.holes) {
+ //check if convex to reduce it
+ // check whether first point forms a convex angle
+ //note: we allow a deviation of 5.7° (0.01rad = 0.57°)
+ bool ok = true;
+ ok = (hole.points.front().ccw_angle(hole.points.back(), *(hole.points.begin() + 1)) <= PI + 0.1);
+ // check whether points 1..(n-1) form convex angles
+ if (ok)
+ for (Points::const_iterator p = hole.points.begin() + 1; p != hole.points.end() - 1; ++p) {
+ ok = (p->ccw_angle(*(p - 1), *(p + 1)) <= PI + 0.1);
+ if (!ok) break;
+ }
- // check whether last point forms a convex angle
- ok &= (hole.points.back().ccw_angle(*(hole.points.end() - 2), hole.points.front()) <= PI + 0.1);
+ // check whether last point forms a convex angle
+ ok &= (hole.points.back().ccw_angle(*(hole.points.end() - 2), hole.points.front()) <= PI + 0.1);
- if (ok) {
- for (Polygon newHole : offset(hole, hole_delta)) {
- //reverse because it's a hole, not an object
- newHole.make_clockwise();
- new_ex_poly.holes.push_back(newHole);
- }
- } else {
- new_ex_poly.holes.push_back(hole);
+ if (ok) {
+ for (Polygon newHole : offset(hole, hole_delta)) {
+ //reverse because it's a hole, not an object
+ newHole.make_clockwise();
+ new_ex_poly.holes.push_back(newHole);
}
+ } else {
+ new_ex_poly.holes.push_back(hole);
}
- new_polys.push_back(new_ex_poly);
}
- return new_polys;
+ new_polys.push_back(new_ex_poly);
}
+ return new_polys;
}
/// max angle: you ahve to be lwer than that to divide it. PI => all accepted
diff --git a/version.inc b/version.inc
index 51da50981..5fe3c77f4 100644
--- a/version.inc
+++ b/version.inc
@@ -5,5 +5,5 @@ set(SLIC3R_APP_NAME "Slic3r++")
set(SLIC3R_APP_KEY "Slic3r++")
set(SLIC3R_VERSION "2.2.47")
set(SLIC3R_BUILD_ID "slic3r++_${SLIC3R_VERSION}+UNKNOWN")
-set(SLIC3R_RC_VERSION "2,2,47,0")
-set(SLIC3R_RC_VERSION_DOTS "2.2.47.0")
+set(SLIC3R_RC_VERSION "2,2,47,1")
+set(SLIC3R_RC_VERSION_DOTS "2.2.47.1")