From 2aa9de5f9486cd0116dce695366bb44f81c279b5 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 22 Jan 2015 13:26:09 +0200 Subject: [PATCH] For rotation check only two positions 180 and 0 degree. --HG-- branch : feature --- src/libs/vlayout/vlayoutpaper.cpp | 3 +-- src/libs/vlayout/vposition.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libs/vlayout/vlayoutpaper.cpp b/src/libs/vlayout/vlayoutpaper.cpp index 4d1651ee5..f4cc329ba 100644 --- a/src/libs/vlayout/vlayoutpaper.cpp +++ b/src/libs/vlayout/vlayoutpaper.cpp @@ -158,7 +158,6 @@ bool VLayoutPaper::AddToSheet(const VLayoutDetail &detail, bool &stop) { VBestSquare bestResult; QThreadPool *thread_pool = QThreadPool::globalInstance(); - thread_pool->setMaxThreadCount(4); QVector 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; } } diff --git a/src/libs/vlayout/vposition.cpp b/src/libs/vlayout/vposition.cpp index 8e0f309ec..b194640fc 100644 --- a/src/libs/vlayout/vposition.cpp +++ b/src/libs/vlayout/vposition.cpp @@ -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++)