Allow to specify meander initial side via meander settings.
This commit is contained in:
parent
ce8849f8bc
commit
455268f45e
|
@ -71,6 +71,7 @@ public:
|
|||
m_cornerStyle = MEANDER_STYLE_ROUND;
|
||||
m_cornerRadiusPercentage = 100;
|
||||
m_singleSided = false;
|
||||
m_segmentSide = 0;
|
||||
m_lengthTolerance = 100000;
|
||||
}
|
||||
|
||||
|
@ -101,6 +102,9 @@ public:
|
|||
///< Place meanders on one side.
|
||||
bool m_singleSided;
|
||||
|
||||
///< Force initial side at segment (0: based on cursor, 1: right side, -1: left side)
|
||||
int m_segmentSide;
|
||||
|
||||
///< Allowable tuning error.
|
||||
int m_lengthTolerance;
|
||||
|
||||
|
|
|
@ -138,9 +138,16 @@ bool MEANDER_PLACER::doMove( const VECTOR2I& aP, ITEM* aEndItem, long long int a
|
|||
continue;
|
||||
}
|
||||
|
||||
bool side = false;
|
||||
const SEG s = tuned.CSegment( i );
|
||||
|
||||
if( m_settings.m_segmentSide == 0 )
|
||||
side = s.Side( aP ) < 0;
|
||||
else
|
||||
side = m_settings.m_segmentSide < 0;
|
||||
|
||||
m_result.AddCorner( s.A );
|
||||
m_result.MeanderSegment( s, s.Side( aP ) < 0 );
|
||||
m_result.MeanderSegment( s, side );
|
||||
m_result.AddCorner( s.B );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue