kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #14103
Re: Push-and-shove router issues with blind vias [PATCH]
Updated patch attached.
Fixes the following two bugs in the PNS router:
1) Shoved micro/blind/buried vias are silently converted to normal vias
2) Collision detection avoids micro/blind/buried vias regardless of
whether they cross the layer that the current track is on
Known bugs not addressed by this patch:
3) The "insert blind via" key does nothing in GAL mode
This patch is functionally equivalent to my previously submitted
microvia-shove-v2.patch but fixes a few code-formatting issues.
On Tue, 2014-07-22 at 14:28 -0400, Andrew Zonenberg wrote:
> See attached patch. Should fully support both blind/buried and micro
> vias.
>
> Are you saying you're going to add support for the "insert blind via"
> and "insert microvia" keys in the interactive router? That would be
> awesome :D
>
> Also GAL currently doesn't seem to make any visual distinction between
> standard, micro, and blind vias. Maybe this can be fixed too?
>
> On Tue, 2014-07-22 at 20:17 +0200, Tomasz Wlostowski wrote:
> > On 22.07.2014 20:12, Andrew Zonenberg wrote:
> > > The current code in the repo would silently convert all vias to standard
> > > through-hole vias, my code makes it behave properly for blind/buried
> > > vias. With some additional modifications it could support microvias too
> > > but I haven't implemented that.
> > >
> >
> > Hi Andrew,
> >
> > You could add the type of the via taken from Kicad's model to PNS_VIA
> > and update syncVia/commitRouting accordingly. I'll do the menus/shortcuts.
> >
> > Tom.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
--
Andrew Zonenberg
PhD student, security group
Computer Science Department
Rensselaer Polytechnic Institute
http://colossus.cs.rpi.edu/~azonenberg/
=== modified file 'pcbnew/router/pns_router.cpp'
--- pcbnew/router/pns_router.cpp 2014-07-09 14:57:01 +0000
+++ pcbnew/router/pns_router.cpp 2014-07-24 14:55:12 +0000
@@ -227,12 +227,15 @@
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 @@
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->SetLayerPair( ToLAYER_ID( via->Layers().Start() ),
+ ToLAYER_ID( via->Layers().End() ) );
+ via_board->SetViaType(via->ViaType());
newBI = via_board;
break;
}
=== modified file 'pcbnew/router/pns_via.cpp'
--- pcbnew/router/pns_via.cpp 2014-05-16 11:37:31 +0000
+++ pcbnew/router/pns_via.cpp 2014-07-24 14:43:42 +0000
@@ -91,6 +91,7 @@
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;
}
=== modified file 'pcbnew/router/pns_via.h'
--- pcbnew/router/pns_via.h 2014-05-29 11:48:14 +0000
+++ pcbnew/router/pns_via.h 2014-07-24 14:46:14 +0000
@@ -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 @@
{}
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 @@
m_diameter = aDiameter;
m_drill = aDrill;
m_shape = SHAPE_CIRCLE( aPos, aDiameter / 2 );
+ m_viaType = aViaType;
}
@@ -60,6 +63,7 @@
m_rank = aB.m_rank;
m_owner = aB.m_owner;
m_drill = aB.m_drill;
+ m_viaType = aB.m_viaType;
}
const VECTOR2I& Pos() const
@@ -72,6 +76,16 @@
m_pos = aPos;
m_shape.SetCenter( aPos );
}
+
+ VIATYPE_T ViaType() const
+ {
+ return m_viaType;
+ }
+
+ void SetViaType(VIATYPE_T aViaType)
+ {
+ m_viaType = aViaType;
+ }
int Diameter() const
{
@@ -124,6 +138,7 @@
int m_drill;
VECTOR2I m_pos;
SHAPE_CIRCLE m_shape;
+ VIATYPE_T m_viaType;
};
#endif
Attachment:
signature.asc
Description: This is a digitally signed message part
References