Browse Source

fix asserts

supermerill 3 days ago
parent
commit
2677d9f7a1
2 changed files with 2 additions and 3 deletions
  1. 1 2
      src/libslic3r/LayerRegion.cpp
  2. 1 1
      src/libslic3r/Polyline.cpp

+ 1 - 2
src/libslic3r/LayerRegion.cpp

@@ -1231,8 +1231,7 @@ void LayerRegion::prepare_fill_surfaces()
                     if (intersect.size() == 1 && cut.empty())
                         continue;
                     if (!intersect.empty()) {
-                        //not possible ot have multiple intersect no cut from a single expoly.
-                        assert(intersect.size() == 1);
+                        // not possible ot have no cut if the intersect size is > 1.
                         assert(!cut.empty());
                         intersect[0].assert_valid();
                         surface->expolygon = std::move(intersect[0]);

+ 1 - 1
src/libslic3r/Polyline.cpp

@@ -1824,7 +1824,7 @@ bool ArcPolyline::is_valid() const {
             coordf_t new_length2 = Geometry::ArcWelder::arc_length<Vec2d,Vec2d,Vec2d,double>(startd, endd, center, m_path[i].ccw());
             Vec2d centerd = m_path[i].center.cast<double>();
             coordf_t new_length3 = Geometry::ArcWelder::arc_length<Vec2d,Vec2d,Vec2d,double>(startd, endd, centerd, m_path[i].ccw());
-            assert(is_approx(new_length, new_length2, SCALED_EPSILON*4.));
+            assert(is_approx(new_length, new_length2, SCALED_EPSILON*10.));
             assert(is_approx(new_length2, new_length3, SCALED_EPSILON*10.));
             assert(is_approx(new_length2, m_path[i].length, SCALED_EPSILON*2.));
             Slic3r::Geometry::ArcWelder::Orientation orientation = Slic3r::Geometry::ArcWelder::arc_orientation(m_path[i - 1].point, m_path[i].point, m_path[i].center, m_path[i].radius);