91 typedef std::vector<SHAPE_LINE_CHAIN>
HULL_SET;
125 const LINE& aShovedLine )
const;
149 NODE *aNode =
nullptr );
std::optional< BOX2I > OPT_BOX2I
Base class for all P&S algorithms (shoving, walkaround, line placement, dragging, etc....
Base class for PNS router board items.
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Keep the router "world" - i.e.
The actual Push and Shove algorithm.
void SetSpringbackDoNotTouchNode(const NODE *aNode)
SHOVE_STATUS shoveIteration(int aIter)
SHOVE_STATUS shoveMainLoop()
std::vector< SHAPE_LINE_CHAIN > HULL_SET
std::pair< LINE, LINE > LINE_PAIR
std::vector< LINE > m_lineStack
LINE * findRootLine(LINE *aLine)
std::vector< SPRINGBACK_TAG > m_nodeStack
SHOVE_STATUS onCollidingArc(LINE &aCurrent, ARC *aObstacleArc)
SHOVE_STATUS ShoveObstacleLine(const LINE &aCurLine, const LINE &aObstacleLine, LINE &aResultLine)
LINE assembleLine(const LINKED_ITEM *aSeg, int *aIndex=nullptr)
std::optional< LINE > OPT_LINE
void ForceClearance(bool aEnabled, int aClearance)
void SetInitialLine(LINE &aInitial)
bool checkShoveDirection(const LINE &aCurLine, const LINE &aObstacleLine, const LINE &aShovedLine) const
SHOVE_STATUS pushOrShoveVia(VIA *aVia, const VECTOR2I &aForce, int aCurrentRank)
SHOVE_STATUS onCollidingSegment(LINE &aCurrent, SEGMENT *aObstacleSeg)
void DisablePostShoveOptimizations(int aMask)
SHOVE_STATUS ShoveLines(const LINE &aCurrentHead)
bool RewindSpringbackTo(NODE *aNode)
bool pushLineStack(const LINE &aL, bool aKeepCurrentOnTop=false)
OPT_BOX2I totalAffectedArea() const
bool RewindToLastLockedNode()
void replaceLine(LINE &aOld, LINE &aNew, bool aIncludeInChangedArea=true, NODE *aNode=nullptr)
SHOVE_STATUS ShoveDraggingVia(const VIA_HANDLE aOldVia, const VECTOR2I &aWhere, VIA_HANDLE &aNewVia)
void sanityCheck(LINE *aOld, LINE *aNew)
int m_restrictSpringbackTagId
NODE * reduceSpringback(const ITEM_SET &aHeadSet, VIA_HANDLE &aDraggedVia)
void runOptimizer(NODE *aNode)
SHOVE_STATUS shoveLineToHullSet(const LINE &aCurLine, const LINE &aObstacleLine, LINE &aResultLine, const HULL_SET &aHulls)
bool pushSpringback(NODE *aNode, const OPT_BOX2I &aAffectedArea, VIA *aDraggedVia)
SHOVE_STATUS onCollidingLine(LINE &aCurrent, LINE &aObstacle)
void UnlockSpringbackNode(NODE *aNode)
bool AddLockedSpringbackNode(NODE *aNode)
void unwindLineStack(const LINKED_ITEM *aSeg)
SHOVE_STATUS shoveLineFromLoneVia(const LINE &aCurLine, const LINE &aObstacleLine, LINE &aResultLine)
int getClearance(const ITEM *aA, const ITEM *aB) const
SHOVE_STATUS onReverseCollidingVia(LINE &aCurrent, VIA *aObstacleVia)
std::vector< LINE > m_optimizerQueue
SHOVE_STATUS onCollidingSolid(LINE &aCurrent, ITEM *aObstacle, OBSTACLE &aObstacleInfo)
bool fixupViaCollisions(const LINE *aCurrent, OBSTACLE &obs)
void replaceItems(ITEM *aOld, std::unique_ptr< ITEM > aNew)
const NODE * m_springbackDoNotTouchNode
SHOVE_STATUS ShoveMultiLines(const ITEM_SET &aHeadSet)
std::unordered_map< const LINKED_ITEM *, LINE * > m_rootLineHistory
const LINE NewHead() const
std::vector< LINE_PAIR > LINE_PAIR_VEC
SHOVE_STATUS onCollidingVia(ITEM *aCurrent, VIA *aObstacleVia, OBSTACLE &aObstacleInfo)
Push and Shove diff pair dimensions (gap) settings dialog.
Hold an object colliding with another object, along with some useful data about the collision.