Commit 10f1040b authored by CHARRAS's avatar CHARRAS

Solved problem in fill zone calculations when using buried or blind vias (like micro vias)

parent cd213a05
...@@ -5,6 +5,12 @@ Started 2007-June-11 ...@@ -5,6 +5,12 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2008-Mar-3 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
Solved problem in fill zone calculations when using buried or blind vias (like micro vias)
2008-Feb-18 UPDATE Igor Plyatov <plyatov@mail.ru> 2008-Feb-18 UPDATE Igor Plyatov <plyatov@mail.ru>
================================================================================ ================================================================================
+common +common
......
...@@ -288,7 +288,7 @@ void PlaceCells( BOARD* Pcb, int net_code, int flag ) ...@@ -288,7 +288,7 @@ void PlaceCells( BOARD* Pcb, int net_code, int flag )
dx = PtText->Pitch() * PtText->GetLength(); dx = PtText->Pitch() * PtText->GetLength();
dy = PtText->m_Size.y + PtText->m_Width; dy = PtText->m_Size.y + PtText->m_Width;
/* Calcul du rectangle d'encadrement */ /* Put bounding box (rectangle) on matrix */
dx /= 2; dy /= 2; /* dx et dy = demi dimensionx X et Y */ dx /= 2; dy /= 2; /* dx et dy = demi dimensionx X et Y */
ux1 = ux0 + dx; uy1 = uy0 + dy; ux1 = ux0 + dx; uy1 = uy0 + dy;
ux0 -= dx; uy0 -= dy; ux0 -= dx; uy0 -= dy;
...@@ -309,17 +309,18 @@ void PlaceCells( BOARD* Pcb, int net_code, int flag ) ...@@ -309,17 +309,18 @@ void PlaceCells( BOARD* Pcb, int net_code, int flag )
} }
} }
/* Placement des PISTES */ /* Put tracks and vias on matrix */
pt_segm = Pcb->m_Track; pt_segm = Pcb->m_Track;
for( ; pt_segm != NULL; pt_segm = (TRACK*) pt_segm->Pnext ) for( ; pt_segm != NULL; pt_segm = (TRACK*) pt_segm->Pnext )
{ {
if( net_code == pt_segm->GetNet() ) if( net_code == pt_segm->GetNet() )
continue; continue;
TraceSegmentPcb( Pcb, pt_segm, HOLE, marge, WRITE_CELL ); TraceSegmentPcb( Pcb, pt_segm, HOLE, marge, WRITE_CELL );
TraceSegmentPcb( Pcb, pt_segm, VIA_IMPOSSIBLE, via_marge, WRITE_OR_CELL ); TraceSegmentPcb( Pcb, pt_segm, VIA_IMPOSSIBLE, via_marge, WRITE_OR_CELL );
} }
/* Placement des ZONES */ /* Put zone filling on matrix */
pt_segm = (TRACK*) Pcb->m_Zone; pt_segm = (TRACK*) Pcb->m_Zone;
for( ; pt_segm != NULL; pt_segm = (TRACK*) pt_segm->Pnext ) for( ; pt_segm != NULL; pt_segm = (TRACK*) pt_segm->Pnext )
{ {
......
...@@ -251,7 +251,6 @@ void TraceSegmentPcb( BOARD* Pcb, TRACK* pt_segm, int color, int marge, int op_l ...@@ -251,7 +251,6 @@ void TraceSegmentPcb( BOARD* Pcb, TRACK* pt_segm, int color, int marge, int op_l
{ {
int demi_pas, demi_largeur; int demi_pas, demi_largeur;
int ux0, uy0, ux1, uy1; int ux0, uy0, ux1, uy1;
int layer = pt_segm->GetLayer();
demi_pas = g_GridRoutingSize / 2; demi_pas = g_GridRoutingSize / 2;
...@@ -262,17 +261,32 @@ void TraceSegmentPcb( BOARD* Pcb, TRACK* pt_segm, int color, int marge, int op_l ...@@ -262,17 +261,32 @@ void TraceSegmentPcb( BOARD* Pcb, TRACK* pt_segm, int color, int marge, int op_l
ux1 = pt_segm->m_End.x - Pcb->m_BoundaryBox.m_Pos.x; ux1 = pt_segm->m_End.x - Pcb->m_BoundaryBox.m_Pos.x;
uy1 = pt_segm->m_End.y - Pcb->m_BoundaryBox.m_Pos.y; uy1 = pt_segm->m_End.y - Pcb->m_BoundaryBox.m_Pos.y;
if( color == VIA_IMPOSSIBLE )
layer = -1;
/* Test si VIA (cercle plein a tracer) */ /* Test si VIA (cercle plein a tracer) */
if( pt_segm->Type() == TYPEVIA ) if( pt_segm->Type() == TYPEVIA )
{ {
int mask_layer = 0;
if ( pt_segm->IsOnLayer(Route_Layer_BOTTOM) )
mask_layer = 1 << Route_Layer_BOTTOM;
if ( pt_segm->IsOnLayer(Route_Layer_TOP) )
{
if ( mask_layer == 0 )
mask_layer = 1 << Route_Layer_TOP;
else mask_layer = -1;
}
if( color == VIA_IMPOSSIBLE )
mask_layer = -1;
if ( mask_layer )
TraceFilledCercle( Pcb, pt_segm->m_Start.x, pt_segm->m_Start.y, demi_largeur, TraceFilledCercle( Pcb, pt_segm->m_Start.x, pt_segm->m_Start.y, demi_largeur,
0x0000FFFF, color, op_logique ); mask_layer, color, op_logique );
return; return;
} }
int layer = pt_segm->GetLayer();
if( color == VIA_IMPOSSIBLE )
layer = -1;
/* Le segment est ici un segment de droite ou un cercle ou un arc: */ /* Le segment est ici un segment de droite ou un cercle ou un arc: */
if( pt_segm->m_Shape == S_CIRCLE ) if( pt_segm->m_Shape == S_CIRCLE )
{ {
......
...@@ -116,9 +116,7 @@ OBJECTS= $(TARGET).o classpcb.o\ ...@@ -116,9 +116,7 @@ OBJECTS= $(TARGET).o classpcb.o\
modedit.o\ modedit.o\
export_gencad.o\ export_gencad.o\
hotkeys.o \ hotkeys.o \
collectors.o \ collectors.o
set_color.o
PolyLine.o: ../polygon/PolyLine.cpp ../polygon/PolyLine.h $(COMMON) PolyLine.o: ../polygon/PolyLine.cpp ../polygon/PolyLine.h $(COMMON)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment