Improving for layout debug mode.
--HG-- branch : release
This commit is contained in:
parent
1f74e30d39
commit
6b8cb0bf69
|
@ -48,16 +48,20 @@ enum class BestFrom : char
|
|||
|
||||
//#define LAYOUT_DEBUG // Enable debug mode
|
||||
|
||||
// This block help rule debug mode. Don't turn all options at the same time!
|
||||
#ifdef LAYOUT_DEBUG
|
||||
// Nice looking
|
||||
# define SHOW_VERTICES // Show contour vertices
|
||||
# define SHOW_DIRECTION // Show contour direction
|
||||
# define ARRANGED_DETAILS // Show already arranged details
|
||||
//# define SHOW_CANDIDATE
|
||||
//# define SHOW_ROTATION
|
||||
//# define SHOW_COMBINE
|
||||
//# define SHOW_MIRROR
|
||||
//# define SHOW_CANDIDATE_BEST
|
||||
//# define SHOW_BEST
|
||||
|
||||
// Debugging
|
||||
# define SHOW_CANDIDATE // Show each position
|
||||
# define SHOW_ROTATION // For each position show rotation part
|
||||
# define SHOW_COMBINE // For each position show edge combine part
|
||||
# define SHOW_MIRROR // For each position show mirror part
|
||||
//# define SHOW_CANDIDATE_BEST // For only correct positions that pass checks
|
||||
//# define SHOW_BEST // Show only best position for workpiece
|
||||
#endif//LAYOUT_DEBUG
|
||||
|
||||
#endif // VLAYOUTDEF_H
|
||||
|
|
|
@ -147,10 +147,10 @@ void VPosition::DrawDebug(const VContour &contour, const VLayoutDetail &detail,
|
|||
QPainter paint;
|
||||
paint.begin(&frameImage);
|
||||
|
||||
paint.setPen(QPen(Qt::darkRed, 10, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
|
||||
paint.setPen(QPen(Qt::darkRed, 15, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
|
||||
paint.drawRect(QRectF(contour.GetWidth()/2, contour.GetHeight()/2, contour.GetWidth(), contour.GetHeight()));
|
||||
|
||||
paint.setPen(QPen(Qt::black, 3, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
|
||||
paint.setPen(QPen(Qt::black, 6, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
|
||||
QPainterPath p;
|
||||
if (contour.GetContour().isEmpty())
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ void VPosition::DrawDebug(const VContour &contour, const VLayoutDetail &detail,
|
|||
}
|
||||
|
||||
#ifdef SHOW_CANDIDATE
|
||||
paint.setPen(QPen(Qt::darkGreen, 3, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
|
||||
paint.setPen(QPen(Qt::darkGreen, 6, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
|
||||
p = DrawContour(detail.GetLayoutAllowencePoints());
|
||||
p.translate(contour.GetWidth()/2, contour.GetHeight()/2);
|
||||
paint.drawPath(p);
|
||||
|
@ -176,7 +176,7 @@ void VPosition::DrawDebug(const VContour &contour, const VLayoutDetail &detail,
|
|||
#endif
|
||||
|
||||
#ifdef ARRANGED_DETAILS
|
||||
paint.setPen(QPen(Qt::blue, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
|
||||
paint.setPen(QPen(Qt::blue, 2, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
|
||||
p = DrawDetails(details);
|
||||
p.translate(contour.GetWidth()/2, contour.GetHeight()/2);
|
||||
paint.drawPath(p);
|
||||
|
|
Loading…
Reference in New Issue
Block a user