Fix libnest2d tests

This commit is contained in:
tamasmeszaros 2019-07-03 17:05:08 +02:00
parent bc315f4c2c
commit b5215dae1b
3 changed files with 20 additions and 10 deletions

View file

@ -68,11 +68,11 @@ public:
return toWallPoly(item, Dir::DOWN);
}
inline Unit availableSpaceLeft(const Item& item) {
inline Coord availableSpaceLeft(const Item& item) {
return availableSpace(item, Dir::LEFT);
}
inline Unit availableSpaceDown(const Item& item) {
inline Coord availableSpaceDown(const Item& item) {
return availableSpace(item, Dir::DOWN);
}
@ -83,7 +83,7 @@ protected:
// Get initial position for item in the top right corner
setInitialPosition(item);
Unit d = availableSpaceDown(item);
Coord d = availableSpaceDown(item);
auto eps = config_.epsilon;
bool can_move = d > eps;
bool can_be_packed = can_move;
@ -179,7 +179,7 @@ protected:
return ret;
}
Unit availableSpace(const Item& _item, const Dir dir) {
Coord availableSpace(const Item& _item, const Dir dir) {
Item item (_item.transformedShape());
@ -223,7 +223,7 @@ protected:
cmp);
// Get the initial distance in floating point
Unit m = getCoord(*minvertex_it);
Coord m = getCoord(*minvertex_it);
// Check available distance for every vertex of item to the objects
// in the way for the nearest intersection

View file

@ -18,7 +18,6 @@ public:
using Segment = _Segment<Vertex>;
using BinType = TBin;
using Coord = TCoord<Vertex>;
using Unit = Coord;
using Config = Cfg;
using ItemGroup = _ItemGroup<RawShape>;
using DefaultIter = typename ItemGroup::const_iterator;
@ -131,7 +130,6 @@ using typename Base::Vertex; \
using typename Base::Segment; \
using typename Base::PackResult; \
using typename Base::Coord; \
using typename Base::Unit; \
private:
}