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 PNS::TOPOLOGY::AssembleDiffPair(), GRID_HELPER::BestDragOrigin(), MATRIX_ROUTING_HEAD::CalcDist(), PNS::SHOVE::checkBumpDirection(), DRC::checkClearancePadToPad(), PNS::checkGap(), Collect_TrackSegmentsToDrag(), CONNECTIONS::CollectItemsNearTo(), PNS::DIFF_PAIR::CoupledLength(), PNS::DIFF_PAIR::CoupledSegmentPairs(), PNS::findCoupledVertices(), PNS::DIFF_PAIR_PLACER::findDpPrimitivePair(), GERBER_PLOTTER::FlashPadTrapez(), GetClearanceBetweenSegments(), BOARD::GetFootprint(), LIB_CIRCLE::HitTest(), SCH_NO_CONNECT::HitTest(), DRAWSEGMENT::HitTest(), WS_DRAW_ITEM_RECT::HitTest(), VIA::HitTest(), D_PAD::HitTest(), WS_DRAW_ITEM_LINE::HitTestEndPoint(), WS_DRAW_ITEM_RECT::HitTestEndPoint(), CPolyLine::HitTestForCorner(), CPolyLine::HitTestForEdge(), WS_DRAW_ITEM_LINE::HitTestStartPoint(), WS_DRAW_ITEM_RECT::HitTestStartPoint(), WS_DRAW_ITEM_BITMAP::HitTestStartPoint(), TRACK::IsPointOnEnds(), kicad_arc_center(), SEG::LineDistance(), LocateIntrusion(), BOARD::MarkTrace(), PNS::MoveDiagonal(), GRID_HELPER::nearestAnchor(), PNS::NODE::NearestObstacle(), processEdge(), pushoutForce(), PushTrack(), CONNECTIONS::SearchConnectedTracks(), PNS::LINE::snapDraggedCorner(), SHAPE_LINE_CHAIN::Split(), TestForIntersectionOfStraightLineSegments(), TestSegmentHit(), DRC::testTexts(), and PNS::LINE::Walkaround().

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().