KiCad PCB EDA Suite
ZONE_SETTINGS Class Reference

ZONE_SETTINGS handles zones parameters. More...

#include <zone_settings.h>

Public Types

enum  {
  SMOOTHING_UNDEFINED = -1 , SMOOTHING_NONE = 0 , SMOOTHING_CHAMFER , SMOOTHING_FILLET ,
  SMOOTHING_LAST
}
 

Public Member Functions

 ZONE_SETTINGS ()
 
ZONE_SETTINGSoperator<< (const ZONE &aSource)
 operator << ( const ZONE& ) was Function ImportSetting copies settings from a given zone into this object. More...
 
void SetupLayersList (wxDataViewListCtrl *aList, PCB_BASE_FRAME *aFrame, LSET aLayers, bool aFpEditorMode)
 A helper routine for the various zone dialogs (copper, non-copper, keepout). More...
 
void ExportSetting (ZONE &aTarget, bool aFullExport=true) const
 Function ExportSetting copy settings to a given zone. More...
 
void SetCornerSmoothingType (int aType)
 
int GetCornerSmoothingType () const
 
void SetCornerRadius (int aRadius)
 
unsigned int GetCornerRadius () const
 
ZONE_CONNECTION GetPadConnection () const
 
void SetPadConnection (ZONE_CONNECTION aPadConnection)
 
const bool GetIsRuleArea () const
 Accessors to parameters used in Rule Area zones: More...
 
const bool GetDoNotAllowCopperPour () const
 
const bool GetDoNotAllowVias () const
 
const bool GetDoNotAllowTracks () const
 
const bool GetDoNotAllowPads () const
 
const bool GetDoNotAllowFootprints () const
 
void SetIsRuleArea (bool aEnable)
 
void SetDoNotAllowCopperPour (bool aEnable)
 
void SetDoNotAllowVias (bool aEnable)
 
void SetDoNotAllowTracks (bool aEnable)
 
void SetDoNotAllowPads (bool aEnable)
 
void SetDoNotAllowFootprints (bool aEnable)
 
const ISLAND_REMOVAL_MODE GetIslandRemovalMode () const
 
void SetIslandRemovalMode (ISLAND_REMOVAL_MODE aRemove)
 
long long int GetMinIslandArea () const
 
void SetMinIslandArea (long long int aArea)
 

Public Attributes

unsigned m_ZonePriority
 
ZONE_FILL_MODE m_FillMode
 
int m_ZoneClearance
 
int m_ZoneMinThickness
 
int m_HatchThickness
 
int m_HatchGap
 
EDA_ANGLE m_HatchOrientation
 
int m_HatchSmoothingLevel
 
double m_HatchSmoothingValue
 
double m_HatchHoleMinArea
 
int m_HatchBorderAlgorithm
 
int m_NetcodeSelection
 
wxString m_Name
 
LSET m_Layers
 
ZONE_BORDER_DISPLAY_STYLE m_ZoneBorderDisplayStyle
 Option to show the zone area (outlines only, short hatches or full hatches. More...
 
int m_BorderHatchPitch
 
long m_ThermalReliefGap
 
long m_ThermalReliefSpokeWidth
 
bool m_Locked
 
TEARDROP_TYPE m_TeardropType
 

Private Attributes

int m_cornerSmoothingType
 
unsigned int m_cornerRadius
 
ZONE_CONNECTION m_padConnection
 
bool m_isRuleArea
 
bool m_keepoutDoNotAllowCopperPour
 
bool m_keepoutDoNotAllowVias
 
bool m_keepoutDoNotAllowTracks
 
bool m_keepoutDoNotAllowPads
 
bool m_keepoutDoNotAllowFootprints
 
ISLAND_REMOVAL_MODE m_removeIslands
 
long long int m_minIslandArea
 

Detailed Description

ZONE_SETTINGS handles zones parameters.

Because a zone can be on copper or non copper layers, and can be also a keepout area, some parameters are irrelevant depending on the type of zone

Definition at line 69 of file zone_settings.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SMOOTHING_UNDEFINED 
SMOOTHING_NONE 
SMOOTHING_CHAMFER 
SMOOTHING_FILLET 
SMOOTHING_LAST 

Definition at line 73 of file zone_settings.h.

73 {
75 SMOOTHING_NONE = 0, // Zone outline is used without change
76 SMOOTHING_CHAMFER, // Zone outline is used after chamfering corners
77 SMOOTHING_FILLET, // Zone outline is used after rounding corners
78 SMOOTHING_LAST // sentinel
79 };

Constructor & Destructor Documentation

◆ ZONE_SETTINGS()

ZONE_SETTINGS::ZONE_SETTINGS ( )

Definition at line 38 of file zone_settings.cpp.

39{
41 m_FillMode = ZONE_FILL_MODE::POLYGONS; // Mode for filling zone
42 // Zone clearance value
44 // Min thickness value in filled areas (this is the minimum width of copper to fill solid areas) :
46 m_HatchThickness = 0; // good value of grid line thickness for ZFM_GRID_PATTERN
47 m_HatchGap = 0; // good value of grid line gap for ZFM_GRID_PATTERN
48 m_HatchOrientation = ANGLE_0; // Grid style: orientation of grid lines
49 m_HatchSmoothingLevel = 0; // Grid pattern smoothing type. 0 = no smoothing
50 m_HatchSmoothingValue = 0.1; // Grid pattern chamfer value relative to the gap value
51 m_HatchHoleMinArea = 0.3; // Min size before holes are dropped (ratio of hole size)
52 m_HatchBorderAlgorithm = 1; // 0 = use zone min thickness; 1 = use hatch width
53 m_NetcodeSelection = 0; // Net code selection for the current zone
55 // outlines only, short
56 // hatches or full hatches
58
59 m_Layers.reset().set( F_Cu );
60 m_Name = wxEmptyString;
61
62 // thickness of the gap in thermal reliefs:
64 // thickness of the copper bridge in thermal reliefs:
66
67 m_padConnection = ZONE_CONNECTION::THERMAL; // How pads are covered by copper in zone
68
69 m_Locked = false;
70
73
76
77 SetIsRuleArea( false );
79 SetDoNotAllowVias( true );
80 SetDoNotAllowTracks( true );
81 SetDoNotAllowPads( true );
83
85}
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:109
void SetIsRuleArea(bool aEnable)
unsigned int m_cornerRadius
EDA_ANGLE m_HatchOrientation
Definition: zone_settings.h:88
int m_HatchBorderAlgorithm
Definition: zone_settings.h:93
void SetDoNotAllowVias(bool aEnable)
int m_NetcodeSelection
Definition: zone_settings.h:95
long long int m_minIslandArea
double m_HatchSmoothingValue
Definition: zone_settings.h:91
int m_cornerSmoothingType
void SetDoNotAllowTracks(bool aEnable)
ISLAND_REMOVAL_MODE m_removeIslands
double m_HatchHoleMinArea
Definition: zone_settings.h:92
int m_ZoneMinThickness
Definition: zone_settings.h:85
long m_ThermalReliefSpokeWidth
TEARDROP_TYPE m_TeardropType
unsigned m_ZonePriority
Definition: zone_settings.h:81
wxString m_Name
Definition: zone_settings.h:97
ZONE_FILL_MODE m_FillMode
Definition: zone_settings.h:83
ZONE_CONNECTION m_padConnection
long m_ThermalReliefGap
void SetDoNotAllowFootprints(bool aEnable)
void SetDoNotAllowPads(bool aEnable)
int m_HatchSmoothingLevel
Definition: zone_settings.h:89
ZONE_BORDER_DISPLAY_STYLE m_ZoneBorderDisplayStyle
Option to show the zone area (outlines only, short hatches or full hatches.
void SetDoNotAllowCopperPour(bool aEnable)
static constexpr EDA_ANGLE & ANGLE_0
Definition: eda_angle.h:412
@ F_Cu
Definition: layer_ids.h:64
constexpr int Mils2IU(const EDA_IU_SCALE &aIuScale, int mils)
Definition: eda_units.h:123
const double IU_PER_MM
Definition: base_units.h:77
@ THERMAL
Use thermal relief for pads.
#define ZONE_THICKNESS_MIL
Definition: zones.h:35
#define ZONE_THERMAL_RELIEF_GAP_MIL
Definition: zones.h:33
#define ZONE_BORDER_HATCH_DIST_MIL
Definition: zones.h:39
#define ZONE_THERMAL_RELIEF_COPPER_WIDTH_MIL
Definition: zones.h:34
#define ZONE_CLEARANCE_MIL
Definition: zones.h:37

References ANGLE_0, AREA, DIAGONAL_EDGE, F_Cu, EDA_IU_SCALE::IU_PER_MM, m_BorderHatchPitch, m_cornerRadius, m_cornerSmoothingType, m_FillMode, m_HatchBorderAlgorithm, m_HatchGap, m_HatchHoleMinArea, m_HatchOrientation, m_HatchSmoothingLevel, m_HatchSmoothingValue, m_HatchThickness, m_Layers, m_Locked, m_minIslandArea, m_Name, m_NetcodeSelection, m_padConnection, m_removeIslands, m_TeardropType, m_ThermalReliefGap, m_ThermalReliefSpokeWidth, m_ZoneBorderDisplayStyle, m_ZoneClearance, m_ZoneMinThickness, m_ZonePriority, EDA_UNIT_UTILS::Mils2IU(), pcbIUScale, POLYGONS, SetDoNotAllowCopperPour(), SetDoNotAllowFootprints(), SetDoNotAllowPads(), SetDoNotAllowTracks(), SetDoNotAllowVias(), SetIsRuleArea(), SMOOTHING_NONE, TD_NONE, THERMAL, ZONE_BORDER_HATCH_DIST_MIL, ZONE_CLEARANCE_MIL, ZONE_THERMAL_RELIEF_COPPER_WIDTH_MIL, ZONE_THERMAL_RELIEF_GAP_MIL, and ZONE_THICKNESS_MIL.

Member Function Documentation

◆ ExportSetting()

void ZONE_SETTINGS::ExportSetting ( ZONE aTarget,
bool  aFullExport = true 
) const

Function ExportSetting copy settings to a given zone.

Parameters
aTargetthe given zone
aFullExportif false: some parameters are NOT exported because they must not be exported when export settings from a zone to others zones Currently: m_NetcodeSelection

Definition at line 131 of file zone_settings.cpp.

132{
133 aTarget.SetFillMode( m_FillMode );
137 aTarget.SetHatchGap( m_HatchGap );
148 aTarget.SetIsRuleArea( GetIsRuleArea() );
154 aTarget.SetLocked( m_Locked );
157 // Currently, the teardrop area type is not imported from a ZONE_SETTINGS, because
158 // it is not really a ZONE_SETTINGS parameter, but a ZONE parameter only
159#if 0
161#endif
162
163
164 if( aFullExport )
165 {
167 aTarget.SetLayerSet( m_Layers );
168 aTarget.SetZoneName( m_Name );
169
170 if( !m_isRuleArea )
172 }
173
174 // call SetBorderDisplayStyle last, because hatch lines will be rebuilt,
175 // using new parameters values
177 m_BorderHatchPitch, true );
178}
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
virtual void SetLocked(bool aLocked)
Definition: board_item.h:254
const ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
const bool GetDoNotAllowCopperPour() const
const bool GetDoNotAllowFootprints() const
const bool GetDoNotAllowVias() const
const bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
const bool GetDoNotAllowTracks() const
long long int GetMinIslandArea() const
const bool GetDoNotAllowPads() const
void SetHatchThickness(int aThickness)
Definition: zone.h:261
void SetHatchBorderAlgorithm(int aAlgo)
Definition: zone.h:279
void SetDoNotAllowPads(bool aEnable)
Definition: zone.h:708
void SetCornerRadius(unsigned int aRadius)
Definition: zone.cpp:372
void SetCornerSmoothingType(int aType)
Definition: zone.h:646
void SetBorderDisplayStyle(ZONE_BORDER_DISPLAY_STYLE aBorderHatchStyle, int aBorderHatchPitch, bool aRebuilBorderdHatch)
Set all hatch parameters for the zone.
Definition: zone.cpp:817
void SetMinThickness(int aMinThickness)
Definition: zone.h:252
void SetHatchOrientation(const EDA_ANGLE &aStep)
Definition: zone.h:267
void SetHatchSmoothingValue(double aValue)
Definition: zone.h:273
void SetHatchSmoothingLevel(int aLevel)
Definition: zone.h:270
void SetDoNotAllowCopperPour(bool aEnable)
Definition: zone.h:705
void SetThermalReliefSpokeWidth(int aThermalReliefSpokeWidth)
Definition: zone.h:187
void SetIsRuleArea(bool aEnable)
Definition: zone.h:704
void SetDoNotAllowTracks(bool aEnable)
Definition: zone.h:707
void SetFillMode(ZONE_FILL_MODE aFillMode)
Definition: zone.h:173
void SetDoNotAllowVias(bool aEnable)
Definition: zone.h:706
void SetLocalClearance(int aClearance)
Definition: zone.h:153
void SetThermalReliefGap(int aThermalReliefGap)
Definition: zone.h:176
void SetLayerSet(LSET aLayerSet) override
Definition: zone.cpp:263
void SetDoNotAllowFootprints(bool aEnable)
Definition: zone.h:709
void SetHatchHoleMinArea(double aPct)
Definition: zone.h:276
void SetAssignedPriority(unsigned aPriority)
Definition: zone.h:107
void SetPadConnection(ZONE_CONNECTION aPadConnection)
Definition: zone.h:249
void SetZoneName(const wxString &aName)
Definition: zone.h:125
void SetTeardropAreaType(TEARDROP_TYPE aType)
Set the type of teardrop if the zone is a teardrop area for non teardrop area, the type must be TEARD...
Definition: zone.h:687
void SetIslandRemovalMode(ISLAND_REMOVAL_MODE aRemove)
Definition: zone.h:712
void SetMinIslandArea(long long int aArea)
Definition: zone.h:715
void SetHatchGap(int aStep)
Definition: zone.h:264

References GetDoNotAllowCopperPour(), GetDoNotAllowFootprints(), GetDoNotAllowPads(), GetDoNotAllowTracks(), GetDoNotAllowVias(), GetIslandRemovalMode(), GetIsRuleArea(), GetMinIslandArea(), m_BorderHatchPitch, m_cornerRadius, m_cornerSmoothingType, m_FillMode, m_HatchBorderAlgorithm, m_HatchGap, m_HatchHoleMinArea, m_HatchOrientation, m_HatchSmoothingLevel, m_HatchSmoothingValue, m_HatchThickness, m_isRuleArea, m_Layers, m_Locked, m_Name, m_NetcodeSelection, m_padConnection, m_TeardropType, m_ThermalReliefGap, m_ThermalReliefSpokeWidth, m_ZoneBorderDisplayStyle, m_ZoneClearance, m_ZoneMinThickness, m_ZonePriority, ZONE::SetAssignedPriority(), ZONE::SetBorderDisplayStyle(), ZONE::SetCornerRadius(), ZONE::SetCornerSmoothingType(), ZONE::SetDoNotAllowCopperPour(), ZONE::SetDoNotAllowFootprints(), ZONE::SetDoNotAllowPads(), ZONE::SetDoNotAllowTracks(), ZONE::SetDoNotAllowVias(), ZONE::SetFillMode(), ZONE::SetHatchBorderAlgorithm(), ZONE::SetHatchGap(), ZONE::SetHatchHoleMinArea(), ZONE::SetHatchOrientation(), ZONE::SetHatchSmoothingLevel(), ZONE::SetHatchSmoothingValue(), ZONE::SetHatchThickness(), ZONE::SetIslandRemovalMode(), ZONE::SetIsRuleArea(), ZONE::SetLayerSet(), ZONE::SetLocalClearance(), BOARD_ITEM::SetLocked(), ZONE::SetMinIslandArea(), ZONE::SetMinThickness(), BOARD_CONNECTED_ITEM::SetNetCode(), ZONE::SetPadConnection(), ZONE::SetTeardropAreaType(), ZONE::SetThermalReliefGap(), ZONE::SetThermalReliefSpokeWidth(), and ZONE::SetZoneName().

Referenced by ZONE_CREATE_HELPER::createNewZone(), CONVERT_TOOL::CreatePolys(), TEARDROP_MANAGER::createTeardrop(), ZONE_CREATE_HELPER::createZoneFromExisting(), PCB_EDIT_FRAME::Edit_Zone_Params(), DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), ZONE::ZONE(), and BOARD_EDITOR_CONTROL::ZoneDuplicate().

◆ GetCornerRadius()

unsigned int ZONE_SETTINGS::GetCornerRadius ( ) const
inline

◆ GetCornerSmoothingType()

◆ GetDoNotAllowCopperPour()

const bool ZONE_SETTINGS::GetDoNotAllowCopperPour ( ) const
inline

◆ GetDoNotAllowFootprints()

const bool ZONE_SETTINGS::GetDoNotAllowFootprints ( ) const
inline

◆ GetDoNotAllowPads()

const bool ZONE_SETTINGS::GetDoNotAllowPads ( ) const
inline

◆ GetDoNotAllowTracks()

const bool ZONE_SETTINGS::GetDoNotAllowTracks ( ) const
inline

◆ GetDoNotAllowVias()

const bool ZONE_SETTINGS::GetDoNotAllowVias ( ) const
inline

◆ GetIslandRemovalMode()

const ISLAND_REMOVAL_MODE ZONE_SETTINGS::GetIslandRemovalMode ( ) const
inline

◆ GetIsRuleArea()

const bool ZONE_SETTINGS::GetIsRuleArea ( ) const
inline

Accessors to parameters used in Rule Area zones:

Definition at line 178 of file zone_settings.h.

178{ return m_isRuleArea; }

References m_isRuleArea.

Referenced by ExportSetting().

◆ GetMinIslandArea()

long long int ZONE_SETTINGS::GetMinIslandArea ( ) const
inline

Definition at line 195 of file zone_settings.h.

195{ return m_minIslandArea; }

References m_minIslandArea.

Referenced by ExportSetting(), and DIALOG_COPPER_ZONE::TransferDataToWindow().

◆ GetPadConnection()

ZONE_CONNECTION ZONE_SETTINGS::GetPadConnection ( ) const
inline

Definition at line 172 of file zone_settings.h.

172{ return m_padConnection; }

References m_padConnection.

Referenced by DIALOG_COPPER_ZONE::TransferDataToWindow().

◆ operator<<()

ZONE_SETTINGS & ZONE_SETTINGS::operator<< ( const ZONE aSource)

operator << ( const ZONE& ) was Function ImportSetting copies settings from a given zone into this object.

Parameters
aSourcethe given zone

Definition at line 88 of file zone_settings.cpp.

89{
91 m_FillMode = aSource.GetFillMode();
95 m_HatchGap = aSource.GetHatchGap();
101 m_NetcodeSelection = aSource.GetNetCode();
102 m_Name = aSource.GetZoneName();
110 m_isRuleArea = aSource.GetIsRuleArea();
116 m_Locked = aSource.IsLocked();
119
120 // Currently, the teardrop area type is not really a ZONE_SETTINGS parameter,
121 // but a ZONE parameter only.
122 // However it can be used in dialogs
124
125 m_Layers = aSource.GetLayerSet();
126
127 return *this;
128}
virtual bool IsLocked() const
Definition: board_item.cpp:71
int GetHatchBorderAlgorithm() const
Definition: zone.h:278
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
Definition: zone.h:697
bool GetDoNotAllowVias() const
Definition: zone.h:699
const ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
Definition: zone.h:711
bool GetDoNotAllowPads() const
Definition: zone.h:701
bool GetDoNotAllowTracks() const
Definition: zone.h:700
long long int GetMinIslandArea() const
Definition: zone.h:714
wxString GetZoneName() const
Definition: zone.h:124
int GetLocalClearance(wxString *aSource) const override
Return any local clearances set in the "classic" (ie: pre-rule) system.
Definition: zone.cpp:467
int GetMinThickness() const
Definition: zone.h:251
ZONE_CONNECTION GetPadConnection() const
Definition: zone.h:248
int GetHatchThickness() const
Definition: zone.h:260
double GetHatchHoleMinArea() const
Definition: zone.h:275
int GetThermalReliefSpokeWidth() const
Definition: zone.h:195
int GetBorderHatchPitch() const
HatchBorder related methods.
Definition: zone.cpp:811
ZONE_BORDER_DISPLAY_STYLE GetHatchStyle() const
Definition: zone.h:580
EDA_ANGLE GetHatchOrientation() const
Definition: zone.h:266
bool GetDoNotAllowFootprints() const
Definition: zone.h:702
ZONE_FILL_MODE GetFillMode() const
Definition: zone.h:174
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
Definition: zone.h:122
bool GetDoNotAllowCopperPour() const
Definition: zone.h:698
int GetHatchGap() const
Definition: zone.h:263
TEARDROP_TYPE GetTeardropAreaType() const
Definition: zone.h:692
double GetHatchSmoothingValue() const
Definition: zone.h:272
int GetHatchSmoothingLevel() const
Definition: zone.h:269
unsigned int GetCornerRadius() const
Definition: zone.h:652
int GetCornerSmoothingType() const
Definition: zone.h:648
int GetThermalReliefGap() const
Definition: zone.h:184
unsigned GetAssignedPriority() const
Definition: zone.h:112

References ZONE::GetAssignedPriority(), ZONE::GetBorderHatchPitch(), ZONE::GetCornerRadius(), ZONE::GetCornerSmoothingType(), ZONE::GetDoNotAllowCopperPour(), ZONE::GetDoNotAllowFootprints(), ZONE::GetDoNotAllowPads(), ZONE::GetDoNotAllowTracks(), ZONE::GetDoNotAllowVias(), ZONE::GetFillMode(), ZONE::GetHatchBorderAlgorithm(), ZONE::GetHatchGap(), ZONE::GetHatchHoleMinArea(), ZONE::GetHatchOrientation(), ZONE::GetHatchSmoothingLevel(), ZONE::GetHatchSmoothingValue(), ZONE::GetHatchStyle(), ZONE::GetHatchThickness(), ZONE::GetIslandRemovalMode(), ZONE::GetIsRuleArea(), ZONE::GetLayerSet(), ZONE::GetLocalClearance(), ZONE::GetMinIslandArea(), ZONE::GetMinThickness(), BOARD_CONNECTED_ITEM::GetNetCode(), ZONE::GetPadConnection(), ZONE::GetTeardropAreaType(), ZONE::GetThermalReliefGap(), ZONE::GetThermalReliefSpokeWidth(), ZONE::GetZoneName(), BOARD_ITEM::IsLocked(), m_BorderHatchPitch, m_cornerRadius, m_cornerSmoothingType, m_FillMode, m_HatchBorderAlgorithm, m_HatchGap, m_HatchHoleMinArea, m_HatchOrientation, m_HatchSmoothingLevel, m_HatchSmoothingValue, m_HatchThickness, m_isRuleArea, m_keepoutDoNotAllowCopperPour, m_keepoutDoNotAllowFootprints, m_keepoutDoNotAllowPads, m_keepoutDoNotAllowTracks, m_keepoutDoNotAllowVias, m_Layers, m_Locked, m_minIslandArea, m_Name, m_NetcodeSelection, m_padConnection, m_removeIslands, m_TeardropType, m_ThermalReliefGap, m_ThermalReliefSpokeWidth, m_ZoneBorderDisplayStyle, m_ZoneClearance, m_ZoneMinThickness, and m_ZonePriority.

◆ SetCornerRadius()

void ZONE_SETTINGS::SetCornerRadius ( int  aRadius)

Definition at line 181 of file zone_settings.cpp.

182{
183 if( aRadius < 0 )
184 m_cornerRadius = 0;
185 else
186 m_cornerRadius = aRadius;
187}

References m_cornerRadius.

Referenced by DIALOG_COPPER_ZONE::AcceptOptions(), and DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataFromWindow().

◆ SetCornerSmoothingType()

void ZONE_SETTINGS::SetCornerSmoothingType ( int  aType)
inline

◆ SetDoNotAllowCopperPour()

void ZONE_SETTINGS::SetDoNotAllowCopperPour ( bool  aEnable)
inline

◆ SetDoNotAllowFootprints()

void ZONE_SETTINGS::SetDoNotAllowFootprints ( bool  aEnable)
inline

◆ SetDoNotAllowPads()

void ZONE_SETTINGS::SetDoNotAllowPads ( bool  aEnable)
inline

◆ SetDoNotAllowTracks()

void ZONE_SETTINGS::SetDoNotAllowTracks ( bool  aEnable)
inline

◆ SetDoNotAllowVias()

void ZONE_SETTINGS::SetDoNotAllowVias ( bool  aEnable)
inline

◆ SetIslandRemovalMode()

void ZONE_SETTINGS::SetIslandRemovalMode ( ISLAND_REMOVAL_MODE  aRemove)
inline

Definition at line 193 of file zone_settings.h.

193{ m_removeIslands = aRemove; }

References m_removeIslands.

Referenced by DIALOG_COPPER_ZONE::AcceptOptions(), and DIALOG_COPPER_ZONE::OnNetSelectionUpdated().

◆ SetIsRuleArea()

void ZONE_SETTINGS::SetIsRuleArea ( bool  aEnable)
inline

◆ SetMinIslandArea()

void ZONE_SETTINGS::SetMinIslandArea ( long long int  aArea)
inline

Definition at line 196 of file zone_settings.h.

196{ m_minIslandArea = aArea; }

References m_minIslandArea.

Referenced by DIALOG_COPPER_ZONE::AcceptOptions().

◆ SetPadConnection()

void ZONE_SETTINGS::SetPadConnection ( ZONE_CONNECTION  aPadConnection)
inline

Definition at line 173 of file zone_settings.h.

173{ m_padConnection = aPadConnection; }

References m_padConnection.

Referenced by DIALOG_COPPER_ZONE::AcceptOptions().

◆ SetupLayersList()

void ZONE_SETTINGS::SetupLayersList ( wxDataViewListCtrl *  aList,
PCB_BASE_FRAME aFrame,
LSET  aLayers,
bool  aFpEditorMode 
)

A helper routine for the various zone dialogs (copper, non-copper, keepout).

Parameters
aListthe wxDataViewListCtrl to populate
aFramethe parent editor frame
aFpEditorModetrue to show a single "Inner Layers" item for all inner copper layers

Definition at line 201 of file zone_settings.cpp.

203{
204 BOARD* board = aFrame->GetBoard();
205 COLOR4D backgroundColor = aFrame->GetColorSettings()->GetColor( LAYER_PCB_BACKGROUND );
206
207 // In the Footprint Editor In1_Cu is used as a proxy for "all inner layers"
208 if( aFpEditorMode )
209 aLayers.set( In1_Cu );
210
211 wxDataViewColumn* checkColumn = aList->AppendToggleColumn( wxEmptyString );
212 wxDataViewColumn* layerColumn = aList->AppendIconTextColumn( wxEmptyString );
213 wxDataViewColumn* layerIDColumn = aList->AppendTextColumn( wxEmptyString );
214 layerIDColumn->SetHidden( true );
215
216 int textWidth = 0;
217
218 for( LSEQ layer = aLayers.UIOrder(); layer; ++layer )
219 {
220 PCB_LAYER_ID layerID = *layer;
221 wxString layerName = board->GetLayerName( layerID );
222
223 if( aFpEditorMode && layerID == In1_Cu )
224 layerName = _( "Inner layers" );
225
226 // wxCOL_WIDTH_AUTOSIZE doesn't work on all platforms, so we calculate width here
227 textWidth = std::max( textWidth, KIUI::GetTextSize( layerName, aList ).x );
228
229 COLOR4D layerColor = aFrame->GetColorSettings()->GetColor( layerID );
230 auto bitmap = COLOR_SWATCH::MakeBitmap( layerColor, backgroundColor, LAYER_BITMAP_SIZE,
231 CHECKERBOARD_SIZE, aList->GetBackgroundColour() );
232 wxIcon icon;
233 icon.CopyFromBitmap( bitmap );
234
235 wxVector<wxVariant> row;
236 row.push_back( wxVariant( m_Layers.test( layerID ) ) );
237 row.push_back( wxVariant( wxDataViewIconText( layerName, icon ) ) );
238 row.push_back( wxVariant( wxString::Format( wxT( "%i" ), layerID ) ) );
239 aList->AppendItem( row );
240
241 if( m_Layers.test( layerID ) )
242 aList->SetToggleValue( true, (unsigned) aList->GetItemCount() - 1, 0 );
243 }
244
245 int checkColSize = 22;
246 int layerColSize = textWidth + LAYER_BITMAP_SIZE.x + 15;
247
248#ifdef __WXMAC__
249 // TODO: something in wxWidgets 3.1.x pads checkbox columns with extra space. (It used to
250 // also be that the width of the column would get set too wide (to 30), but that's patched in
251 // our local wxWidgets fork.)
252 int checkColMargins = 40;
253#else
254 int checkColMargins = 0;
255#endif
256
257 // You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
258 // for the tree expanders... but you'd be wrong. Force indent to 0.
259 aList->SetIndent( 0 );
260 aList->SetMinClientSize( wxSize( checkColSize + checkColMargins + layerColSize,
261 aList->GetMinClientSize().y ) );
262
263 checkColumn->SetWidth( checkColSize );
264 layerColumn->SetWidth( layerColSize );
265}
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:265
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition: board.cpp:413
COLOR4D GetColor(int aLayer) const
static wxBitmap MakeBitmap(const KIGFX::COLOR4D &aColor, const KIGFX::COLOR4D &aBackground, const wxSize &aSize, const wxSize &aCheckerboardSize, const KIGFX::COLOR4D &aCheckerboardBackground)
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:491
LSEQ UIOrder() const
Definition: lset.cpp:922
BOARD * GetBoard() const
virtual COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
#define _(s)
@ LAYER_PCB_BACKGROUND
PCB background color.
Definition: layer_ids.h:220
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:59
@ In1_Cu
Definition: layer_ids.h:65
wxSize GetTextSize(const wxString &aSingleLine, wxWindow *aWindow)
Return the size of aSingleLine of text when it is rendered in aWindow using whatever font is currentl...
Definition: ui_common.cpp:70
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
static const wxSize CHECKERBOARD_SIZE(8, 8)
static const wxSize LAYER_BITMAP_SIZE(24, 16)

References _, CHECKERBOARD_SIZE(), Format(), PCB_BASE_FRAME::GetBoard(), COLOR_SETTINGS::GetColor(), PCB_BASE_FRAME::GetColorSettings(), BOARD::GetLayerName(), KIUI::GetTextSize(), In1_Cu, LAYER_BITMAP_SIZE(), LAYER_PCB_BACKGROUND, m_Layers, COLOR_SWATCH::MakeBitmap(), and LSET::UIOrder().

Referenced by DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), and DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES().

Member Data Documentation

◆ m_BorderHatchPitch

◆ m_cornerRadius

unsigned int ZONE_SETTINGS::m_cornerRadius
private

◆ m_cornerSmoothingType

int ZONE_SETTINGS::m_cornerSmoothingType
private

◆ m_FillMode

◆ m_HatchBorderAlgorithm

int ZONE_SETTINGS::m_HatchBorderAlgorithm

Definition at line 93 of file zone_settings.h.

Referenced by ExportSetting(), operator<<(), and ZONE_SETTINGS().

◆ m_HatchGap

◆ m_HatchHoleMinArea

double ZONE_SETTINGS::m_HatchHoleMinArea

Definition at line 92 of file zone_settings.h.

Referenced by ExportSetting(), operator<<(), and ZONE_SETTINGS().

◆ m_HatchOrientation

◆ m_HatchSmoothingLevel

◆ m_HatchSmoothingValue

◆ m_HatchThickness

◆ m_isRuleArea

bool ZONE_SETTINGS::m_isRuleArea
private

Definition at line 124 of file zone_settings.h.

Referenced by ExportSetting(), GetIsRuleArea(), operator<<(), and SetIsRuleArea().

◆ m_keepoutDoNotAllowCopperPour

bool ZONE_SETTINGS::m_keepoutDoNotAllowCopperPour
private

Definition at line 126 of file zone_settings.h.

Referenced by GetDoNotAllowCopperPour(), operator<<(), and SetDoNotAllowCopperPour().

◆ m_keepoutDoNotAllowFootprints

bool ZONE_SETTINGS::m_keepoutDoNotAllowFootprints
private

Definition at line 130 of file zone_settings.h.

Referenced by GetDoNotAllowFootprints(), operator<<(), and SetDoNotAllowFootprints().

◆ m_keepoutDoNotAllowPads

bool ZONE_SETTINGS::m_keepoutDoNotAllowPads
private

Definition at line 129 of file zone_settings.h.

Referenced by GetDoNotAllowPads(), operator<<(), and SetDoNotAllowPads().

◆ m_keepoutDoNotAllowTracks

bool ZONE_SETTINGS::m_keepoutDoNotAllowTracks
private

Definition at line 128 of file zone_settings.h.

Referenced by GetDoNotAllowTracks(), operator<<(), and SetDoNotAllowTracks().

◆ m_keepoutDoNotAllowVias

bool ZONE_SETTINGS::m_keepoutDoNotAllowVias
private

Definition at line 127 of file zone_settings.h.

Referenced by GetDoNotAllowVias(), operator<<(), and SetDoNotAllowVias().

◆ m_Layers

◆ m_Locked

◆ m_minIslandArea

long long int ZONE_SETTINGS::m_minIslandArea
private

Definition at line 133 of file zone_settings.h.

Referenced by GetMinIslandArea(), operator<<(), SetMinIslandArea(), and ZONE_SETTINGS().

◆ m_Name

◆ m_NetcodeSelection

◆ m_padConnection

ZONE_CONNECTION ZONE_SETTINGS::m_padConnection
private

◆ m_removeIslands

ISLAND_REMOVAL_MODE ZONE_SETTINGS::m_removeIslands
private

◆ m_TeardropType

◆ m_ThermalReliefGap

long ZONE_SETTINGS::m_ThermalReliefGap

◆ m_ThermalReliefSpokeWidth

long ZONE_SETTINGS::m_ThermalReliefSpokeWidth

◆ m_ZoneBorderDisplayStyle

◆ m_ZoneClearance

◆ m_ZoneMinThickness

◆ m_ZonePriority


The documentation for this class was generated from the following files: