Push-and-shove router now handles existing blind/buried vias properly. Can't yet create new ones.
This commit is contained in:
parent
8c1dd1392e
commit
e6fba84e13
|
@ -227,12 +227,15 @@ PNS_ITEM* PNS_ROUTER::syncTrack( TRACK* aTrack )
|
|||
|
||||
PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia )
|
||||
{
|
||||
LAYER_ID top, bottom;
|
||||
aVia->LayerPair(&top, &bottom);
|
||||
PNS_VIA* v = new PNS_VIA(
|
||||
aVia->GetPosition(),
|
||||
PNS_LAYERSET( 0, MAX_CU_LAYERS - 1 ),
|
||||
PNS_LAYERSET( top, bottom ),
|
||||
aVia->GetWidth(),
|
||||
aVia->GetDrillValue(),
|
||||
aVia->GetNetCode() );
|
||||
aVia->GetNetCode(),
|
||||
aVia->GetViaType() );
|
||||
|
||||
v->SetParent( aVia );
|
||||
|
||||
|
@ -759,8 +762,9 @@ void PNS_ROUTER::CommitRouting( PNS_NODE* aNode )
|
|||
via_board->SetWidth( via->Diameter() );
|
||||
via_board->SetDrill( via->Drill() );
|
||||
via_board->SetNetCode( via->Net() );
|
||||
via_board->SetLayerPair( ToLAYER_ID( m_settings.GetLayerTop() ),
|
||||
ToLAYER_ID( m_settings.GetLayerBottom() ) );
|
||||
via_board->SetViaType(via->ViaType()); //MUST be before SetLayerPair()
|
||||
via_board->SetLayerPair( ToLAYER_ID( via->Layers().Start() ),
|
||||
ToLAYER_ID( via->Layers().End() ) );
|
||||
newBI = via_board;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -91,6 +91,7 @@ PNS_VIA* PNS_VIA::Clone ( ) const
|
|||
v->m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 );
|
||||
v->m_rank = m_rank;
|
||||
v->m_marker = m_marker;
|
||||
v->m_viaType = m_viaType;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <geometry/shape_line_chain.h>
|
||||
#include <geometry/shape_circle.h>
|
||||
|
||||
#include "../class_track.h"
|
||||
|
||||
#include "pns_item.h"
|
||||
|
||||
class PNS_NODE;
|
||||
|
@ -36,7 +38,7 @@ public:
|
|||
{}
|
||||
|
||||
PNS_VIA( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers,
|
||||
int aDiameter, int aDrill, int aNet = -1 ) :
|
||||
int aDiameter, int aDrill, int aNet = -1, VIATYPE_T aViaType = VIA_THROUGH ) :
|
||||
PNS_ITEM( VIA )
|
||||
{
|
||||
SetNet( aNet );
|
||||
|
@ -45,6 +47,7 @@ public:
|
|||
m_diameter = aDiameter;
|
||||
m_drill = aDrill;
|
||||
m_shape = SHAPE_CIRCLE( aPos, aDiameter / 2 );
|
||||
m_viaType = aViaType;
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,6 +63,7 @@ public:
|
|||
m_rank = aB.m_rank;
|
||||
m_owner = aB.m_owner;
|
||||
m_drill = aB.m_drill;
|
||||
m_viaType = aB.m_viaType;
|
||||
}
|
||||
|
||||
const VECTOR2I& Pos() const
|
||||
|
@ -73,6 +77,16 @@ public:
|
|||
m_shape.SetCenter( aPos );
|
||||
}
|
||||
|
||||
VIATYPE_T ViaType() const
|
||||
{
|
||||
return m_viaType;
|
||||
}
|
||||
|
||||
void SetViaType(VIATYPE_T aViaType)
|
||||
{
|
||||
m_viaType = aViaType;
|
||||
}
|
||||
|
||||
int Diameter() const
|
||||
{
|
||||
return m_diameter;
|
||||
|
@ -124,6 +138,7 @@ private:
|
|||
int m_drill;
|
||||
VECTOR2I m_pos;
|
||||
SHAPE_CIRCLE m_shape;
|
||||
VIATYPE_T m_viaType;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue