KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 ()
 
bool operator== (const ZONE_SETTINGS &aOther) const
 
bool operator!= (const ZONE_SETTINGS &aOther) const
 
ZONE_SETTINGSoperator<< (const ZONE &aSource)
 operator << ( const ZONE& ) was Function ImportSetting copies settings from a given zone into this object.
 
void SetupLayersList (wxDataViewListCtrl *aList, PCB_BASE_FRAME *aFrame, LSET aLayers, bool aFpEditorMode)
 A helper routine for the various zone dialogs (copper, non-copper, keepout).
 
void ExportSetting (ZONE &aTarget, bool aFullExport=true) const
 Function ExportSetting copy settings to a given zone.
 
void SetCornerSmoothingType (int aType)
 
int GetCornerSmoothingType () const
 
void SetCornerRadius (int aRadius)
 
unsigned int GetCornerRadius () const
 
ZONE_CONNECTION GetPadConnection () const
 
void SetPadConnection (ZONE_CONNECTION aPadConnection)
 
bool HasKeepoutParametersSet () const
 Accessor to determine if any keepout parameters are set.
 
bool GetIsRuleArea () const
 Accessors to parameters used in Rule Area zones:
 
bool GetRuleAreaPlacementEnabled () const
 
RULE_AREA_PLACEMENT_SOURCE_TYPE GetRuleAreaPlacementSourceType () const
 
wxString GetRuleAreaPlacementSource () const
 
bool GetDoNotAllowCopperPour () const
 
bool GetDoNotAllowVias () const
 
bool GetDoNotAllowTracks () const
 
bool GetDoNotAllowPads () const
 
bool GetDoNotAllowFootprints () const
 
void SetIsRuleArea (bool aEnable)
 
void SetRuleAreaPlacementEnabled (bool aEnabled)
 
void SetRuleAreaPlacementSourceType (RULE_AREA_PLACEMENT_SOURCE_TYPE aType)
 
void SetRuleAreaPlacementSource (const wxString &aSource)
 
void SetDoNotAllowCopperPour (bool aEnable)
 
void SetDoNotAllowVias (bool aEnable)
 
void SetDoNotAllowTracks (bool aEnable)
 
void SetDoNotAllowPads (bool aEnable)
 
void SetDoNotAllowFootprints (bool aEnable)
 
ISLAND_REMOVAL_MODE GetIslandRemovalMode () const
 
void SetIslandRemovalMode (ISLAND_REMOVAL_MODE aRemove)
 
long long int GetMinIslandArea () const
 
void SetMinIslandArea (long long int aArea)
 

Static Public Member Functions

static const ZONE_SETTINGSGetDefaultSettings ()
 

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.
 
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_ruleAreaPlacementEnabled
 Placement rule area data.
 
RULE_AREA_PLACEMENT_SOURCE_TYPE m_ruleAreaPlacementSourceType
 
wxString m_ruleAreaPlacementSource
 
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 77 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 81 of file zone_settings.h.

Constructor & Destructor Documentation

◆ ZONE_SETTINGS()

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 184 of file zone_settings.cpp.

References GetDoNotAllowCopperPour(), GetDoNotAllowFootprints(), GetDoNotAllowPads(), GetDoNotAllowTracks(), GetDoNotAllowVias(), GetIslandRemovalMode(), GetIsRuleArea(), GetMinIslandArea(), GetRuleAreaPlacementEnabled(), GetRuleAreaPlacementSource(), GetRuleAreaPlacementSourceType(), 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::SetRuleAreaPlacementEnabled(), ZONE::SetRuleAreaPlacementSource(), ZONE::SetRuleAreaPlacementSourceType(), 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(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), ZONE::ZONE(), and BOARD_EDITOR_CONTROL::ZoneDuplicate().

◆ GetCornerRadius()

unsigned int ZONE_SETTINGS::GetCornerRadius ( ) const
inline

◆ GetCornerSmoothingType()

◆ GetDefaultSettings()

const ZONE_SETTINGS & ZONE_SETTINGS::GetDefaultSettings ( )
static
Returns
Default ZONE_SETTINGS

Definition at line 255 of file zone_settings.cpp.

Referenced by TEARDROP_MANAGER::createTeardrop().

◆ GetDoNotAllowCopperPour()

bool ZONE_SETTINGS::GetDoNotAllowCopperPour ( ) const
inline

◆ GetDoNotAllowFootprints()

bool ZONE_SETTINGS::GetDoNotAllowFootprints ( ) const
inline

◆ GetDoNotAllowPads()

bool ZONE_SETTINGS::GetDoNotAllowPads ( ) const
inline

◆ GetDoNotAllowTracks()

bool ZONE_SETTINGS::GetDoNotAllowTracks ( ) const
inline

◆ GetDoNotAllowVias()

bool ZONE_SETTINGS::GetDoNotAllowVias ( ) const
inline

◆ GetIslandRemovalMode()

ISLAND_REMOVAL_MODE ZONE_SETTINGS::GetIslandRemovalMode ( ) const
inline

◆ GetIsRuleArea()

bool ZONE_SETTINGS::GetIsRuleArea ( ) const
inline

Accessors to parameters used in Rule Area zones:

Definition at line 211 of file zone_settings.h.

References m_isRuleArea.

Referenced by ExportSetting().

◆ GetMinIslandArea()

long long int ZONE_SETTINGS::GetMinIslandArea ( ) const
inline

Definition at line 243 of file zone_settings.h.

References m_minIslandArea.

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

