KiCad PCB EDA Suite
Loading...
Searching...
No Matches
zone_settings.cpp
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) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#include <zone_settings.h>
27
28#include <pcb_base_frame.h>
29#include <board.h>
30#include <lset.h>
32#include <zones.h>
33
34#include <zone.h>
35#include <wx/dataview.h>
37
39{
40 return hatching_offset == aOther.hatching_offset;
41}
42
44{
46 m_FillMode = ZONE_FILL_MODE::POLYGONS; // Mode for filling zone
47 // Zone clearance value
49 // Min thickness value in filled areas (this is the minimum width of copper to fill solid areas) :
51 // Arbitrary defaults for the hatch settings
52 m_HatchThickness = std::max( m_ZoneMinThickness * 4, pcbIUScale.mmToIU( 1.0 ) );
53 m_HatchGap = std::max( m_ZoneMinThickness * 6, pcbIUScale.mmToIU( 1.5 ) );
54 m_HatchOrientation = ANGLE_0; // Grid style: orientation of grid lines
55 m_HatchSmoothingLevel = 0; // Grid pattern smoothing type. 0 = no smoothing
56 m_HatchSmoothingValue = 0.1; // Grid pattern chamfer value relative to the gap value
57 m_HatchHoleMinArea = 0.15; // Min size before holes are dropped (ratio of hole size)
58 m_HatchBorderAlgorithm = 1; // 0 = use zone min thickness; 1 = use hatch width
59 m_Netcode = 0; // Net code for the current zone
61 // outlines only, short
62 // hatches or full hatches
64
65 m_Layers.reset().set( F_Cu );
66 m_Name = wxEmptyString;
67
68 // thickness of the gap in thermal reliefs:
70 // thickness of the copper bridge in thermal reliefs:
72
73 m_padConnection = ZONE_CONNECTION::THERMAL; // How pads are covered by copper in zone
74
75 m_Locked = false;
76
79
81 m_minIslandArea = 10 * pcbIUScale.IU_PER_MM * pcbIUScale.IU_PER_MM;
82
83 SetIsRuleArea( false );
86 SetDoNotAllowVias( true );
87 SetDoNotAllowTracks( true );
88 SetDoNotAllowPads( true );
90
93}
94
95
96bool ZONE_SETTINGS::operator==( const ZONE_SETTINGS& aOther ) const
97{
98 if( m_ZonePriority != aOther.m_ZonePriority ) return false;
99 if( m_FillMode != aOther.m_FillMode ) return false;
100 if( m_ZoneClearance != aOther.m_ZoneClearance ) return false;
101 if( m_ZoneMinThickness != aOther.m_ZoneMinThickness ) return false;
102 if( m_HatchThickness != aOther.m_HatchThickness ) return false;
103 if( m_HatchGap != aOther.m_HatchGap ) return false;
104 if( m_HatchOrientation != aOther.m_HatchOrientation ) return false;
105 if( m_HatchSmoothingLevel != aOther.m_HatchSmoothingLevel ) return false;
106 if( m_HatchSmoothingValue != aOther.m_HatchSmoothingValue ) return false;
107 if( m_HatchBorderAlgorithm != aOther.m_HatchBorderAlgorithm ) return false;
108 if( m_HatchHoleMinArea != aOther.m_HatchHoleMinArea ) return false;
109 if( m_Netcode != aOther.m_Netcode ) return false;
110 if( m_Name != aOther.m_Name ) return false;
111 if( m_ZoneBorderDisplayStyle != aOther.m_ZoneBorderDisplayStyle ) return false;
112 if( m_BorderHatchPitch != aOther.m_BorderHatchPitch ) return false;
113 if( m_ThermalReliefGap != aOther.m_ThermalReliefGap ) return false;
114 if( m_ThermalReliefSpokeWidth != aOther.m_ThermalReliefSpokeWidth ) return false;
115 if( m_padConnection != aOther.m_padConnection ) return false;
116 if( m_cornerSmoothingType != aOther.m_cornerSmoothingType ) return false;
117 if( m_cornerRadius != aOther.m_cornerRadius ) return false;
118 if( m_isRuleArea != aOther.m_isRuleArea ) return false;
119 if( m_placementAreaEnabled != aOther.m_placementAreaEnabled ) return false;
120 if( m_placementAreaSourceType != aOther.m_placementAreaSourceType ) return false;
121 if( m_placementAreaSource != aOther.m_placementAreaSource ) return false;
123 if( m_keepoutDoNotAllowVias != aOther.m_keepoutDoNotAllowVias ) return false;
124 if( m_keepoutDoNotAllowTracks != aOther.m_keepoutDoNotAllowTracks ) return false;
125 if( m_keepoutDoNotAllowPads != aOther.m_keepoutDoNotAllowPads ) return false;
127 if( m_Locked != aOther.m_Locked ) return false;
128 if( m_removeIslands != aOther.m_removeIslands ) return false;
129 if( m_minIslandArea != aOther.m_minIslandArea ) return false;
130
131 if( !std::equal( std::begin( m_LayerProperties ), std::end( m_LayerProperties ),
132 std::begin( aOther.m_LayerProperties ) ) )
133 return false;
134
135 // Currently, the teardrop area type is not really a ZONE_SETTINGS parameter,
136 // but a ZONE parameter only.
137 // However it can be used in dialogs
138 if( m_TeardropType != aOther.m_TeardropType ) return false;
139
140 if( m_Layers != aOther.m_Layers ) return false;
141
142 return true;
143}
144
145
147{
149 m_FillMode = aSource.GetFillMode();
150 m_ZoneClearance = aSource.GetLocalClearance().value();
153 m_HatchGap = aSource.GetHatchGap();
159 m_Netcode = aSource.GetNetCode();
160 m_Name = aSource.GetZoneName();
168 m_isRuleArea = aSource.GetIsRuleArea();
177 m_Locked = aSource.IsLocked();
181
182 // Currently, the teardrop area type is not really a ZONE_SETTINGS parameter,
183 // but a ZONE parameter only.
184 // However it can be used in dialogs
186
187 m_Layers = aSource.GetLayerSet();
188
189 return *this;
190}
191
192
193void ZONE_SETTINGS::ExportSetting( ZONE& aTarget, bool aFullExport ) const
194{
195 aTarget.SetFillMode( m_FillMode );
199 aTarget.SetHatchGap( m_HatchGap );
210 aTarget.SetIsRuleArea( GetIsRuleArea() );
219 aTarget.SetLocked( m_Locked );
222 // Currently, the teardrop area type is not imported from a ZONE_SETTINGS, because
223 // it is not really a ZONE_SETTINGS parameter, but a ZONE parameter only
224#if 0
226#endif
227
228
229 if( aFullExport )
230 {
232
234 aTarget.SetLayerSet( m_Layers );
235
236 aTarget.SetZoneName( m_Name );
237
238 if( !m_isRuleArea )
239 aTarget.SetNetCode( m_Netcode );
240 }
241
242 // call SetBorderDisplayStyle last, because hatch lines will be rebuilt,
243 // using new parameters values
245 m_BorderHatchPitch, true );
246}
247
248void ZONE_SETTINGS::CopyFrom( const ZONE_SETTINGS& aOther, bool aCopyFull )
249{
251 m_FillMode = aOther.m_FillMode;
255 m_HatchGap = aOther.m_HatchGap;
261 m_Netcode = aOther.m_Netcode;
262 m_Name = aOther.m_Name;
270 m_isRuleArea = aOther.m_isRuleArea;
279 m_Locked = aOther.m_Locked;
283
284 if( aCopyFull )
285 {
287 m_Layers = aOther.m_Layers;
288 }
289}
290
291
293{
294 if( aRadius < 0 )
295 m_cornerRadius = 0;
296 else
297 m_cornerRadius = aRadius;
298}
299
300
301#ifdef __WXOSX_MAC__
302const static wxSize LAYER_BITMAP_SIZE( 28, 28 ); // wxCocoa impl unhappy if this isn't square...
303#else
304const static wxSize LAYER_BITMAP_SIZE( 24, 16 );
305#endif
306
307const static wxSize CHECKERBOARD_SIZE( 8, 8 );
308
309
311{
312 static ZONE_SETTINGS defaultSettings;
313
314 return defaultSettings;
315}
316
317
318// A helper for setting up a dialog list for specifying zone layers. Used by all three
319// zone settings dialogs.
320void ZONE_SETTINGS::SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME* aFrame, LSET aLayers )
321{
322 BOARD* board = aFrame->GetBoard();
323 COLOR4D backgroundColor = aFrame->GetColorSettings()->GetColor( LAYER_PCB_BACKGROUND );
324
325 wxDataViewColumn* checkColumn = aList->AppendToggleColumn( wxEmptyString, wxDATAVIEW_CELL_ACTIVATABLE,
326 wxCOL_WIDTH_DEFAULT, wxALIGN_CENTER );
327
328 wxDataViewColumn* layerColumn = aList->AppendIconTextColumn( wxEmptyString );
329 wxDataViewColumn* layerIDColumn = aList->AppendTextColumn( wxEmptyString );
330 layerIDColumn->SetHidden( true );
331
332 int textWidth = 0;
333
334 for( PCB_LAYER_ID layerID : aLayers.UIOrder() )
335 {
336 wxString layerName = board->GetLayerName( layerID );
337
338 // wxCOL_WIDTH_AUTOSIZE doesn't work on all platforms, so we calculate width here
339 textWidth = std::max( textWidth, KIUI::GetTextSize( layerName, aList ).x );
340
341 COLOR4D layerColor = aFrame->GetColorSettings()->GetColor( layerID );
342 auto bitmap = COLOR_SWATCH::MakeBitmap( layerColor, backgroundColor, LAYER_BITMAP_SIZE,
343 CHECKERBOARD_SIZE, aList->GetBackgroundColour() );
344 wxIcon icon;
345 icon.CopyFromBitmap( bitmap );
346
347 wxVector<wxVariant> row;
348 row.push_back( wxVariant( m_Layers.test( layerID ) ) );
349 row.push_back( wxVariant( wxDataViewIconText( layerName, icon ) ) );
350 row.push_back( wxVariant( wxString::Format( wxT( "%i" ), layerID ) ) );
351 aList->AppendItem( row );
352
353 if( m_Layers.test( layerID ) )
354 aList->SetToggleValue( true, (unsigned) aList->GetItemCount() - 1, 0 );
355 }
356
357 int checkColSize = aList->FromDIP( 22 );
358 int layerColSize = textWidth + LAYER_BITMAP_SIZE.x + aList->FromDIP( 15 );
359
360 // You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
361 // for the tree expanders... but you'd be wrong. Force indent to 0.
362 aList->SetIndent( 0 );
363
364 checkColumn->SetWidth( checkColSize );
365 layerColumn->SetWidth( layerColSize );
366
367#ifdef __WXMAC__
368 // TODO: something in wxWidgets 3.1.x pads checkbox columns with extra space. (It used to
369 // also be that the width of the column would get set too wide (to 30), but that's patched in
370 // our local wxWidgets fork.)
371 checkColSize += 50;
372#endif
373
374 aList->SetMinClientSize( wxSize( checkColSize + layerColSize, aList->GetMinClientSize().y ) );
375}
376
377
379 m_frame( aFrame ),
380 m_getLayersFunc( getLayers )
381{
382 m_frame->Bind( EDA_EVT_UNITS_CHANGED, &LAYER_PROPERTIES_GRID_TABLE::onUnitsChanged, this );
383}
384
385
390
391
392wxString LAYER_PROPERTIES_GRID_TABLE::GetValue( int aRow, int aCol )
393{
394 VECTOR2I offset = m_items[aRow].second.hatching_offset.value_or( VECTOR2I() );
395
396 switch( aCol )
397 {
398 case 1: return m_frame->StringFromValue( offset.x, true );
399 case 2: return m_frame->StringFromValue( offset.y, true );
400
401 default:
402 // we can't assert here because wxWidgets sometimes calls this without checking
403 // the column type when trying to see if there's an overflow
404 return wxT( "bad wxWidgets!" );
405 }
406}
407
408
409void LAYER_PROPERTIES_GRID_TABLE::SetValue( int aRow, int aCol, const wxString& aValue )
410{
411 VECTOR2I offset = m_items[aRow].second.hatching_offset.value_or( VECTOR2I() );
412
413 switch( aCol )
414 {
415 case 1: offset.x = m_frame->ValueFromString( aValue ); break;
416 case 2: offset.y = m_frame->ValueFromString( aValue ); break;
417 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); break;
418 }
419
420 m_items[aRow].second.hatching_offset = offset;
421}
422
423
425{
426 switch( aCol )
427 {
428 case 0: return m_items[aRow].first;
429 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); return -1;
430 }
431}
432
433
434void LAYER_PROPERTIES_GRID_TABLE::SetValueAsLong( int aRow, int aCol, long aValue )
435{
436 switch( aCol )
437 {
438 case 0: m_items[aRow].first = ToLAYER_ID( (int) aValue ); break;
439 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); break;
440 }
441}
442
443
445{
446 m_items.emplace_back( std::make_pair( aLayer, aProps ) );
447
448 if( GetView() )
449 {
450 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
451 GetView()->ProcessTableMessage( msg );
452 }
453}
454
455
457{
459
460 auto contains =
461 [&]( PCB_LAYER_ID candidate )
462 {
463 for( const auto& [l, props] : m_items )
464 {
465 if( candidate == l )
466 return true;
467 }
468
469 return false;
470 };
471
472 for( PCB_LAYER_ID layer : m_getLayersFunc() )
473 {
474 if( !contains( layer ) )
475 {
476 next = layer;
477 break;
478 }
479 }
480
481 for( int jj = 0; jj < (int) aNumRows; ++jj )
483
484 return true;
485}
486
487
488bool LAYER_PROPERTIES_GRID_TABLE::DeleteRows( size_t aPos, size_t aNumRows )
489{
490 // aPos may be a large positive, e.g. size_t(-1), and the sum of
491 // aPos+aNumRows may wrap here, so both ends of the range are tested.
492 if( aPos < m_items.size() && aPos + aNumRows <= m_items.size() )
493 {
494 m_items.erase( m_items.begin() + (int) aPos, m_items.begin() + (int) aPos + (int) aNumRows );
495
496 if( GetView() )
497 {
498 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, (int) aPos, (int) aNumRows );
499 GetView()->ProcessTableMessage( msg );
500 }
501
502 return true;
503 }
504
505 return false;
506}
507
508
510{
511 if( GetView() )
512 GetView()->ForceRefresh();
513
514 aEvent.Skip();
515}
516
517
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:112
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
void SetLocked(bool aLocked) override
Definition board_item.h:323
bool IsLocked() const override
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:322
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition board.cpp:695
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, const std::vector< int > &aMargins={ 0, 0, 0, 0 })
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:104
wxString GetValue(int aRow, int aCol) override
void SetValueAsLong(int aRow, int aCol, long aValue) override
void SetValue(int aRow, int aCol, const wxString &aValue) override
std::function< LSET()> m_getLayersFunc
void AddItem(PCB_LAYER_ID aLayer, const ZONE_LAYER_PROPERTIES &aProps)
std::vector< std::pair< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > > m_items
long GetValueAsLong(int aRow, int aCol) override
bool AppendRows(size_t aNumRows=1) override
bool DeleteRows(size_t aPos, size_t aNumRows) override
void onUnitsChanged(wxCommandEvent &aEvent)
LAYER_PROPERTIES_GRID_TABLE(PCB_BASE_FRAME *aFrame, std::function< LSET()> getLayers)
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
LSEQ UIOrder() const
Return the copper, technical and user layers in the order shown in layer widget.
Definition lset.cpp:726
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
BOARD * GetBoard() const
virtual COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
bool m_keepoutDoNotAllowPads
void SetIsRuleArea(bool aEnable)
bool operator==(const ZONE_SETTINGS &aOther) const
unsigned int m_cornerRadius
bool GetDoNotAllowTracks() const
wxString GetPlacementAreaSource() const
EDA_ANGLE m_HatchOrientation
void SetDoNotAllowVias(bool aEnable)
bool GetDoNotAllowFootprints() const
long long int m_minIslandArea
bool m_keepoutDoNotAllowTracks
bool GetDoNotAllowPads() const
double m_HatchSmoothingValue
PLACEMENT_SOURCE_T GetPlacementAreaSourceType() const
PLACEMENT_SOURCE_T m_placementAreaSourceType
void ExportSetting(ZONE &aTarget, bool aFullExport=true) const
Function ExportSetting copy settings to a given zone.
bool GetIsRuleArea() const
bool GetDoNotAllowZoneFills() const
void SetDoNotAllowTracks(bool aEnable)
bool m_keepoutDoNotAllowZoneFills
bool GetDoNotAllowVias() const
wxString m_placementAreaSource
ISLAND_REMOVAL_MODE m_removeIslands
double m_HatchHoleMinArea
long long int GetMinIslandArea() const
long m_ThermalReliefSpokeWidth
TEARDROP_TYPE m_TeardropType
bool m_placementAreaEnabled
Placement rule area data.
static const ZONE_SETTINGS & GetDefaultSettings()
unsigned m_ZonePriority
void SetCornerRadius(int aRadius)
bool GetPlacementAreaEnabled() const
Accessors to parameters used in Rule Area zones:
std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > m_LayerProperties
ZONE_FILL_MODE m_FillMode
ZONE_CONNECTION m_padConnection
void SetDoNotAllowFootprints(bool aEnable)
void SetDoNotAllowPads(bool aEnable)
ZONE_SETTINGS & operator<<(const ZONE &aSource)
operator << ( const ZONE& ) was Function ImportSetting copies settings from a given zone into this ob...
void CopyFrom(const ZONE_SETTINGS &aOther, bool aCopyFull=true)
Function CopyFrom copy settings from a different ZONE_SETTINGS object.
void SetDoNotAllowZoneFills(bool aEnable)
void SetupLayersList(wxDataViewListCtrl *aList, PCB_BASE_FRAME *aFrame, LSET aLayers)
A helper routine for the various zone dialogs (copper, non-copper, keepout).
ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
ZONE_BORDER_DISPLAY_STYLE m_ZoneBorderDisplayStyle
Option to show the zone area (outlines only, short hatches or full hatches.
bool m_keepoutDoNotAllowFootprints
bool m_keepoutDoNotAllowVias
void SetPlacementAreaSourceType(PLACEMENT_SOURCE_T aType)
Handle a list of polygons defining a copper zone.
Definition zone.h:74
void SetHatchThickness(int aThickness)
Definition zone.h:307
void SetHatchBorderAlgorithm(int aAlgo)
Definition zone.h:325
void SetDoNotAllowPads(bool aEnable)
Definition zone.h:725
void SetLayerProperties(const std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > &aOther)
Definition zone.cpp:557
int GetHatchBorderAlgorithm() const
Definition zone.h:324
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
Definition zone.h:701
std::optional< int > GetLocalClearance() const override
Definition zone.cpp:806
void SetLocalClearance(std::optional< int > aClearance)
Definition zone.h:182
bool GetDoNotAllowVias() const
Definition zone.h:717
void SetCornerRadius(unsigned int aRadius)
Definition zone.cpp:665
ZONE_LAYER_PROPERTIES & LayerProperties(PCB_LAYER_ID aLayer)
Definition zone.h:145
void SetCornerSmoothingType(int aType)
Definition zone.h:640
wxString GetPlacementAreaSource() const
Definition zone.h:706
void SetBorderDisplayStyle(ZONE_BORDER_DISPLAY_STYLE aBorderHatchStyle, int aBorderHatchPitch, bool aRebuilBorderdHatch)
Set all hatch parameters for the zone.
Definition zone.cpp:1214
bool GetDoNotAllowPads() const
Definition zone.h:719
void SetMinThickness(int aMinThickness)
Definition zone.h:298
void SetPlacementAreaSource(const wxString &aSource)
Definition zone.h:707
PLACEMENT_SOURCE_T GetPlacementAreaSourceType() const
Definition zone.h:708
bool GetDoNotAllowTracks() const
Definition zone.h:718
void SetHatchOrientation(const EDA_ANGLE &aStep)
Definition zone.h:313
void SetHatchSmoothingValue(double aValue)
Definition zone.h:319
void SetHatchSmoothingLevel(int aLevel)
Definition zone.h:316
void SetThermalReliefSpokeWidth(int aThermalReliefSpokeWidth)
Definition zone.h:233
void SetPlacementAreaSourceType(PLACEMENT_SOURCE_T aType)
Definition zone.h:712
ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
Definition zone.h:728
long long int GetMinIslandArea() const
Definition zone.h:731
void SetIsRuleArea(bool aEnable)
Definition zone.h:702
void SetDoNotAllowTracks(bool aEnable)
Definition zone.h:724
const wxString & GetZoneName() const
Definition zone.h:159
int GetMinThickness() const
Definition zone.h:297
void SetFillMode(ZONE_FILL_MODE aFillMode)
Definition zone.h:219
ZONE_CONNECTION GetPadConnection() const
Definition zone.h:294
int GetHatchThickness() const
Definition zone.h:306
double GetHatchHoleMinArea() const
Definition zone.h:321
void SetLayerSet(const LSET &aLayerSet) override
Definition zone.cpp:523
bool GetPlacementAreaEnabled() const
Definition zone.h:703
void SetDoNotAllowVias(bool aEnable)
Definition zone.h:723
int GetThermalReliefSpokeWidth() const
Definition zone.h:241
int GetBorderHatchPitch() const
HatchBorder related methods.
Definition zone.h:741
ZONE_BORDER_DISPLAY_STYLE GetHatchStyle() const
Definition zone.h:585
void SetThermalReliefGap(int aThermalReliefGap)
Definition zone.h:222
EDA_ANGLE GetHatchOrientation() const
Definition zone.h:312
bool GetDoNotAllowFootprints() const
Definition zone.h:720
ZONE_FILL_MODE GetFillMode() const
Definition zone.h:220
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
Definition zone.h:136
void SetDoNotAllowFootprints(bool aEnable)
Definition zone.h:726
int GetHatchGap() const
Definition zone.h:309
void SetHatchHoleMinArea(double aPct)
Definition zone.h:322
TEARDROP_TYPE GetTeardropAreaType() const
Definition zone.h:687
double GetHatchSmoothingValue() const
Definition zone.h:318
bool GetDoNotAllowZoneFills() const
Definition zone.h:716
int GetHatchSmoothingLevel() const
Definition zone.h:315
unsigned int GetCornerRadius() const
Definition zone.h:646
int GetCornerSmoothingType() const
Definition zone.h:642
void SetDoNotAllowZoneFills(bool aEnable)
Definition zone.h:722
void SetAssignedPriority(unsigned aPriority)
Definition zone.h:121
void SetPadConnection(ZONE_CONNECTION aPadConnection)
Definition zone.h:295
void SetZoneName(const wxString &aName)
Definition zone.h:160
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:682
void SetIslandRemovalMode(ISLAND_REMOVAL_MODE aRemove)
Definition zone.h:729
void SetMinIslandArea(long long int aArea)
Definition zone.h:732
int GetThermalReliefGap() const
Definition zone.h:230
void SetHatchGap(int aStep)
Definition zone.h:310
void SetPlacementAreaEnabled(bool aEnabled)
Definition zone.h:704
unsigned GetAssignedPriority() const
Definition zone.h:126
static constexpr EDA_ANGLE ANGLE_0
Definition eda_angle.h:411
@ LAYER_PCB_BACKGROUND
PCB background color.
Definition layer_ids.h:281
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:60
@ F_Cu
Definition layer_ids.h:64
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition lset.cpp:737
KICOMMON_API 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:78
CITER next(CITER it)
Definition ptree.cpp:124
std::optional< VECTOR2I > hatching_offset
bool operator==(const ZONE_LAYER_PROPERTIES &aOther) const
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695
static const wxSize CHECKERBOARD_SIZE(8, 8)
static const wxSize LAYER_BITMAP_SIZE(24, 16)
Class ZONE_SETTINGS used to handle zones parameters in dialogs.
#define ZONE_THERMAL_RELIEF_GAP_MM
Definition zones.h:33
@ THERMAL
Use thermal relief for pads.
Definition zones.h:50
#define ZONE_BORDER_HATCH_DIST_MM
Definition zones.h:39
#define ZONE_THERMAL_RELIEF_COPPER_WIDTH_MM
Definition zones.h:34
#define ZONE_CLEARANCE_MM
Definition zones.h:37
#define ZONE_THICKNESS_MM
Definition zones.h:35