For rotation check only two positions 180 and 0 degree.

--HG--
branch : feature
This commit is contained in:
dismine 2015-01-22 13:26:09 +02:00
parent 9210d31c25
commit 2aa9de5f94
2 changed files with 3 additions and 4 deletions

View File

@ -158,7 +158,6 @@ bool VLayoutPaper::AddToSheet(const VLayoutDetail &detail, bool &stop)
{
VBestSquare bestResult;
QThreadPool *thread_pool = QThreadPool::globalInstance();
thread_pool->setMaxThreadCount(4);
QVector<VPosition *> threads;
for (int j=1; j <= d->globalContour.EdgesCount(); ++j)
@ -176,7 +175,7 @@ bool VLayoutPaper::AddToSheet(const VLayoutDetail &detail, bool &stop)
threads.append(thread);
thread_pool->start(thread);
d->frame = d->frame + 3 + 360/20*2;
d->frame = d->frame + 3 + 360/180*2;
}
}

View File

@ -61,7 +61,7 @@ void VPosition::run()
}
frame = frame + 3;
for (int angle = 0; angle <= 360; angle = angle+20)
for (int angle = 0; angle <= 360; angle = angle+180)
{
// We should use copy of the detail.
VLayoutDetail workDetail = detail;
@ -404,7 +404,7 @@ VPosition::InsideType VPosition::InsideContour(const VLayoutDetail &detail, cons
return InsideType::EdgeError;
}
if (details.isEmpty())
if (gContour.GetContour().isEmpty())
{
const QLineF globalEdge = gContour.GlobalEdge(1);
for(int i = 0; i < lPoints.count(); i++)