mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00

Change-Id: Ibc6e4e4262ef9fc0b36a936acc52a3b60dca2cb4 (cherry picked from commit e3b7c5c3404aa200c4b852b3963a7a0aae8837d2)
34 lines
1.2 KiB
C++
34 lines
1.2 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 ¶ms,
|
|
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));
|
|
|
|
if (params.dont_connect() || fill_lines.size() <= 1) {
|
|
append(polylines_out, chain_polylines(std::move(fill_lines)));
|
|
} else
|
|
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
|