◆ GetPadConnection()

ZONE_CONNECTION ZONE_SETTINGS::GetPadConnection ( ) const
inline

Definition at line 196 of file zone_settings.h.

References m_padConnection.

Referenced by DIALOG_COPPER_ZONE::TransferDataToWindow().

◆ GetRuleAreaPlacementEnabled()

bool ZONE_SETTINGS::GetRuleAreaPlacementEnabled ( ) const
inline

◆ GetRuleAreaPlacementSource()

wxString ZONE_SETTINGS::GetRuleAreaPlacementSource ( ) const
inline

◆ GetRuleAreaPlacementSourceType()

RULE_AREA_PLACEMENT_SOURCE_TYPE ZONE_SETTINGS::GetRuleAreaPlacementSourceType ( ) const
inline

◆ HasKeepoutParametersSet()

bool ZONE_SETTINGS::HasKeepoutParametersSet ( ) const
inline

◆ operator!=()

bool ZONE_SETTINGS::operator!= ( const ZONE_SETTINGS aOther) const
inline

Definition at line 155 of file zone_settings.h.

References operator==().

◆ 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 138 of file zone_settings.cpp.

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::GetRuleAreaPlacementEnabled(), ZONE::GetRuleAreaPlacementSource(), ZONE::GetRuleAreaPlacementSourceType(), 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_ruleAreaPlacementEnabled, m_ruleAreaPlacementSource, m_ruleAreaPlacementSourceType, m_TeardropType, m_ThermalReliefGap, m_ThermalReliefSpokeWidth, m_ZoneBorderDisplayStyle, m_ZoneClearance, m_ZoneMinThickness, and m_ZonePriority.

◆ operator==()

◆ SetCornerRadius()

void ZONE_SETTINGS::SetCornerRadius ( int  aRadius)

◆ 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

◆ SetIsRuleArea()

void ZONE_SETTINGS::SetIsRuleArea ( bool  aEnable)
inline

◆ SetMinIslandArea()

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

Definition at line 244 of file zone_settings.h.

References m_minIslandArea.

Referenced by DIALOG_COPPER_ZONE::AcceptOptions().

◆ SetPadConnection()

void ZONE_SETTINGS::SetPadConnection ( ZONE_CONNECTION  aPadConnection)
inline

Definition at line 197 of file zone_settings.h.

References m_padConnection.

Referenced by DIALOG_COPPER_ZONE::AcceptOptions().

◆ SetRuleAreaPlacementEnabled()

void ZONE_SETTINGS::SetRuleAreaPlacementEnabled ( bool  aEnabled)
inline

◆ SetRuleAreaPlacementSource()

void ZONE_SETTINGS::SetRuleAreaPlacementSource ( const wxString &  aSource)
inline

◆ SetRuleAreaPlacementSourceType()

void ZONE_SETTINGS::SetRuleAreaPlacementSourceType ( RULE_AREA_PLACEMENT_SOURCE_TYPE  aType)
inline

◆ 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 265 of file zone_settings.cpp.

References _, CHECKERBOARD_SIZE(), 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(), BASE_SET::set(), 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 101 of file zone_settings.h.

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

◆ m_HatchGap

◆ m_HatchHoleMinArea

double ZONE_SETTINGS::m_HatchHoleMinArea

Definition at line 100 of file zone_settings.h.

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

◆ m_HatchOrientation

◆ m_HatchSmoothingLevel

◆ m_HatchSmoothingValue

◆ m_HatchThickness

◆ m_isRuleArea

bool ZONE_SETTINGS::m_isRuleArea
private

Definition at line 132 of file zone_settings.h.

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

◆ m_keepoutDoNotAllowCopperPour

bool ZONE_SETTINGS::m_keepoutDoNotAllowCopperPour
private

◆ m_keepoutDoNotAllowFootprints

bool ZONE_SETTINGS::m_keepoutDoNotAllowFootprints
private

◆ m_keepoutDoNotAllowPads

bool ZONE_SETTINGS::m_keepoutDoNotAllowPads
private

◆ m_keepoutDoNotAllowTracks

bool ZONE_SETTINGS::m_keepoutDoNotAllowTracks
private

◆ m_keepoutDoNotAllowVias

bool ZONE_SETTINGS::m_keepoutDoNotAllowVias
private

◆ m_Layers

◆ m_Locked

◆ m_minIslandArea

long long int ZONE_SETTINGS::m_minIslandArea
private

◆ m_Name

◆ m_NetcodeSelection

◆ m_padConnection

ZONE_CONNECTION ZONE_SETTINGS::m_padConnection
private

◆ m_removeIslands

ISLAND_REMOVAL_MODE ZONE_SETTINGS::m_removeIslands
private

◆ m_ruleAreaPlacementEnabled

bool ZONE_SETTINGS::m_ruleAreaPlacementEnabled
private

Placement rule area data.

Definition at line 137 of file zone_settings.h.

Referenced by GetRuleAreaPlacementEnabled(), operator<<(), operator==(), SetRuleAreaPlacementEnabled(), and ZONE_SETTINGS().

◆ m_ruleAreaPlacementSource

wxString ZONE_SETTINGS::m_ruleAreaPlacementSource
private

◆ m_ruleAreaPlacementSourceType

RULE_AREA_PLACEMENT_SOURCE_TYPE ZONE_SETTINGS::m_ruleAreaPlacementSourceType
private

◆ m_TeardropType

TEARDROP_TYPE ZONE_SETTINGS::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: