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-2018 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
5  * Copyright (C) 1992-2018 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 
34 #include <zones.h>
35 #include <wx/dataview.h>
36 
38 {
39  ZFM_POLYGONS = 0, // fill zone with polygons
40  ZFM_HATCH_PATTERN = 1 // fill zone using a grid pattern
41 };
42 
50 {
51 public:
52  enum {
58  };
59 
61 
63 
72 
75 
77 
79 
82 
85 
87 
88 private:
90  unsigned int m_cornerRadius;
92 
93  /* A zone outline can be a keepout zone.
94  * It will be never filled, and DRC should test for pads, tracks and vias
95  */
97 
98  /* For keepout zones only:
99  * what is not allowed inside the keepout ( pads, tracks and vias )
100  */
104 
105 
106 public:
107  ZONE_SETTINGS();
108 
115  ZONE_SETTINGS& operator << ( const ZONE_CONTAINER& aSource );
116 
124  void SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME* aFrame,
125  bool aShowCopper, bool aFpEditorMode = false );
126 
136  void ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport = true ) const;
137 
138  void SetCornerSmoothingType( int aType) { m_cornerSmoothingType = aType; }
139 
141 
142  void SetCornerRadius( int aRadius );
143 
144  unsigned int GetCornerRadius() const { return m_cornerRadius; }
145 
147  void SetPadConnection( ZoneConnection aPadConnection ) { m_PadConnection = aPadConnection; }
148 
152  const bool GetIsKeepout() const { return m_isKeepout; }
154  const bool GetDoNotAllowVias() const { return m_keepoutDoNotAllowVias; }
155  const bool GetDoNotAllowTracks() const { return m_keepoutDoNotAllowTracks; }
156 
157  void SetIsKeepout( bool aEnable ) { m_isKeepout = aEnable; }
158  void SetDoNotAllowCopperPour( bool aEnable ) { m_keepoutDoNotAllowCopperPour = aEnable; }
159  void SetDoNotAllowVias( bool aEnable ) { m_keepoutDoNotAllowVias = aEnable; }
160  void SetDoNotAllowTracks( bool aEnable ) { m_keepoutDoNotAllowTracks = aEnable; }
161 };
162 
163 
164 #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:81
Class ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:60
void SetCornerSmoothingType(int aType)
long m_ThermalReliefCopperBridge
thickness of the copper bridge in thermal reliefs
Definition: zone_settings.h:84
int m_HatchFillTypeSmoothingLevel
Grid pattern smoothing type, similar to corner smoothing type.
Definition: zone_settings.h:69
double m_HatchFillTypeOrientation
Grid style shape: orientation of grid lines in degrees.
Definition: zone_settings.h:68
ZoneConnection
How pads are covered by copper in zone.
Definition: zones.h:50
int GetCornerSmoothingType() const
int m_HatchFillTypeGap
Grid style shape: clearance between lines (0 -> solid shape)
Definition: zone_settings.h:67
unsigned int GetCornerRadius() const
void SetDoNotAllowVias(bool aEnable)
int m_NetcodeSelection
Net code selection for the current zone.
Definition: zone_settings.h:74
ZoneConnection m_PadConnection
Definition: zone_settings.h:91
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:89
int m_ZonePriority
Priority (0 ... N) of the zone.
Definition: zone_settings.h:62
int m_ZoneClearance
Clearance value.
Definition: zone_settings.h:64
void SetIsKeepout(bool aEnable)
const bool GetDoNotAllowVias() const
const bool GetIsKeepout() const
Accessors to parameters used in Keepout zones:
void SetDoNotAllowTracks(bool aEnable)
ZoneConnection GetPadConnection() const
void ExportSetting(ZONE_CONTAINER &aTarget, bool aFullExport=true) const
Function ExportSetting copy settings to a given zone.
const bool GetDoNotAllowTracks() const
Class ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:49
ZONE_SETTINGS()
class ZONE_SETTINGS used to handle zones parameters
ZONE_FILL_MODE m_FillMode
Definition: zone_settings.h:60
Board layer functions and definitions.
bool m_keepoutDoNotAllowCopperPour
void SetCornerRadius(int aRadius)
const bool GetDoNotAllowCopperPour() const
double m_HatchFillTypeSmoothingValue
Grid pattern chamfer distance/fillet value.
Definition: zone_settings.h:71
void SetPadConnection(ZoneConnection aPadConnection)
void SetDoNotAllowCopperPour(bool aEnable)
void SetupLayersList(wxDataViewListCtrl *aList, PCB_BASE_FRAME *aFrame, bool aShowCopper, bool aFpEditorMode=false)
A helper routine for the various zone dialogs (copper, non-copper, keepout).
bool m_keepoutDoNotAllowTracks
unsigned int m_cornerRadius
Corner chamfer distance / fillet radius.
Definition: zone_settings.h:90
int m_HatchFillTypeThickness
Grid style shape: thickness of lines (if 0 -> solid shape)
Definition: zone_settings.h:66
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:37
PCB_LAYER_ID m_CurrentZone_Layer
Layer used to create the current zone.
Definition: zone_settings.h:78
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:83
int m_ZoneMinThickness
Min thickness value in filled areas.
Definition: zone_settings.h:65
bool m_keepoutDoNotAllowVias