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

libnfpglue.hpp « tools « libnest2d « src « xs - github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1ff033cb92b4ac4cef7076afe53f72c96c3ea7c5 (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
#ifndef LIBNFPGLUE_HPP
#define LIBNFPGLUE_HPP

#include <libnest2d/clipper_backend/clipper_backend.hpp>

namespace libnest2d {

using NfpR = nfp::NfpResult<PolygonImpl>;

NfpR _nfp(const PolygonImpl& sh, const PolygonImpl& cother);

template<>
struct nfp::NfpImpl<PolygonImpl, nfp::NfpLevel::CONVEX_ONLY> {
    NfpR operator()(const PolygonImpl& sh, const PolygonImpl& cother);
};

template<>
struct nfp::NfpImpl<PolygonImpl, nfp::NfpLevel::ONE_CONVEX> {
    NfpR operator()(const PolygonImpl& sh, const PolygonImpl& cother);
};

template<>
struct nfp::NfpImpl<PolygonImpl, nfp::NfpLevel::BOTH_CONCAVE> {
    NfpR operator()(const PolygonImpl& sh, const PolygonImpl& cother);
};

//template<>
//struct Nfp::NfpImpl<PolygonImpl, NfpLevel::ONE_CONVEX_WITH_HOLES> {
//    NfpResult operator()(const PolygonImpl& sh, const PolygonImpl& cother);
//};

//template<>
//struct Nfp::NfpImpl<PolygonImpl, NfpLevel::BOTH_CONCAVE_WITH_HOLES> {
//    NfpResult operator()(const PolygonImpl& sh, const PolygonImpl& cother);
//};

template<> struct nfp::MaxNfpLevel<PolygonImpl> {
    static const BP2D_CONSTEXPR NfpLevel value =
//            NfpLevel::CONVEX_ONLY;
            NfpLevel::BOTH_CONCAVE;
};

}


#endif // LIBNFPGLUE_HPP