22#ifndef __PNS_DRAGGER_H
23#define __PNS_DRAGGER_H
26#include <math/vector2d.h>
31#include "pns_drag_algo.h"
32#include "pns_itemset.h"
33#include "pns_layerset.h"
34#include "pns_mouse_trail_tracer.h"
47class DRAGGER :
public DRAG_ALGO
50 DRAGGER(
ROUTER* aRouter );
59 virtual bool Start(
const VECTOR2I& aP,
ITEM_SET& aPrimitives )
override;
67 bool Drag(
const VECTOR2I& aP )
override;
93 return std::vector<int>( 1, m_draggedLine.Net() );
103 return m_draggedLine.Layer();
113 void SetMode(
int aDragMode )
override;
118 bool dragMarkObstacles(
const VECTOR2I& aP );
119 bool dragShove(
const VECTOR2I& aP );
120 bool dragWalkaround(
const VECTOR2I& aP );
121 bool startDragSegment(
const VECTOR2D& aP,
SEGMENT* aSeg );
122 bool startDragArc(
const VECTOR2D& aP,
ARC* aArc );
123 bool startDragVia(
VIA* aVia );
124 bool dragViaMarkObstacles(
const VIA_HANDLE& aHandle,
NODE* aNode,
const VECTOR2I& aP );
125 bool dragViaWalkaround(
const VIA_HANDLE& aHandle,
NODE* aNode,
const VECTOR2I& aP );
126 void optimizeAndUpdateDraggedLine(
LINE& aDragged,
const LINE& aOrig,
const VECTOR2I& aP );
127 bool propagateViaForces(
NODE* node, std::set<VIA*>& vias );
128 bool tryWalkaround(
NODE* aNode,
LINE& aOrig,
LINE& aWalk );
129 VVIA* checkVirtualVia(
const VECTOR2D& aP,
SEGMENT* aSeg );
138 LINE m_lastDragSolution;
139 std::unique_ptr<SHOVE> m_shove;
140 int m_draggedSegmentIndex;
142 PNS_MODE m_currentMode;
144 VECTOR2D m_lastValidPoint;
150 bool m_freeAngleMode;
virtual bool Start(const VECTOR2I &aP, ITEM_SET &aPrimitives) override
Function Start().
Definition pns_dragger.cpp:207
NODE * CurrentNode() const override
Function CurrentNode().
Definition pns_dragger.cpp:745
bool Drag(const VECTOR2I &aP) override
Function Drag().
Definition pns_dragger.cpp:717
int CurrentLayer() const override
Function CurrentLayer().
Definition pns_dragger.h:101
bool FixRoute() override
Function FixRoute().
Definition pns_dragger.cpp:688
const std::vector< int > CurrentNets() const override
Function CurrentNets().
Definition pns_dragger.h:91
const ITEM_SET Traces() override
Function Traces().
Definition pns_dragger.cpp:751
Definition pns_itemset.h:37
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Definition pns_line.h:61
Definition pns_mouse_trail_tracer.h:32
Keep the router "world" - i.e.
Definition pns_node.h:148
Perform various optimizations of the lines being routed, attempting to make the lines shorter and les...
Definition pns_optimizer.h:95
Definition pns_router.h:116
Definition pns_segment.h:39
The actual Push and Shove algorithm.
Definition pns_shove.h:46