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

COMPONENT_DRAGGER. More...

#include <pns_component_dragger.h>

Inheritance diagram for PNS::COMPONENT_DRAGGER:
PNS::DRAG_ALGO PNS::ALGO_BASE

Classes

struct  DRAGGED_CONNECTION
 

Public Member Functions

 COMPONENT_DRAGGER (ROUTER *aRouter)
 
 ~COMPONENT_DRAGGER ()
 
bool Start (const VECTOR2I &aP, ITEM_SET &aPrimitives) override
 Function Start()
 
bool Drag (const VECTOR2I &aP) override
 Function Drag()
 
bool FixRoute (bool aForceCommit) override
 Function FixRoute()
 
NODECurrentNode () const override
 Function CurrentNode()
 
const std::vector< NET_HANDLECurrentNets () const override
 Function CurrentNets()
 
virtual int CurrentLayer () const override
 Function CurrentLayer()
 
const ITEM_SET Traces () override
 Function Traces()
 
virtual PNS::DRAG_MODE Mode () const override
 
bool GetForceMarkObstaclesMode (bool *aDragStatus) const override
 
virtual void SetWorld (NODE *aWorld)
 Function SetWorld()
 
virtual void SetMode (PNS::DRAG_MODE aDragMode)
 
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

NODEm_world
 
DEBUG_DECORATORm_debugDecorator
 
ROUTERm_router
 
LOGGERm_logger
 

Private Attributes

std::set< SOLID * > m_solids
 
std::set< ITEM * > m_fixedItems
 
std::vector< DRAGGED_CONNECTIONm_conns
 
bool m_dragStatus
 
ITEM_SET m_draggedItems
 
ITEM_SET m_initialDraggedItems
 
NODEm_currentNode
 
VECTOR2I m_p0
 

Detailed Description

COMPONENT_DRAGGER.

Implements component dragging algorithm.

Definition at line 39 of file pns_component_dragger.h.

Constructor & Destructor Documentation

◆ COMPONENT_DRAGGER()

PNS::COMPONENT_DRAGGER::COMPONENT_DRAGGER ( ROUTER aRouter)

Definition at line 35 of file pns_component_dragger.cpp.

References m_currentNode, and m_dragStatus.

◆ ~COMPONENT_DRAGGER()

PNS::COMPONENT_DRAGGER::~COMPONENT_DRAGGER ( )

Definition at line 43 of file pns_component_dragger.cpp.

Member Function Documentation

◆ CurrentLayer()

virtual int PNS::COMPONENT_DRAGGER::CurrentLayer ( ) const
inlineoverridevirtual

Function CurrentLayer()

Returns the layer of currently dragged item(s). Currently unused for component dragging.

Implements PNS::DRAG_ALGO.

Definition at line 96 of file pns_component_dragger.h.

References UNDEFINED_LAYER.

◆ CurrentNets()

const std::vector< NET_HANDLE > PNS::COMPONENT_DRAGGER::CurrentNets ( ) const
inlineoverridevirtual

Function CurrentNets()

Returns the net(s) of currently dragged item(s). Currently unused for component dragging.

Implements PNS::DRAG_ALGO.

Definition at line 85 of file pns_component_dragger.h.

◆ CurrentNode()

NODE * PNS::COMPONENT_DRAGGER::CurrentNode ( ) const
overridevirtual

Function CurrentNode()

Returns the most recent world state, including all items changed due to dragging operation.

Implements PNS::DRAG_ALGO.

Definition at line 264 of file pns_component_dragger.cpp.

References m_currentNode, and PNS::DRAG_ALGO::m_world.

Referenced by FixRoute().

◆ Dbg()

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

◆ Drag()

◆ FixRoute()

bool PNS::COMPONENT_DRAGGER::FixRoute ( bool  aForceCommit)
overridevirtual

Function FixRoute()

Checks if the result of current dragging operation is correct and eventually commits it to the world.

