KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drc_interactive_courtyard_clearance.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2004-2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25
26#ifndef DRC_INTERACTIVE_COURTYARD_CLEARANCE_H
27#define DRC_INTERACTIVE_COURTYARD_CLEARANCE_H
28
30
31
33{
34public:
35 DRC_INTERACTIVE_COURTYARD_CLEARANCE( const std::shared_ptr<DRC_ENGINE>& aDRCEngine ) :
38 {
39 m_isRuleDriven = false;
40 SetDRCEngine( aDRCEngine.get() );
41 }
42
44 {
45 }
46
47 void Init( BOARD* aBoard );
48
49 virtual bool Run() override;
50
51 virtual const wxString GetName() const override
52 {
53 return wxT( "interactive_courtyard_clearance" );
54 }
55
56 virtual const wxString GetDescription() const override
57 {
58 return wxT( "Tests footprints' courtyard collisions" );
59 }
60
61 void UpdateConflicts( KIGFX::VIEW* aView, bool aHighlightMoved );
62 void ClearConflicts( KIGFX::VIEW* aView );
63
64public:
65 std::vector<FOOTPRINT*> m_FpInMove; // The list of moved footprints
66
67private:
69
70private:
72
73 std::set<BOARD_ITEM*> m_itemsInConflict; // The list of items in conflict
74 std::vector<BOARD_ITEM*> m_lastItemsInConflict; // The list of items last highlighted
75};
76
77#endif // DRC_INTERACTIVE_COURTYARD_CLEARANCE_H
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:281
virtual bool Run() override
Run this provider against the given PCB with configured options (if any).
virtual const wxString GetDescription() const override
virtual const wxString GetName() const override
void UpdateConflicts(KIGFX::VIEW *aView, bool aHighlightMoved)
DRC_INTERACTIVE_COURTYARD_CLEARANCE(const std::shared_ptr< DRC_ENGINE > &aDRCEngine)
void SetDRCEngine(DRC_ENGINE *engine)
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:68