router: temporaily disable upper corner count limit constraint in the OPTIMIZER which prevents almost any optimization of shoved lines
This commit is contained in:
parent
e80bdf934a
commit
165b5257e8
|
@ -274,9 +274,12 @@ bool CORNER_COUNT_LIMIT_CONSTRAINT::Check( int aVertex1, int aVertex2, const LIN
|
||||||
newPath.Line().Simplify();
|
newPath.Line().Simplify();
|
||||||
int cc = newPath.CountCorners( m_angleMask );
|
int cc = newPath.CountCorners( m_angleMask );
|
||||||
|
|
||||||
if( cc >= m_minCorners && cc <= m_maxCorners )
|
if( cc >= m_minCorners )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// fixme: something fishy with the max corneriness limit
|
||||||
|
// (cc <= m_maxCorners)
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -626,6 +629,10 @@ bool OPTIMIZER::Optimize( LINE* aLine, LINE* aResult, LINE* aRoot )
|
||||||
int rootObtuseCorners = aRoot->CountCorners( angleMask );
|
int rootObtuseCorners = aRoot->CountCorners( angleMask );
|
||||||
auto c = new CORNER_COUNT_LIMIT_CONSTRAINT( m_world, rootObtuseCorners,
|
auto c = new CORNER_COUNT_LIMIT_CONSTRAINT( m_world, rootObtuseCorners,
|
||||||
aLine->SegmentCount(), angleMask );
|
aLine->SegmentCount(), angleMask );
|
||||||
|
PNS_DBG( dbg, Message,
|
||||||
|
wxString::Format( "opt limit-corner-count root %d maxc %d mask %x",
|
||||||
|
rootObtuseCorners, aLine->SegmentCount(), angleMask ) );
|
||||||
|
|
||||||
AddConstraint( c );
|
AddConstraint( c );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,6 +652,8 @@ bool OPTIMIZER::Optimize( LINE* aLine, LINE* aResult, LINE* aRoot )
|
||||||
if( m_effortLevel & RESTRICT_AREA )
|
if( m_effortLevel & RESTRICT_AREA )
|
||||||
{
|
{
|
||||||
auto c = new AREA_CONSTRAINT( m_world, m_restrictArea, m_restrictAreaIsStrict );
|
auto c = new AREA_CONSTRAINT( m_world, m_restrictArea, m_restrictAreaIsStrict );
|
||||||
|
SHAPE_RECT r( m_restrictArea );
|
||||||
|
PNS_DBG( dbg, AddShape, &r, YELLOW, 0, wxT( "area-constraint" ) );
|
||||||
AddConstraint( c );
|
AddConstraint( c );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue