KiCad PCB EDA Suite
zones_polygons_insulated_copper_islands.cpp
Go to the documentation of this file.
1 
4 /*
5  * This program source code file is part of KiCad, a free EDA CAD application.
6  *
7  * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
8  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, you may find one here:
22  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
23  * or you may search the http://www.gnu.org website for the version 2 license,
24  * or you may write to the Free Software Foundation, Inc.,
25  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
26  */
27 
28 #include <class_board.h>
29 #include <class_zone.h>
30 #include <connectivity.h>
31 
33 {
34  std::vector<int> islands;
35 
36  auto connectivity = aPcb->GetConnectivity();
37 
38  connectivity->FindIsolatedCopperIslands( this, islands );
39 
40  std::sort( islands.begin(), islands.end(), std::greater<int>() );
41 
42  for( auto idx : islands )
43  {
45  }
46 
47  connectivity->Update( this );
48 }
Class BOARD to handle a board.
Classes to handle copper zones.
void DeletePolygon(int aIdx)
Deletes aIdx-th polygon from the set
void TestForCopperIslandAndRemoveInsulatedIslands(BOARD *aPcb)
Function TestForCopperIslandAndRemoveInsulatedIslands Remove insulated copper islands found in m_Fill...
SHAPE_POLY_SET m_FilledPolysList
Definition: class_zone.h:786
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:169
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:290