37 static const int DefaultIterationLimit = 50;
43 m_iterationLimit( DefaultIterationLimit )
45 m_forceSingleDirection =
false;
46 m_forceLongerPath =
false;
47 m_forceWinding =
false;
48 m_cursorApproachMode =
false;
49 m_itemMask = ITEM::ANY_T;
52 m_recursiveBlockageCount = 0;
53 m_recursiveCollision[0] = m_recursiveCollision[1] =
false;
56 m_forceUniqueWindingDirection =
false;
61 enum WALKAROUND_STATUS
71 RESULT( WALKAROUND_STATUS aStatusCw = STUCK, WALKAROUND_STATUS aStatusCcw = STUCK,
const LINE& aLineCw =
LINE(),
const LINE& aLineCcw =
LINE() )
74 statusCcw = aStatusCcw;
79 WALKAROUND_STATUS statusCw, statusCcw;
83 void SetWorld(
NODE* aNode )
88 void SetIterationLimit(
const int aIterLimit )
90 m_iterationLimit = aIterLimit;
93 void SetSolidsOnly(
bool aSolidsOnly )
96 m_itemMask = ITEM::SOLID_T;
98 m_itemMask = ITEM::ANY_T;
101 void SetItemMask(
int aMask )
106 void SetSingleDirection(
bool aForceSingleDirection )
108 m_forceSingleDirection = aForceSingleDirection;
109 m_forceLongerPath = aForceSingleDirection;
112 void SetSingleDirection2(
bool aForceSingleDirection )
114 m_forceSingleDirection = aForceSingleDirection;
117 void SetApproachCursor(
bool aEnabled,
const VECTOR2I& aPos )
120 m_cursorApproachMode = aEnabled;
123 void SetForceWinding (
bool aEnabled,
bool aCw )
126 m_forceWinding = aEnabled;
129 void RestrictToSet(
bool aEnabled,
const std::set<ITEM*>& aSet )
132 m_restrictedSet = aSet;
134 m_restrictedSet.clear();
137 WALKAROUND_STATUS Route(
const LINE& aInitialPath, LINE& aWalkPath,
138 bool aOptimize =
true );
140 const RESULT Route(
const LINE& aInitialPath );
143 void start(
const LINE& aInitialPath );
145 WALKAROUND_STATUS singleStep( LINE& aPath,
bool aWindingDirection );
146 NODE::OPT_OBSTACLE nearestObstacle(
const LINE& aPath );
150 int m_recursiveBlockageCount;
152 int m_iterationLimit;
154 bool m_forceSingleDirection, m_forceLongerPath;
155 bool m_cursorApproachMode;
158 bool m_forceUniqueWindingDirection;
160 NODE::OPT_OBSTACLE m_currentObstacle[2];
161 bool m_recursiveCollision[2];
162 std::set<ITEM*> m_restrictedSet;
Base class for all P&S algorithms (shoving, walkaround, line placement, dragging, etc....
Definition pns_algo_base.h:43
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Definition pns_line.h:61