KiCad PCB EDA Suite
pns_component_dragger.h
Go to the documentation of this file.
1 /*
2  * KiRouter - a push-and-(sometimes-)shove PCB router
3  *
4  * Copyright (C) 2013-2020 CERN
5  * Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
6  *
7  * This program is free software: you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __PNS_COMPONENT_DRAGGER_H
22 #define __PNS_COMPONENT_DRAGGER_H
23 
24 #include <math/vector2d.h>
25 
26 #include "pns_drag_algo.h"
27 
28 namespace PNS
29 {
30 class ROUTER;
31 class OPTIMIZER;
32 
39 {
40 public:
41  COMPONENT_DRAGGER( ROUTER* aRouter );
43 
44 
51  bool Start( const VECTOR2I& aP, ITEM_SET& aPrimitives ) override;
52 
59  bool Drag( const VECTOR2I& aP ) override;
60 
68  bool FixRoute() override;
69 
76  NODE* CurrentNode() const override;
77 
84  const std::vector<int> CurrentNets() const override
85  {
86  return std::vector<int>();
87  }
88 
95  virtual int CurrentLayer() const override
96  {
97  return UNDEFINED_LAYER;
98  }
99 
105  const ITEM_SET Traces() override;
106 
107 private:
109  {
114  };
115 
116  std::set<SOLID*> m_solids;
117  std::vector<DRAGGED_CONNECTION> m_conns;
118 
124 };
125 
126 }; // namespace PNS
127 
128 #endif
COMPONENT_DRAGGER(ROUTER *aRouter)
const std::vector< int > CurrentNets() const override
Function CurrentNets()
Keep the router "world" - i.e.
Definition: pns_node.h:145
NODE * CurrentNode() const override
Function CurrentNode()
DRAG_ALGO.
Definition: pns_drag_algo.h:42
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Definition: pns_line.h:60
bool Start(const VECTOR2I &aP, ITEM_SET &aPrimitives) override
Function Start()
std::set< SOLID * > m_solids
bool Drag(const VECTOR2I &aP) override
Function Drag()
std::vector< DRAGGED_CONNECTION > m_conns
virtual int CurrentLayer() const override
Function CurrentLayer()
const ITEM_SET Traces() override
Function Traces()
Push and Shove diff pair dimensions (gap) settings dialog.
bool FixRoute() override
Function FixRoute()