Don't start with MEANDER_SIDE_DEFAULT.
It means we get a different default for left-to-right-drawn than we do when going the other way. Also fixes bug in PNS::DP_MEANDER_PLACER so that it honours side specified in settings.
This commit is contained in:
parent
2450250ae7
commit
ccc20348bf
|
@ -1226,7 +1226,7 @@ bool PCB_GENERATOR_MEANDERS::UpdateEditPoints( std::shared_ptr<EDIT_POINTS> aEdi
|
||||||
|
|
||||||
aEditPoints->Point( 2 ).SetPosition( base.A + widthHandleOffset );
|
aEditPoints->Point( 2 ).SetPosition( base.A + widthHandleOffset );
|
||||||
|
|
||||||
VECTOR2I spacingHandleOffset = widthHandleOffset
|
VECTOR2I spacingHandleOffset = widthHandleOffset
|
||||||
+ ( base.B - base.A ).Resize( KiROUND( m_spacing * 1.5 ) );
|
+ ( base.B - base.A ).Resize( KiROUND( m_spacing * 1.5 ) );
|
||||||
|
|
||||||
aEditPoints->Point( 3 ).SetPosition( base.A + spacingHandleOffset );
|
aEditPoints->Point( 3 ).SetPosition( base.A + spacingHandleOffset );
|
||||||
|
|
|
@ -413,7 +413,7 @@ std::shared_ptr<SHAPE_SEGMENT> PAD::GetEffectiveHoleShape() const
|
||||||
|
|
||||||
int PAD::GetBoundingRadius() const
|
int PAD::GetBoundingRadius() const
|
||||||
{
|
{
|
||||||
if( m_polyDirty )
|
if( m_polyDirty[ ERROR_OUTSIDE ] )
|
||||||
BuildEffectivePolygon( ERROR_OUTSIDE );
|
BuildEffectivePolygon( ERROR_OUTSIDE );
|
||||||
|
|
||||||
return m_effectiveBoundingRadius;
|
return m_effectiveBoundingRadius;
|
||||||
|
|
|
@ -246,7 +246,13 @@ bool DP_MEANDER_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
|
||||||
|
|
||||||
for( const DIFF_PAIR::COUPLED_SEGMENTS& sp : coupledSegments )
|
for( const DIFF_PAIR::COUPLED_SEGMENTS& sp : coupledSegments )
|
||||||
{
|
{
|
||||||
SEG base = baselineSegment( sp );
|
SEG base = baselineSegment( sp );
|
||||||
|
bool side = false;
|
||||||
|
|
||||||
|
if( m_settings.m_segmentSide == 0 )
|
||||||
|
side = base.Side( aP ) < 0;
|
||||||
|
else
|
||||||
|
side = m_settings.m_segmentSide < 0;
|
||||||
|
|
||||||
PNS_DBG( Dbg(), AddShape, base, GREEN, 10000, wxT( "dp-baseline" ) );
|
PNS_DBG( Dbg(), AddShape, base, GREEN, 10000, wxT( "dp-baseline" ) );
|
||||||
|
|
||||||
|
@ -282,7 +288,7 @@ bool DP_MEANDER_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
|
||||||
curIndexN = tunedN.NextShape( curIndexN );
|
curIndexN = tunedN.NextShape( curIndexN );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_result.MeanderSegment( base, base.Side( aP ) < 0 );
|
m_result.MeanderSegment( base, side );
|
||||||
}
|
}
|
||||||
|
|
||||||
while( curIndexP < tunedP.PointCount() && curIndexP != -1 )
|
while( curIndexP < tunedP.PointCount() && curIndexP != -1 )
|
||||||
|
|
|
@ -80,7 +80,7 @@ public:
|
||||||
m_cornerStyle = MEANDER_STYLE_ROUND;
|
m_cornerStyle = MEANDER_STYLE_ROUND;
|
||||||
m_cornerRadiusPercentage = 100;
|
m_cornerRadiusPercentage = 100;
|
||||||
m_singleSided = false;
|
m_singleSided = false;
|
||||||
m_segmentSide = MEANDER_SIDE_DEFAULT;
|
m_segmentSide = MEANDER_SIDE_LEFT;
|
||||||
m_lengthTolerance = 100000;
|
m_lengthTolerance = 100000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue