Polishing autoplacement feature for testing

This commit is contained in:
tamasmeszaros 2019-01-23 13:12:44 +01:00
parent f129a92405
commit 4e8c570d52
3 changed files with 66 additions and 45 deletions

View file

@ -911,12 +911,13 @@ private:
if(config_.object_function) _objfunc = config_.object_function;
else {
// Inside check has to be strict if no alignment was enabled.
// Inside check has to be strict if no alignment was enabled
std::function<double(const Box&)> ins_check;
if(config_.alignment == Config::Alignment::DONT_ALIGN)
ins_check = [&binbb, norm](const Box& fullbb) {
double ret = 0;
if(sl::isInside<RawShape>(fullbb, binbb)) ret += norm;
if(sl::isInside<RawShape>(fullbb, binbb))
ret += norm*norm;
return ret;
};
else