OrcaSlicer/src/libslic3r/Fill/FillLightning.cpp
Henk 66cab434b8
Fix infill anchor missing (#9407)
* Fix infill anchor missing

* Correctly process cases without fill lines in FillRectilinear::fill_surface_with_multilines()

* Fix infill anchor missing for several other infill patterns

* Fix infill anchor missing for rectilinear and aligned rectilinear infill pattern

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
2025-04-23 21:17:19 +08:00

32 lines
1.0 KiB
C++

#include "../Print.hpp"
#include "../ShortestPath.hpp"
#include "FillLightning.hpp"
#include "Lightning/Generator.hpp"
namespace Slic3r::FillLightning {
void Filler::_fill_surface_single(
const FillParams &params,
unsigned int thickness_layers,
const std::pair<float, Point> &direction,
ExPolygon expolygon,
Polylines &polylines_out)
{
const Layer &layer = generator->getTreesForLayer(this->layer_id);
Polylines fill_lines = layer.convertToLines(to_polygons(expolygon), scaled<coord_t>(0.5 * this->spacing - this->overlap));
chain_or_connect_infill(std::move(fill_lines), expolygon, polylines_out, this->spacing, params);
}
void GeneratorDeleter::operator()(Generator *p) {
delete p;
}
GeneratorPtr build_generator(const PrintObject &print_object, const std::function<void()> &throw_on_cancel_callback)
{
return GeneratorPtr(new Generator(print_object, throw_on_cancel_callback));
}
} // namespace Slic3r::FillAdaptive