ENH: comment the asserts

jira: [none]
Change-Id: I41884dcc407b7c0c9083cd4a354a053c77d9a5ff
(cherry picked from commit a174e3f3ca40931e12cb6519bfc594a2b6217acf)
This commit is contained in:
xin.zhang 2025-08-25 17:51:39 +08:00 committed by Noisyfox
parent fedcfc4ea5
commit 9b5190ca37
2 changed files with 8 additions and 6 deletions

View file

@ -64,8 +64,10 @@ void EdgeGrid::Grid::create(const std::vector<Points> &polygons, coord_t resolut
open = false;
-- end;
}
} else
assert(*begin != end[-1]);
} else {
//assert(*begin != end[-1]);
}
m_contours.emplace_back(begin, end, open);
}
@ -142,8 +144,8 @@ void EdgeGrid::Grid::create_from_m_contours(coord_t resolution)
assert(resolution > 0);
// 1) Measure the bounding box.
for (const Contour &contour : m_contours) {
assert(contour.num_segments() > 0);
assert(*contour.begin() != contour.end()[-1]);
//assert(contour.num_segments() > 0);
//assert(*contour.begin() != contour.end()[-1]);
for (const Slic3r::Point &pt : contour)
m_bbox.merge(pt);
}

View file

@ -123,8 +123,8 @@ inline bool segments_intersect(
const Slic3r::Point &ip1, const Slic3r::Point &ip2,
const Slic3r::Point &jp1, const Slic3r::Point &jp2)
{
assert(ip1 != ip2);
assert(jp1 != jp2);
//assert(ip1 != ip2);
//assert(jp1 != jp2);
auto segments_could_intersect = [](
const Slic3r::Point &ip1, const Slic3r::Point &ip2,