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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xs/src/libnest2d/tests/test.cpp')
-rw-r--r--xs/src/libnest2d/tests/test.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/xs/src/libnest2d/tests/test.cpp b/xs/src/libnest2d/tests/test.cpp
index b37274f84..39315ff1a 100644
--- a/xs/src/libnest2d/tests/test.cpp
+++ b/xs/src/libnest2d/tests/test.cpp
@@ -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;