diff options
author | tamasmeszaros <meszaros.q@gmail.com> | 2018-07-27 13:28:14 +0300 |
---|---|---|
committer | tamasmeszaros <meszaros.q@gmail.com> | 2018-07-27 13:28:14 +0300 |
commit | 84f97e1f64adc8b0f6f3c31fe1e22ba2e97e4572 (patch) | |
tree | a255d6b0c52f564f29776622bef01bdbd82f3ec4 /xs/src/libnest2d/tools/libnfpglue.hpp | |
parent | c430f5718762cfa844619674dfff8cb006c09a7f (diff) |
Improved libnest2d caching
Diffstat (limited to 'xs/src/libnest2d/tools/libnfpglue.hpp')
-rw-r--r-- | xs/src/libnest2d/tools/libnfpglue.hpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/xs/src/libnest2d/tools/libnfpglue.hpp b/xs/src/libnest2d/tools/libnfpglue.hpp index 87b0e0833..75f639445 100644 --- a/xs/src/libnest2d/tools/libnfpglue.hpp +++ b/xs/src/libnest2d/tools/libnfpglue.hpp @@ -5,37 +5,39 @@ namespace libnest2d { -PolygonImpl _nfp(const PolygonImpl& sh, const PolygonImpl& cother); +using NfpR = Nfp::NfpResult<PolygonImpl>; + +NfpR _nfp(const PolygonImpl& sh, const PolygonImpl& cother); template<> struct Nfp::NfpImpl<PolygonImpl, NfpLevel::CONVEX_ONLY> { - PolygonImpl operator()(const PolygonImpl& sh, const PolygonImpl& cother); + NfpR operator()(const PolygonImpl& sh, const PolygonImpl& cother); }; template<> struct Nfp::NfpImpl<PolygonImpl, NfpLevel::ONE_CONVEX> { - PolygonImpl operator()(const PolygonImpl& sh, const PolygonImpl& cother); + NfpR operator()(const PolygonImpl& sh, const PolygonImpl& cother); }; template<> struct Nfp::NfpImpl<PolygonImpl, NfpLevel::BOTH_CONCAVE> { - PolygonImpl operator()(const PolygonImpl& sh, const PolygonImpl& cother); + NfpR operator()(const PolygonImpl& sh, const PolygonImpl& cother); }; -template<> -struct Nfp::NfpImpl<PolygonImpl, NfpLevel::ONE_CONVEX_WITH_HOLES> { - PolygonImpl 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> { - PolygonImpl 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_WITH_HOLES; + NfpLevel::BOTH_CONCAVE; }; } |