KiCad PCB EDA Suite
class_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 
35 
36 class ZONE_CONTAINER;
37 
38 
39 #define MAX_ZONE_CORNER_RADIUS_MILS 400
40 
41 
49 {
50 public:
51  enum {
56  };
57 
60 
62 
66 
68 
71 
74 
77 
79 
80 private:
82  unsigned int m_cornerRadius;
84 
85  /* A zone outline can be a keepout zone.
86  * It will be never filled, and DRC should test for pads, tracks and vias
87  */
89 
90  /* For keepout zones only:
91  * what is not allowed inside the keepout ( pads, tracks and vias )
92  */
96 
97 
98 public:
99  ZONE_SETTINGS();
100 
107  ZONE_SETTINGS& operator << ( const ZONE_CONTAINER& aSource );
108 
118  void ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport = true ) const;
119 
120  void SetCornerSmoothingType( int aType) { m_cornerSmoothingType = aType; }
121 
123 
124  void SetCornerRadius( int aRadius );
125 
126  unsigned int GetCornerRadius() const { return m_cornerRadius; }
127 
129  void SetPadConnection( ZoneConnection aPadConnection ) { m_PadConnection = aPadConnection; }
130 
134  const bool GetIsKeepout() const { return m_isKeepout; }
136  const bool GetDoNotAllowVias() const { return m_keepoutDoNotAllowVias; }
137  const bool GetDoNotAllowTracks() const { return m_keepoutDoNotAllowTracks; }
138 
139  void SetIsKeepout( bool aEnable ) { m_isKeepout = aEnable; }
140  void SetDoNotAllowCopperPour( bool aEnable ) { m_keepoutDoNotAllowCopperPour = aEnable; }
141  void SetDoNotAllowVias( bool aEnable ) { m_keepoutDoNotAllowVias = aEnable; }
142  void SetDoNotAllowTracks( bool aEnable ) { m_keepoutDoNotAllowTracks = aEnable; }
143 };
144 
145 
146 #endif // ZONE_SETTINGS_H_
int m_Zone_HatchingStyle
Option to show the zone area (outlines only, short hatches or full hatches.
Class ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:78
int m_ArcToSegmentsCount
Option to select number of segments to approximate a circle 16 or 32 segments.
const bool GetDoNotAllowTracks() const
void SetCornerSmoothingType(int aType)
long m_ThermalReliefCopperBridge
thickness of the copper bridge in thermal reliefs
ZoneConnection
How pads are covered by copper in zone.
Definition: zones.h:55
const bool GetDoNotAllowCopperPour() const
unsigned int GetCornerRadius() const
ZoneConnection GetPadConnection() const
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.
ZoneConnection m_PadConnection
int GetCornerSmoothingType() const
int m_cornerSmoothingType
Corner smoothing type.
const bool GetIsKeepout() const
Accessors to parameters used in Keepout zones:
int m_ZonePriority
Priority (0 ... N) of the zone.
int m_ZoneClearance
Clearance value.
void SetIsKeepout(bool aEnable)
void SetDoNotAllowTracks(bool aEnable)
Class ZONE_SETTINGS handles zones parameters.
ZONE_SETTINGS()
class ZONE_SETTINGS used to handle zones parameters
LAYER_ID
Enum LAYER_ID is the set of PCB layers.
bool m_keepoutDoNotAllowCopperPour
void SetCornerRadius(int aRadius)
LAYER_ID m_CurrentZone_Layer
Layer used to create the current zone.
void SetPadConnection(ZoneConnection aPadConnection)
int m_FillMode
Mode for filling zone : 1 use segments, 0 use polygons.
const bool GetDoNotAllowVias() const
void SetDoNotAllowCopperPour(bool aEnable)
unsigned int m_cornerRadius
Corner chamfer distance / fillet radius.
ZONE_SETTINGS & operator<<(const ZONE_CONTAINER &aSource)
operator << ( const ZONE_CONTAINER& ) was Function ImportSetting copies settings from a given zone in...
long m_ThermalReliefGap
thickness of the gap in thermal reliefs
int m_ZoneMinThickness
Min thickness value in filled areas.