Horizon
|
Perform various optimizations of the lines being routed, attempting to make the lines shorter and less cornery. More...
#include <pns_optimizer.h>
Classes | |
struct | CACHE_VISITOR |
Public Types | |
enum | OptimizationEffort { MERGE_SEGMENTS = 0x01 , SMART_PADS = 0x02 , MERGE_OBTUSE = 0x04 , FANOUT_CLEANUP = 0x08 , KEEP_TOPOLOGY = 0x10 , PRESERVE_VERTEX = 0x20 , RESTRICT_VERTEX_RANGE = 0x40 , MERGE_COLINEAR = 0x80 , RESTRICT_AREA = 0x100 , LIMIT_CORNER_COUNT = 0x200 } |
Public Member Functions | |
OPTIMIZER (NODE *aWorld) | |
~OPTIMIZER () | |
A quick shortcut to optimize a line without creating and setting up an optimizer. | |
bool | Optimize (LINE *aLine, LINE *aResult=nullptr, LINE *aRoot=nullptr) |
bool | Optimize (DIFF_PAIR *aPair) |
void | SetWorld (NODE *aNode) |
void | CacheRemove (ITEM *aItem) |
void | ClearCache (bool aStaticOnly=false) |
void | SetCollisionMask (int aMask) |
void | SetEffortLevel (int aEffort) |
void | SetPreserveVertex (const VECTOR2I &aV) |
void | SetRestrictVertexRange (int aStart, int aEnd) |
void | SetRestrictArea (const BOX2I &aArea, bool aStrict=true) |
void | ClearConstraints () |
void | AddConstraint (OPT_CONSTRAINT *aConstraint) |
Static Public Member Functions | |
static bool | Optimize (LINE *aLine, int aEffortLevel, NODE *aWorld, const VECTOR2I &aV=VECTOR2I(0, 0)) |
Perform various optimizations of the lines being routed, attempting to make the lines shorter and less cornery.
There are 3 kinds of optimizations so far: