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

MillingPostProcess.hpp « Milling « libslic3r « src - github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5fd16877512f19c075595190288dc8d69956321b (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef slic3r_MillingPostProcess_hpp_
#define slic3r_MillingPostProcess_hpp_

#include "../libslic3r.h"
#include <vector>
#include "../ExPolygonCollection.hpp"
#include "../Polygon.hpp"
#include "../Layer.hpp"
#include "../PrintConfig.hpp"
#include "../SurfaceCollection.hpp"

namespace Slic3r {


class MillingPostProcess {
public:
    // Inputs:
    const SurfaceCollection     *slices;
    const ExPolygons            *lower_slices;
    const PrintRegionConfig     *config;
    const PrintObjectConfig     *object_config;
    const PrintConfig           *print_config;
    
    MillingPostProcess(
        // Input:
        const SurfaceCollection*    slices,
        const ExPolygons*           lower_slices,
        const PrintRegionConfig*    config,
        const PrintObjectConfig*    object_config,
        const PrintConfig*          print_config)
        : slices(slices), lower_slices(lower_slices),
            config(config), object_config(object_config), print_config(print_config)
        {};

    /// get mill path
    ExtrusionEntityCollection  process(const Layer *layer);
    /// get the areas that shouldn't be grown because the mill can't go here.
    ExPolygons  get_unmillable_areas(const Layer* layer);
    bool        can_be_milled(const Layer* layer);

private:
    Polygons    _lower_slices_p;

    void getExtrusionLoop(const Layer* layer, Polygon& poly, Polylines& entrypoints, ExtrusionEntityCollection&out_coll);
};

}

#endif