update gapinfill

This commit is contained in:
Wang YB
2024-03-12 09:40:32 +08:00
parent ce3ad490b7
commit 87ab8bd8dd
2 changed files with 10 additions and 4 deletions

View File

@@ -721,15 +721,18 @@ void Layer::variable_width_gap(const ThickPolylines &polylines, ExtrusionRole ro
for (const ThickPolyline &p : polylines) {
ExtrusionPaths paths = thick_polyline_to_extrusion_paths(p, role, flow, tolerance);
if (!paths.empty()) {
if (paths.front().first_point() == paths.back().last_point())
if (paths.front().first_point() == paths.back().last_point()) {
out.emplace_back(new ExtrusionLoop(std::move(paths)));
}
else {
for (ExtrusionPath &path : paths)
for (ExtrusionPath &path : paths) {
if (path.length() >= scale_(flow.nozzle_diameter()/2.0) || path.width() >= scale_(flow.nozzle_diameter()/2.0))
out.emplace_back(new ExtrusionPath(std::move(path)));
}
}
}
}
}
//w21
ExtrusionPaths Layer::thick_polyline_to_extrusion_paths(const ThickPolyline &thick_polyline,
ExtrusionRole role,

View File

@@ -5,6 +5,8 @@
#include "FillConcentric.hpp"
#include <libslic3r/ShortestPath.hpp>
namespace Slic3r {
void FillConcentric::_fill_surface_single(
@@ -116,6 +118,7 @@ void FillConcentric::_fill_surface_single(const FillParams &params,
}
if (j < thick_polylines_out.size())
thick_polylines_out.erase(thick_polylines_out.begin() + int(j), thick_polylines_out.end());
//reorder_by_shortest_traverse(thick_polylines_out);
} else {
Polylines polylines;
this->_fill_surface_single(params, thickness_layers, direction, expolygon, polylines);