KiCad PCB EDA Suite
zone_settings.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) 2008-2014 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
5  * Copyright (C) 1992-2012 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 
30 #ifndef ZONE_SETTINGS_H_
31 #define ZONE_SETTINGS_H_
32 
33 #include <zones.h>
34 #include <wx/dataview.h>
35 
37 {
38  ZFM_POLYGONS = 0, // fill zone with polygons
39  ZFM_SEGMENTS = 1 // fill zone with segments (legacy)
40 };
41 
49 {
50 public:
51  enum {
57  };
58 
60 
62 
66 
68 
70 
73 
76 
79 
81 
82 private:
84  unsigned int m_cornerRadius;
86 
87  /* A zone outline can be a keepout zone.
88  * It will be never filled, and DRC should test for pads, tracks and vias
89  */
91 
92  /* For keepout zones only:
93  * what is not allowed inside the keepout ( pads, tracks and vias )
94  */
98 
99 
100 public:
101  ZONE_SETTINGS();
102 
109  ZONE_SETTINGS& operator << ( const ZONE_CONTAINER& aSource );
110 
115  void SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME* aFrame, bool aShowCopper );
116 
126  void ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport = true ) const;
127 
128  void SetCornerSmoothingType( int aType) { m_cornerSmoothingType = aType; }
129 
131 
132  void SetCornerRadius( int aRadius );
133 
134  unsigned int GetCornerRadius() const { return m_cornerRadius; }
135 
137  void SetPadConnection( ZoneConnection aPadConnection ) { m_PadConnection = aPadConnection; }
138 
142  const bool GetIsKeepout() const { return m_isKeepout; }
144  const bool GetDoNotAllowVias() const { return m_keepoutDoNotAllowVias; }
145  const bool GetDoNotAllowTracks() const { return m_keepoutDoNotAllowTracks; }
146 
147  void SetIsKeepout( bool aEnable ) { m_isKeepout = aEnable; }
148  void SetDoNotAllowCopperPour( bool aEnable ) { m_keepoutDoNotAllowCopperPour = aEnable; }
149  void SetDoNotAllowVias( bool aEnable ) { m_keepoutDoNotAllowVias = aEnable; }
150  void SetDoNotAllowTracks( bool aEnable ) { m_keepoutDoNotAllowTracks = aEnable; }
151 };
152 
153 
154 #endif // ZONE_SETTINGS_H_
int m_Zone_HatchingStyle
Option to show the zone area (outlines only, short hatches or full hatches.
Definition: zone_settings.h:72
Class ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:60
int m_ArcToSegmentsCount
Option to select number of segments to approximate a circle 16 or 32 segments.
Definition: zone_settings.h:75
const bool GetDoNotAllowTracks() const
void SetCornerSmoothingType(int aType)
long m_ThermalReliefCopperBridge
thickness of the copper bridge in thermal reliefs
Definition: zone_settings.h:78
ZoneConnection
How pads are covered by copper in zone.
Definition: zones.h:50
const bool GetDoNotAllowCopperPour() const
unsigned int GetCornerRadius() const
ZoneConnection GetPadConnection() const
void SetupLayersList(wxDataViewListCtrl *aList, PCB_BASE_FRAME *aFrame, bool aShowCopper)
A helper routine for the various zone dialogs (copper, non-copper, keepout).
void ExportSetting(ZONE_CONTAINER &aTarget, bool aFullExport=true) const
Function ExportSetting copy settings to a given zone.
void SetDoNotAllowVias(bool aEnable)
int m_NetcodeSelection
Net code selection for the current zone.
Definition: zone_settings.h:65
ZoneConnection m_PadConnection
Definition: zone_settings.h:85
int GetCornerSmoothingType() const
PCB_LAYER_ID
A quick note on layer IDs:
Class LSET is a set of PCB_LAYER_IDs.
int m_cornerSmoothingType
Corner smoothing type.
Definition: zone_settings.h:83
const bool GetIsKeepout() const
Accessors to parameters used in Keepout zones:
int m_ZonePriority
Priority (0 ... N) of the zone.
Definition: zone_settings.h:61
int m_ZoneClearance
Clearance value.
Definition: zone_settings.h:63
void SetIsKeepout(bool aEnable)
void SetDoNotAllowTracks(bool aEnable)
Class ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:48
ZONE_SETTINGS()
class ZONE_SETTINGS used to handle zones parameters
ZONE_FILL_MODE m_FillMode
Definition: zone_settings.h:59
bool m_keepoutDoNotAllowCopperPour
Definition: zone_settings.h:95
void SetCornerRadius(int aRadius)
void SetPadConnection(ZoneConnection aPadConnection)
const bool GetDoNotAllowVias() const
void SetDoNotAllowCopperPour(bool aEnable)
bool m_keepoutDoNotAllowTracks
Definition: zone_settings.h:97
unsigned int m_cornerRadius
Corner chamfer distance / fillet radius.
Definition: zone_settings.h:84
ZONE_SETTINGS & operator<<(const ZONE_CONTAINER &aSource)
operator << ( const ZONE_CONTAINER& ) was Function ImportSetting copies settings from a given zone in...
ZONE_FILL_MODE
Definition: zone_settings.h:36
PCB_LAYER_ID m_CurrentZone_Layer
Layer used to create the current zone.
Definition: zone_settings.h:69
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...
long m_ThermalReliefGap
thickness of the gap in thermal reliefs
Definition: zone_settings.h:77
int m_ZoneMinThickness
Min thickness value in filled areas.
Definition: zone_settings.h:64
bool m_keepoutDoNotAllowVias
Definition: zone_settings.h:96