diff options
author | bubnikv <bubnikv@gmail.com> | 2018-09-19 12:02:24 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-09-19 12:02:24 +0300 |
commit | 0558b53493a77bae44831cf87bb0f59359828ef5 (patch) | |
tree | c3e8dbdf7d91a051c12d9ebbf7606d41047fea96 /src/libnest2d/tools/libnfpglue.hpp | |
parent | 3ddaccb6410478ad02d8c0e02d6d8e6eb1785b9f (diff) |
WIP: Moved sources int src/, separated most of the source code from Perl.
The XS was left only for the unit / integration tests, and it links
libslic3r only. No wxWidgets are allowed to be used from Perl starting
from now.
Diffstat (limited to 'src/libnest2d/tools/libnfpglue.hpp')
-rw-r--r-- | src/libnest2d/tools/libnfpglue.hpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/libnest2d/tools/libnfpglue.hpp b/src/libnest2d/tools/libnfpglue.hpp new file mode 100644 index 000000000..1ff033cb9 --- /dev/null +++ b/src/libnest2d/tools/libnfpglue.hpp @@ -0,0 +1,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 |