KiCad PCB EDA Suite
dist.cpp File Reference

Routines to calculate PCB editor auto routing distances. More...

#include <autorout.h>
#include <cell.h>

Go to the source code of this file.

Macros

#define PN   20
 

Variables

static const int dist [10][10]
 
static const int penalty [10][10]
 
static const int dir_penalty_TOP [10][10]
 
static int dir_penalty_BOTTOM [10][10]
 

Detailed Description

Routines to calculate PCB editor auto routing distances.

Definition in file dist.cpp.

Macro Definition Documentation

#define PN   20

Definition at line 91 of file dist.cpp.

Variable Documentation

int dir_penalty_BOTTOM[10][10]
static
Initial value:
=
{
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 },
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 },
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 },
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 },
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 },
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 },
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 },
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 },
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 },
{ 0, 0, PN, 0, 0, 0, PN, 0, 0, 0 }
}
#define PN
Definition: dist.cpp:91

Definition at line 109 of file dist.cpp.

Referenced by MATRIX_ROUTING_HEAD::CalcDist().

const int dir_penalty_TOP[10][10]
static
Initial value:
=
{
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 },
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 },
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 },
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 },
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 },
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 },
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 },
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 },
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 },
{ PN, 0, 0, 0, PN, 0, 0, 0, 0, 0 }
}
#define PN
Definition: dist.cpp:91

Definition at line 92 of file dist.cpp.

Referenced by MATRIX_ROUTING_HEAD::CalcDist().

const int dist[10][10]
static
Initial value:
=
{
{ 50, 60, 35, 60, 99, 60, 35, 60, 12, 12 },
{ 60, 71, 60, 71, 60, 99, 60, 71, 23, 23 },
{ 35, 60, 50, 60, 35, 60, 99, 60, 12, 12 },
{ 60, 71, 60, 71, 60, 71, 60, 99, 23, 23 },
{ 99, 60, 35, 60, 50, 60, 35, 60, 12, 12 },
{ 60, 99, 60, 71, 60, 71, 60, 71, 23, 23 },
{ 35, 60, 99, 60, 35, 60, 50, 60, 12, 12 },
{ 60, 71, 60, 99, 60, 71, 60, 71, 23, 23 },
{ 12, 23, 12, 23, 12, 23, 12, 23, 99, 99 },
{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 }
}

Definition at line 57 of file dist.cpp.

Referenced by MATRIX_ROUTING_HEAD::CalcDist().

const int penalty[10][10]
static
Initial value:
=
{
{ 0, 5, 10, 15, 20, 15, 10, 5, 50, 0 },
{ 5, 0, 5, 10, 15, 20, 15, 10, 50, 0 },
{ 10, 5, 0, 5, 10, 15, 20, 15, 50, 0 },
{ 15, 10, 5, 0, 5, 10, 15, 20, 50, 0 },
{ 20, 15, 10, 5, 0, 5, 10, 15, 50, 0 },
{ 15, 20, 15, 10, 5, 0, 5, 10, 50, 0 },
{ 10, 15, 20, 15, 10, 5, 0, 5, 50, 0 },
{ 5, 10, 15, 20, 15, 10, 5, 0, 50, 0 },
{ 50, 50, 50, 50, 50, 50, 50, 50, 100, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
}

Definition at line 74 of file dist.cpp.

Referenced by MATRIX_ROUTING_HEAD::CalcDist().