mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-15 23:41:47 +08:00
parent
a43b2b123d
commit
5c46a60f33
@ -80,6 +80,28 @@ inline size_t number_polygons(const ExPolygons &expolys)
|
|||||||
return n_polygons;
|
return n_polygons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline ExPolygon to_expolygon(const Polygon &other)
|
||||||
|
{
|
||||||
|
ExPolygon ex;
|
||||||
|
ex.contour = other;
|
||||||
|
return ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline ExPolygon to_expolygon(Polygon &&other)
|
||||||
|
{
|
||||||
|
ExPolygon ex;
|
||||||
|
ex.contour = std::move(other);
|
||||||
|
return ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline ExPolygons to_expolygon(const Polygons &other)
|
||||||
|
{
|
||||||
|
ExPolygons exs;
|
||||||
|
for (const Polygon &po : other) exs.emplace_back(to_expolygon(po));
|
||||||
|
return exs;
|
||||||
|
}
|
||||||
|
|
||||||
inline Lines to_lines(const ExPolygon &src)
|
inline Lines to_lines(const ExPolygon &src)
|
||||||
{
|
{
|
||||||
size_t n_lines = src.contour.points.size();
|
size_t n_lines = src.contour.points.size();
|
||||||
|
@ -293,7 +293,11 @@ void PerimeterGenerator::process()
|
|||||||
ExPolygons overhangs_unsupported;
|
ExPolygons overhangs_unsupported;
|
||||||
if (this->config->extra_perimeters && !last.empty()
|
if (this->config->extra_perimeters && !last.empty()
|
||||||
&& this->lower_slices != NULL && !this->lower_slices->expolygons.empty()) {
|
&& this->lower_slices != NULL && !this->lower_slices->expolygons.empty()) {
|
||||||
overhangs_unsupported = diff_ex(last, this->lower_slices->expolygons);
|
//remove holes from lower layer, we only ant that for overhangs, not bridges!
|
||||||
|
ExPolygons lower_without_holes;
|
||||||
|
for (const ExPolygon &exp : this->lower_slices->expolygons)
|
||||||
|
lower_without_holes.emplace_back(to_expolygon(exp.contour));
|
||||||
|
overhangs_unsupported = diff_ex(last, lower_without_holes);
|
||||||
if (!overhangs_unsupported.empty()) {
|
if (!overhangs_unsupported.empty()) {
|
||||||
//only consider overhangs and let bridges alone
|
//only consider overhangs and let bridges alone
|
||||||
//only consider the part that can be bridged (really, by the bridge algorithm)
|
//only consider the part that can be bridged (really, by the bridge algorithm)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user