Returns
true, if dragging finished with success.

Implements PNS::DRAG_ALGO.

Definition at line 247 of file pns_component_dragger.cpp.

References PNS::NODE::CheckColliding(), PNS::ROUTER::CommitRouting(), CurrentNode(), m_draggedItems, PNS::ALGO_BASE::Router(), and PNS::ALGO_BASE::Settings().

◆ GetForceMarkObstaclesMode()

bool PNS::COMPONENT_DRAGGER::GetForceMarkObstaclesMode ( bool *  aDragStatus) const
inlineoverridevirtual

Implements PNS::DRAG_ALGO.

Definition at line 113 of file pns_component_dragger.h.

References m_dragStatus.

◆ Logger()

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

◆ Mode()

virtual PNS::DRAG_MODE PNS::COMPONENT_DRAGGER::Mode ( ) const
inlineoverridevirtual

Implements PNS::DRAG_ALGO.

Definition at line 108 of file pns_component_dragger.h.

References PNS::DM_COMPONENT.

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

◆ SetLogger()

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

◆ SetMode()

virtual void PNS::DRAG_ALGO::SetMode ( PNS::DRAG_MODE  aDragMode)
inlinevirtualinherited

Reimplemented in PNS::DRAGGER.

Definition at line 119 of file pns_drag_algo.h.

◆ Settings()

◆ SetWorld()

virtual void PNS::DRAG_ALGO::SetWorld ( NODE aWorld)
inlinevirtualinherited

Function SetWorld()

Sets the board to work on.

Definition at line 61 of file pns_drag_algo.h.

References PNS::DRAG_ALGO::m_world.

◆ Start()

◆ Traces()

const ITEM_SET PNS::COMPONENT_DRAGGER::Traces ( )
overridevirtual

Function Traces()

Returns the set of dragged items.

Implements PNS::DRAG_ALGO.

Definition at line 270 of file pns_component_dragger.cpp.

References m_draggedItems.

◆ VisibleViewArea()

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

Member Data Documentation

◆ m_conns

std::vector<DRAGGED_CONNECTION> PNS::COMPONENT_DRAGGER::m_conns
private

Definition at line 130 of file pns_component_dragger.h.

Referenced by Drag(), and Start().

◆ m_currentNode

NODE* PNS::COMPONENT_DRAGGER::m_currentNode
private

Definition at line 135 of file pns_component_dragger.h.

Referenced by COMPONENT_DRAGGER(), CurrentNode(), Drag(), and Start().

◆ 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_draggedItems

ITEM_SET PNS::COMPONENT_DRAGGER::m_draggedItems
private

Definition at line 133 of file pns_component_dragger.h.

Referenced by Drag(), FixRoute(), and Traces().

◆ m_dragStatus

bool PNS::COMPONENT_DRAGGER::m_dragStatus
private

Definition at line 132 of file pns_component_dragger.h.

Referenced by COMPONENT_DRAGGER(), and GetForceMarkObstaclesMode().

◆ m_fixedItems

std::set<ITEM*> PNS::COMPONENT_DRAGGER::m_fixedItems
private

Definition at line 129 of file pns_component_dragger.h.

Referenced by Drag(), and Start().

◆ m_initialDraggedItems

ITEM_SET PNS::COMPONENT_DRAGGER::m_initialDraggedItems
private

Definition at line 134 of file pns_component_dragger.h.

Referenced by Drag(), and Start().

◆ 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_p0

VECTOR2I PNS::COMPONENT_DRAGGER::m_p0
private

Definition at line 136 of file pns_component_dragger.h.

Referenced by Drag(), and Start().

◆ m_router

◆ m_solids

std::set<SOLID*> PNS::COMPONENT_DRAGGER::m_solids
private

Definition at line 128 of file pns_component_dragger.h.

Referenced by Drag(), and Start().

◆ m_world


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