bed shape detection works and circle shaped bed now supported with limited arrange quality.

This commit is contained in:
tamasmeszaros
2018-08-06 11:30:10 +02:00
parent 8da8ecb415
commit db8762a93c
2 changed files with 86 additions and 99 deletions

View File

@@ -505,13 +505,18 @@ public:
bool static inline wouldFit(const Box& bb, const _Circle<Vertex>& bin)
{
return sl::isInside<RawShape>(bb, bin);
}
bool static inline wouldFit(const RawShape& chull,
const _Circle<Vertex>& bin)
{
return sl::isInside<RawShape>(chull, bin);
auto bb = sl::boundingBox(chull);
auto d = bin.center() - bb.center();
auto chullcpy = chull;
sl::translate(chullcpy, d);
return sl::isInside<RawShape>(chullcpy, bin);
}
PackResult trypack(Item& item) {