Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FillLightning.cpp « Fill « libslic3r « src - github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2ba6fe01789b431bfc5dd128dbf9216fdb1b5a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "../Print.hpp"

#include "FillLightning.hpp"
#include "Lightning/Generator.hpp"
#include "../Surface.hpp"

#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <numeric>

namespace Slic3r::FillLightning {

Polylines Filler::fill_surface(const Surface *surface, const FillParams &params)
{
    const Layer &layer = generator->getTreesForLayer(this->layer_id);
    return layer.convertToLines(to_polygons(surface->expolygon), generator->infilll_extrusion_width());
}

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