mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-21 11:29:26 -07:00
Improved libnest2d caching
This commit is contained in:
@@ -682,7 +682,9 @@ void testNfp(const std::vector<ItemPair>& testdata) {
|
||||
auto&& nfp = Nfp::noFitPolygon<lvl>(stationary.rawShape(),
|
||||
orbiter.transformedShape());
|
||||
|
||||
auto v = ShapeLike::isValid(nfp);
|
||||
strategies::correctNfpPosition(nfp, stationary, orbiter);
|
||||
|
||||
auto v = ShapeLike::isValid(nfp.first);
|
||||
|
||||
if(!v.first) {
|
||||
std::cout << v.second << std::endl;
|
||||
@@ -690,7 +692,7 @@ void testNfp(const std::vector<ItemPair>& testdata) {
|
||||
|
||||
ASSERT_TRUE(v.first);
|
||||
|
||||
Item infp(nfp);
|
||||
Item infp(nfp.first);
|
||||
|
||||
int i = 0;
|
||||
auto rorbiter = orbiter.transformedShape();
|
||||
@@ -742,6 +744,15 @@ TEST(GeometryAlgorithms, nfpConvexConvex) {
|
||||
// testNfp<NfpLevel::BOTH_CONCAVE, 1000>(nfp_concave_testdata);
|
||||
//}
|
||||
|
||||
TEST(GeometryAlgorithms, nfpConcaveConcave) {
|
||||
using namespace libnest2d;
|
||||
|
||||
// Rectangle r1(10, 10);
|
||||
// Rectangle r2(20, 20);
|
||||
// auto result = Nfp::nfpSimpleSimple(r1.transformedShape(),
|
||||
// r2.transformedShape());
|
||||
}
|
||||
|
||||
TEST(GeometryAlgorithms, pointOnPolygonContour) {
|
||||
using namespace libnest2d;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user