Working arrange_objects with DJD selection heuristic and a bottom-left placement strategy.

This commit is contained in:
tamasmeszaros 2018-05-17 10:37:26 +02:00
parent b6b7945830
commit fd829580e9
36 changed files with 6087 additions and 45 deletions

View file

@ -48,7 +48,6 @@
#endif
#include <cassert>
#include "Point.hpp"
#if ! defined(_MSC_VER) && defined(__SIZEOF_INT128__)
#define HAS_INTRINSIC_128_TYPE
@ -288,20 +287,4 @@ public:
}
return sign_determinant_2x2(p1, q1, p2, q2) * invert;
}
// Exact orientation predicate,
// returns +1: CCW, 0: collinear, -1: CW.
static int orient(const Slic3r::Point &p1, const Slic3r::Point &p2, const Slic3r::Point &p3)
{
Slic3r::Vector v1(p2 - p1);
Slic3r::Vector v2(p3 - p1);
return sign_determinant_2x2_filtered(v1.x, v1.y, v2.x, v2.y);
}
// Exact orientation predicate,
// returns +1: CCW, 0: collinear, -1: CW.
static int cross(const Slic3r::Point &v1, const Slic3r::Point &v2)
{
return sign_determinant_2x2_filtered(v1.x, v1.y, v2.x, v2.y);
}
};