KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PNS::WALKAROUND Class Reference

#include <pns_walkaround.h>

Inheritance diagram for PNS::WALKAROUND:
PNS::ALGO_BASE

Classes

struct  RESULT
 

Public Types

enum  WALKAROUND_STATUS { IN_PROGRESS = 0 , ALMOST_DONE , DONE , STUCK }
 

Public Member Functions

 WALKAROUND (NODE *aWorld, ROUTER *aRouter)
 
 ~WALKAROUND ()
 
void SetWorld (NODE *aNode)
 
void SetIterationLimit (const int aIterLimit)
 
void SetSolidsOnly (bool aSolidsOnly)
 
void SetItemMask (int aMask)
 
void SetForceWinding (bool aEnabled, bool aCw)
 
void RestrictToSet (bool aEnabled, const std::set< ITEM * > &aSet)
 
WALKAROUND_STATUS Route (const LINE &aInitialPath, LINE &aWalkPath, bool aOptimize=true)
 
const RESULT Route (const LINE &aInitialPath)
 
void SetLengthLimit (bool aEnable)
 
ROUTERRouter () const
 Return current router settings.
 
ROUTING_SETTINGSSettings () const
 Return the logger object, allowing to dump geometry to a file.
 
virtual LOGGERLogger ()
 
void SetLogger (LOGGER *aLogger)
 
void SetDebugDecorator (DEBUG_DECORATOR *aDecorator)
 Assign a debug decorator allowing this algo to draw extra graphics for visual debugging.
 
DEBUG_DECORATORDbg () const
 
const BOX2IVisibleViewArea () const
 

Protected Attributes

DEBUG_DECORATORm_debugDecorator
 
ROUTERm_router
 
LOGGERm_logger
 

Private Member Functions

void start (const LINE &aInitialPath)
 
WALKAROUND_STATUS singleStep (LINE &aPath, bool aWindingDirection)
 
NODE::OPT_OBSTACLE nearestObstacle (const LINE &aPath)
 

Private Attributes

NODEm_world
 
int m_iteration
 
int m_iterationLimit
 
int m_itemMask
 
bool m_forceWinding
 
bool m_forceCw
 
VECTOR2I m_cursorPos
 
NODE::OPT_OBSTACLE m_currentObstacle [2]
 
std::set< ITEM * > m_restrictedSet
 
std::vector< VECTOR2Im_restrictedVertices
 
bool m_forceLongerPath
 
bool m_lengthLimitOn
 

Static Private Attributes

static const int DefaultIterationLimit = 50
 

Detailed Description

Definition at line 35 of file pns_walkaround.h.

Member Enumeration Documentation

◆ WALKAROUND_STATUS

Enumerator
IN_PROGRESS 
ALMOST_DONE 
DONE 
STUCK 

Definition at line 57 of file pns_walkaround.h.

Constructor & Destructor Documentation

◆ WALKAROUND()

PNS::WALKAROUND::WALKAROUND ( NODE aWorld,
ROUTER aRouter 
)
inline

◆ ~WALKAROUND()

PNS::WALKAROUND::~WALKAROUND ( )
inline

Definition at line 55 of file pns_walkaround.h.

Member Function Documentation

◆ Dbg()

DEBUG_DECORATOR * PNS::ALGO_BASE::Dbg ( ) const
inlineinherited

◆ Logger()

LOGGER * PNS::ALGO_BASE::Logger ( )
virtualinherited

◆ nearestObstacle()

◆ RestrictToSet()

void PNS::WALKAROUND::RestrictToSet ( bool  aEnabled,
const std::set< ITEM * > &  aSet 
)

Definition at line 67 of file pns_walkaround.cpp.

References m_restrictedSet, and m_restrictedVertices.

Referenced by PNS::SHOVE::onCollidingSolid().

◆ Route() [1/2]

◆ Route() [2/2]

◆ Router()

◆ SetDebugDecorator()

void PNS::ALGO_BASE::SetDebugDecorator ( DEBUG_DECORATOR aDecorator)
inlineinherited

Assign a debug decorator allowing this algo to draw extra graphics for visual debugging.

Definition at line 73 of file pns_algo_base.h.

References PNS::ALGO_BASE::m_debugDecorator.

Referenced by PNS::SHOVE::onCollidingSolid(), PNS::LINE_PLACER::rhWalkBase(), PNS::SHOVE::SHOVE(), and PNS::DRAGGER::tryWalkaround().

◆ SetForceWinding()

void PNS::WALKAROUND::SetForceWinding ( bool  aEnabled,
bool  aCw 
)
inline

Definition at line 102 of file pns_walkaround.h.

References m_forceCw, and m_forceWinding.

◆ SetItemMask()

