mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-06 22:47:32 -06:00
Fix infill anchor missing for FillPlanePath (#9462)
Fix infill anchor missing for archimedian chords, hilbert curve and octagram spiral infill pattern
This commit is contained in:
parent
09f2ee467b
commit
672c115c61
1 changed files with 34 additions and 32 deletions
|
@ -119,8 +119,9 @@ void FillPlanePath::_fill_surface_single(
|
|||
|
||||
if (polyline.size() >= 2) {
|
||||
Polylines polylines = intersection_pl(polyline, expolygon);
|
||||
if (!polylines.empty()) {
|
||||
Polylines chained;
|
||||
if (params.dont_connect() || params.density > 0.5 || polylines.size() <= 1) {
|
||||
if (params.dont_connect() || params.density > 0.5) {
|
||||
// ORCA: special flag for flow rate calibration
|
||||
auto is_flow_calib = params.extrusion_role == erTopSolidInfill &&
|
||||
this->print_object_config->has("calib_flowrate_topinfill_special_order") &&
|
||||
|
@ -129,7 +130,8 @@ void FillPlanePath::_fill_surface_single(
|
|||
if (is_flow_calib) {
|
||||
// We want the spiral part to be printed inside-out
|
||||
// Find the center spiral line first, by looking for the longest one
|
||||
auto it = std::max_element(polylines.begin(), polylines.end(), [](const Polyline& a, const Polyline& b) { return a.length() < b.length(); });
|
||||
auto it = std::max_element(polylines.begin(), polylines.end(),
|
||||
[](const Polyline& a, const Polyline& b) { return a.length() < b.length(); });
|
||||
Polyline center_spiral = std::move(*it);
|
||||
|
||||
// Ensure the spiral is printed from inside to out
|
||||
|
@ -146,8 +148,7 @@ void FillPlanePath::_fill_surface_single(
|
|||
} else {
|
||||
chained = chain_polylines(std::move(polylines));
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
connect_infill(std::move(polylines), expolygon, chained, this->spacing, params);
|
||||
// paths must be repositioned and rotated back
|
||||
for (Polyline& pl : chained) {
|
||||
|
@ -157,6 +158,7 @@ void FillPlanePath::_fill_surface_single(
|
|||
append(polylines_out, std::move(chained));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Follow an Archimedean spiral, in polar coordinates: r=a+b\theta
|
||||
template<typename Output>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue