KiCad PCB EDA Suite
ar_matrix.cpp File Reference
#include "ar_matrix.h"
#include "ar_cell.h"
#include <common.h>
#include <math_for_graphics.h>
#include <trigo.h>
#include <class_drawsegment.h>
#include <class_pad.h>
#include <class_track.h>

Go to the source code of this file.

Macros

#define PN   20
 
#define OP_CELL(layer, dy, dx)
 

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]
 

Macro Definition Documentation

#define OP_CELL (   layer,
  dy,
  dx 
)
Value:
{ \
if( layer == UNDEFINED_LAYER ) \
{ \
WriteCell( dy, dx, AR_SIDE_BOTTOM, color ); \
if( m_RoutingLayersCount > 1 ) \
WriteCell( dy, dx, AR_SIDE_TOP, color ); \
} \
else \
{ \
if( layer == m_routeLayerBottom ) \
WriteCell( dy, dx, AR_SIDE_BOTTOM, color ); \
if( m_RoutingLayersCount > 1 ) \
if( layer == m_routeLayerTop ) \
WriteCell( dy, dx, AR_SIDE_TOP, color ); \
} \
}
#define AR_SIDE_BOTTOM
Definition: ar_matrix.h:43
if(dlg.ShowModal()==wxID_OK)
Definition: selcolor.cpp:76
#define AR_SIDE_TOP
Definition: ar_matrix.h:42
int color
Definition: DXF_plotter.cpp:62

Definition at line 436 of file ar_matrix.cpp.

Referenced by AR_MATRIX::drawSegmentQcq(), and AR_MATRIX::tracePcbLine().

#define PN   20

Definition at line 354 of file ar_matrix.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: ar_matrix.cpp:354

Definition at line 372 of file ar_matrix.cpp.

Referenced by AR_MATRIX::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: ar_matrix.cpp:354

Definition at line 355 of file ar_matrix.cpp.

Referenced by AR_MATRIX::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 320 of file ar_matrix.cpp.

Referenced by PNS::TOPOLOGY::AssembleDiffPair(), GRID_HELPER::BestDragOrigin(), D_PAD::boundingRadius(), AR_MATRIX::CalcDist(), PNS::SHOVE::checkBumpDirection(), POLY_GRID_PARTITION::checkClearance(), DRC::checkClearancePadToPad(), PNS::checkGap(), Collect_TrackSegmentsToDrag(), ConvertArcCenter(), PNS::DIFF_PAIR::CoupledLength(), PNS::DIFF_PAIR::CoupledSegmentPairs(), PNS::findCoupledVertices(), PNS::DIFF_PAIR_PLACER::findDpPrimitivePair(), GERBER_PLOTTER::FlashPadTrapez(), D_PAD::GetBestAnchorPosition(), 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(), SEG::LineDistance(), LocateIntrusion(), BOARD::MarkTrace(), PNS::MoveDiagonal(), GRID_HELPER::nearestAnchor(), PNS::NODE::NearestObstacle(), AR_AUTOPLACER::nearestPad(), DIALOG_COLOR_PICKER::onRGBMouseClick(), KIGFX::WX_VIEW_CONTROLS::onScroll(), PNS::TOOL_BASE::pickSingleItem(), processEdge(), pushoutForce(), PushTrack(), POLY_GRID_PARTITION::scanCell(), PNS::LINE::snapDraggedCorner(), SHAPE_LINE_CHAIN::Split(), TestForIntersectionOfStraightLineSegments(), 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 337 of file ar_matrix.cpp.

Referenced by AR_MATRIX::CalcDist().