void PNS::WALKAROUND::SetItemMask ( int  aMask)
inline

Definition at line 97 of file pns_walkaround.h.

References m_itemMask.

Referenced by PNS::LINE_PLACER::rhWalkBase().

◆ SetIterationLimit()

void PNS::WALKAROUND::SetIterationLimit ( const int  aIterLimit)
inline

◆ SetLengthLimit()

void PNS::WALKAROUND::SetLengthLimit ( bool  aEnable)
inline

Definition at line 115 of file pns_walkaround.h.

References m_lengthLimitOn.

◆ SetLogger()

void PNS::ALGO_BASE::SetLogger ( LOGGER aLogger)
inlineinherited

◆ SetSolidsOnly()

void PNS::WALKAROUND::SetSolidsOnly ( bool  aSolidsOnly)
inline

◆ Settings()

◆ SetWorld()

void PNS::WALKAROUND::SetWorld ( NODE aNode)
inline

Definition at line 79 of file pns_walkaround.h.

References m_world.

◆ singleStep()

◆ start()

void PNS::WALKAROUND::start ( const LINE aInitialPath)
private

Definition at line 35 of file pns_walkaround.cpp.

References m_iteration, and m_iterationLimit.

Referenced by Route().

◆ VisibleViewArea()

const BOX2I & PNS::ALGO_BASE::VisibleViewArea ( ) const
inherited

Member Data Documentation

◆ DefaultIterationLimit

const int PNS::WALKAROUND::DefaultIterationLimit = 50
staticprivate

Definition at line 37 of file pns_walkaround.h.

◆ m_currentObstacle

NODE::OPT_OBSTACLE PNS::WALKAROUND::m_currentObstacle[2]
private

Definition at line 134 of file pns_walkaround.h.

Referenced by Route(), and singleStep().

◆ m_cursorPos

VECTOR2I PNS::WALKAROUND::m_cursorPos
private

Definition at line 133 of file pns_walkaround.h.

◆ m_debugDecorator

DEBUG_DECORATOR* PNS::ALGO_BASE::m_debugDecorator
protectedinherited

Definition at line 86 of file pns_algo_base.h.

Referenced by PNS::ALGO_BASE::Dbg(), and PNS::ALGO_BASE::SetDebugDecorator().

◆ m_forceCw

bool PNS::WALKAROUND::m_forceCw
private

Definition at line 132 of file pns_walkaround.h.

Referenced by Route(), SetForceWinding(), and WALKAROUND().

◆ m_forceLongerPath

bool PNS::WALKAROUND::m_forceLongerPath
private

Definition at line 137 of file pns_walkaround.h.

Referenced by Route(), and WALKAROUND().

◆ m_forceWinding

bool PNS::WALKAROUND::m_forceWinding
private

Definition at line 131 of file pns_walkaround.h.

Referenced by Route(), SetForceWinding(), and WALKAROUND().

◆ m_itemMask

int PNS::WALKAROUND::m_itemMask
private

Definition at line 130 of file pns_walkaround.h.

Referenced by nearestObstacle(), Route(), SetItemMask(), SetSolidsOnly(), and WALKAROUND().

◆ m_iteration

int PNS::WALKAROUND::m_iteration
private

Definition at line 128 of file pns_walkaround.h.

Referenced by Route(), singleStep(), start(), and WALKAROUND().

◆ m_iterationLimit

int PNS::WALKAROUND::m_iterationLimit
private

Definition at line 129 of file pns_walkaround.h.

Referenced by Route(), SetIterationLimit(), and start().

◆ m_lengthLimitOn

bool PNS::WALKAROUND::m_lengthLimitOn
private

Definition at line 138 of file pns_walkaround.h.

Referenced by Route(), SetLengthLimit(), and WALKAROUND().

◆ m_logger

LOGGER* PNS::ALGO_BASE::m_logger
protectedinherited

Definition at line 88 of file pns_algo_base.h.

Referenced by PNS::ALGO_BASE::Logger(), and PNS::ALGO_BASE::SetLogger().

◆ m_restrictedSet

std::set<ITEM*> PNS::WALKAROUND::m_restrictedSet
private

Definition at line 135 of file pns_walkaround.h.

Referenced by nearestObstacle(), and RestrictToSet().

◆ m_restrictedVertices

std::vector<VECTOR2I> PNS::WALKAROUND::m_restrictedVertices
private

Definition at line 136 of file pns_walkaround.h.

Referenced by RestrictToSet().

◆ m_router

◆ m_world

NODE* PNS::WALKAROUND::m_world
private

Definition at line 126 of file pns_walkaround.h.

Referenced by nearestObstacle(), Route(), and SetWorld().


The documentation for this class was generated from the following files: