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, see <https://www.gnu.org/licenses/>.
20 */
21
22#include <zone_settings.h>
24
25#include <pcb_base_frame.h>
26#include <board.h>
27#include <lset.h>
29#include <zones.h>
30
31#include <zone.h>
32#include <wx/dataview.h>
34
36{
37 return hatching_offset == aOther.hatching_offset;
38}
39
41{
43 m_FillMode = ZONE_FILL_MODE::POLYGONS; // Mode for filling zone
44 // Zone clearance value
46 // Min thickness value in filled areas (this is the minimum width of copper to fill solid areas) :
48 // Arbitrary defaults for the hatch settings
49 m_HatchThickness = std::max( m_ZoneMinThickness * 4, pcbIUScale.mmToIU( 1.0 ) );
50 m_HatchGap = std::max( m_ZoneMinThickness * 6, pcbIUScale.mmToIU( 1.5 ) );
51 m_HatchOrientation = ANGLE_0; // Grid style: orientation of grid lines
52 m_HatchSmoothingLevel = 0; // Grid pattern smoothing type. 0 = no smoothing
53 m_HatchSmoothingValue = 0.1; // Grid pattern chamfer value relative to the gap value
54 m_HatchHoleMinArea = 0.15; // Min size before holes are dropped (ratio of hole size)
55 m_HatchBorderAlgorithm = 1; // 0 = use zone min thickness; 1 = use hatch width
56
57 // Provisional defaults for copper thieving stamps. Gap is the edge-to-edge
58 // spacing between adjacent stamps, so the grid stride is element_size + gap.
60 m_ThievingSettings.element_size = pcbIUScale.mmToIU( 0.5 );
61 m_ThievingSettings.gap = pcbIUScale.mmToIU( 1.0 );
62 m_ThievingSettings.line_width = std::max( m_ZoneMinThickness, pcbIUScale.mmToIU( 0.3 ) );
63 m_ThievingSettings.stagger = false;
64 m_ThievingSettings.orientation = ANGLE_0;
65
66 m_Netcode = 0; // Net code for the current zone
68 // outlines only, short
69 // hatches or full hatches
71
72 m_Layers.reset().set( F_Cu );
73 m_Name = wxEmptyString;
74
75 // thickness of the gap in thermal reliefs:
77 // thickness of the copper bridge in thermal reliefs:
79
80 m_padConnection = ZONE_CONNECTION::THERMAL; // How pads are covered by copper in zone
81
82 m_Locked = false;
83
86
88 m_minIslandArea = 10 * pcbIUScale.IU_PER_MM * pcbIUScale.IU_PER_MM;
89
90 SetIsRuleArea( false );
93 SetDoNotAllowVias( true );
94 SetDoNotAllowTracks( true );
95 SetDoNotAllowPads( true );
97
100}
101
102
103bool ZONE_SETTINGS::operator==( const ZONE_SETTINGS& aOther ) const
104{
105 if( m_ZonePriority != aOther.m_ZonePriority ) return false;
106 if( m_FillMode != aOther.m_FillMode ) return false;
107 if( m_ZoneClearance != aOther.m_ZoneClearance ) return false;
108 if( m_ZoneMinThickness != aOther.m_ZoneMinThickness ) return false;
109 if( m_HatchThickness != aOther.m_HatchThickness ) return false;
110 if( m_HatchGap != aOther.m_HatchGap ) return false;
111 if( m_HatchOrientation != aOther.m_HatchOrientation ) return false;
112 if( m_HatchSmoothingLevel != aOther.m_HatchSmoothingLevel ) return false;
113 if( m_HatchSmoothingValue != aOther.m_HatchSmoothingValue ) return false;
114 if( m_HatchBorderAlgorithm != aOther.m_HatchBorderAlgorithm ) return false;
115 if( m_HatchHoleMinArea != aOther.m_HatchHoleMinArea ) return false;
116 if( m_ThievingSettings != aOther.m_ThievingSettings ) return false;
117 if( m_Netcode != aOther.m_Netcode ) return false;
118 if( m_Name != aOther.m_Name ) return false;
119 if( m_ZoneBorderDisplayStyle != aOther.m_ZoneBorderDisplayStyle ) return false;
120 if( m_BorderHatchPitch != aOther.m_BorderHatchPitch ) return false;
121 if( m_ThermalReliefGap != aOther.m_ThermalReliefGap ) return false;
122 if( m_ThermalReliefSpokeWidth != aOther.m_ThermalReliefSpokeWidth ) return false;
123 if( m_padConnection != aOther.m_padConnection ) return false;
124 if( m_cornerSmoothingType != aOther.m_cornerSmoothingType ) return false;
125 if( m_cornerRadius != aOther.m_cornerRadius ) return false;
126 if( m_isRuleArea != aOther.m_isRuleArea ) return false;
127 if( m_placementAreaEnabled != aOther.m_placementAreaEnabled ) return false;
128 if( m_placementAreaSourceType != aOther.m_placementAreaSourceType ) return false;
129 if( m_placementAreaSource != aOther.m_placementAreaSource ) return false;
131 if( m_keepoutDoNotAllowVias != aOther.m_keepoutDoNotAllowVias ) return false;
132 if( m_keepoutDoNotAllowTracks != aOther.m_keepoutDoNotAllowTracks ) return false;
133 if( m_keepoutDoNotAllowPads != aOther.m_keepoutDoNotAllowPads ) return false;
135 if( m_Locked != aOther.m_Locked ) return false;
136 if( m_removeIslands != aOther.m_removeIslands ) return false;
137 if( m_minIslandArea != aOther.m_minIslandArea ) return false;
138
139 if( !std::equal( std::begin( m_LayerProperties ), std::end( m_LayerProperties ),
140 std::begin( aOther.m_LayerProperties ) ) )
141 return false;
142
143 // Currently, the teardrop area type is not really a ZONE_SETTINGS parameter,
144 // but a ZONE parameter only.
145 // However it can be used in dialogs
146 if( m_TeardropType != aOther.m_TeardropType ) return false;
147
148 if( m_Layers != aOther.m_Layers ) return false;
149
150 return true;
151}
152
153
155{
157 m_FillMode = aSource.GetFillMode();
158 m_ZoneClearance = aSource.GetLocalClearance().value();
161 m_HatchGap = aSource.GetHatchGap();
168 m_Netcode = aSource.GetNetCode();
169 m_Name = aSource.GetZoneName();
177 m_isRuleArea = aSource.GetIsRuleArea();
186 m_Locked = aSource.IsLocked();
190
191 // Currently, the teardrop area type is not really a ZONE_SETTINGS parameter,
192 // but a ZONE parameter only.
193 // However it can be used in dialogs
195
196 m_Layers = aSource.GetLayerSet();
197
198 return *this;
199}
200
201
202void ZONE_SETTINGS::ExportSetting( ZONE& aTarget, bool aFullExport ) const
203{
204 aTarget.SetFillMode( m_FillMode );
208 aTarget.SetHatchGap( m_HatchGap );
217
218 // Thieving zones are non-electrical and must never produce thermal reliefs.
219 // Force ZONE_CONNECTION::NONE so the filler skips thermal-spoke generation.
222 else
226 aTarget.SetIsRuleArea( GetIsRuleArea() );
235 aTarget.SetLocked( m_Locked );
238 // Currently, the teardrop area type is not imported from a ZONE_SETTINGS, because
239 // it is not really a ZONE_SETTINGS parameter, but a ZONE parameter only
240#if 0
242#endif
243
244
245 if( aFullExport )
246 {
248
250 aTarget.SetLayerSet( m_Layers );
251
252 aTarget.SetZoneName( m_Name );
253
255 aTarget.SetNetCode( 0 );
256 else if( !m_isRuleArea )
257 aTarget.SetNetCode( m_Netcode );
258 }
259
260 // call SetBorderDisplayStyle last, because hatch lines will be rebuilt,
261 // using new parameters values
263 m_BorderHatchPitch, true );
264}
265
266void ZONE_SETTINGS::CopyFrom( const ZONE_SETTINGS& aOther, bool aCopyFull )
267{
269 m_FillMode = aOther.m_FillMode;
273 m_HatchGap = aOther.m_HatchGap;
280 m_Netcode = aOther.m_Netcode;
281 m_Name = aOther.m_Name;
289 m_isRuleArea = aOther.m_isRuleArea;
298 m_Locked = aOther.m_Locked;
302
303 if( aCopyFull )
304 {
306 m_Layers = aOther.m_Layers;
307 }
308}
309
310
312{
313 if( aRadius < 0 )
314 m_cornerRadius = 0;
315 else
316 m_cornerRadius = aRadius;
317}
318
319
320#ifdef __WXOSX_MAC__
321const static wxSize LAYER_BITMAP_SIZE( 28, 28 ); // wxCocoa impl unhappy if this isn't square...
322#else
323const static wxSize LAYER_BITMAP_SIZE( 24, 16 );
324#endif
325
326const static wxSize CHECKERBOARD_SIZE( 8, 8 );
327
328
330{
331 static ZONE_SETTINGS defaultSettings;
332
333 return defaultSettings;
334}
335
336
337// A helper for setting up a dialog list for specifying zone layers. Used by all three
338// zone settings dialogs.
339void ZONE_SETTINGS::SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME* aFrame, LSET aLayers )
340{
341 BOARD* board = aFrame->GetBoard();
342 COLOR4D backgroundColor = aFrame->GetColorSettings()->GetColor( LAYER_PCB_BACKGROUND );
343
344 wxDataViewColumn* checkColumn = aList->AppendToggleColumn( wxEmptyString, wxDATAVIEW_CELL_ACTIVATABLE,
345 wxCOL_WIDTH_DEFAULT, wxALIGN_CENTER );
346
347 wxDataViewColumn* layerColumn = aList->AppendIconTextColumn( wxEmptyString );
348 wxDataViewColumn* layerIDColumn = aList->AppendTextColumn( wxEmptyString );
349 layerIDColumn->SetHidden( true );
350
351 int textWidth = 0;
352
353 for( PCB_LAYER_ID layerID : aLayers.UIOrder() )
354 {
355 wxString layerName = board->GetLayerName( layerID );
356
357 // wxCOL_WIDTH_AUTOSIZE doesn't work on all platforms, so we calculate width here
358 textWidth = std::max( textWidth, KIUI::GetTextSize( layerName, aList ).x );
359
360 COLOR4D layerColor = aFrame->GetColorSettings()->GetColor( layerID );
361 auto bitmap = COLOR_SWATCH::MakeBitmap( layerColor, backgroundColor, LAYER_BITMAP_SIZE,
362 CHECKERBOARD_SIZE, aList->GetBackgroundColour() );
363 wxIcon icon;
364 icon.CopyFromBitmap( bitmap );
365
366 wxVector<wxVariant> row;
367 row.push_back( wxVariant( m_Layers.test( layerID ) ) );
368 row.push_back( wxVariant( wxDataViewIconText( layerName, icon ) ) );
369 row.push_back( wxVariant( wxString::Format( wxT( "%i" ), layerID ) ) );
370 aList->AppendItem( row );
371
372 if( m_Layers.test( layerID ) )
373 aList->SetToggleValue( true, (unsigned) aList->GetItemCount() - 1, 0 );
374 }
375
376 int checkColSize = aList->FromDIP( 22 );
377 int layerColSize = textWidth + LAYER_BITMAP_SIZE.x + aList->FromDIP( 15 );
378
379 // You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
380 // for the tree expanders... but you'd be wrong. Force indent to 0.
381 aList->SetIndent( 0 );
382
383 checkColumn->SetWidth( checkColSize );
384 layerColumn->SetWidth( layerColSize );
385
386#ifdef __WXMAC__
387 // TODO: something in wxWidgets 3.1.x pads checkbox columns with extra space. (It used to
388 // also be that the width of the column would get set too wide (to 30), but that's patched in
389 // our local wxWidgets fork.)
390 checkColSize += 50;
391#endif
392
393 aList->SetMinClientSize( wxSize( checkColSize + layerColSize, aList->GetMinClientSize().y ) );
394}
395
396
398 m_frame( aFrame ),
399 m_getLayersFunc( getLayers )
400{
401 m_frame->Bind( EDA_EVT_UNITS_CHANGED, &LAYER_PROPERTIES_GRID_TABLE::onUnitsChanged, this );
402}
403
404
409
410
411wxString LAYER_PROPERTIES_GRID_TABLE::GetValue( int aRow, int aCol )
412{
413 VECTOR2I offset = m_items[aRow].second.hatching_offset.value_or( VECTOR2I() );
414
415 switch( aCol )
416 {
417 case 1: return m_frame->StringFromValue( offset.x, true );
418 case 2: return m_frame->StringFromValue( offset.y, true );
419
420 default:
421 // we can't assert here because wxWidgets sometimes calls this without checking
422 // the column type when trying to see if there's an overflow
423 return wxT( "bad wxWidgets!" );
424 }
425}
426
427
428void LAYER_PROPERTIES_GRID_TABLE::SetValue( int aRow, int aCol, const wxString& aValue )
429{
430 VECTOR2I offset = m_items[aRow].second.hatching_offset.value_or( VECTOR2I() );
431
432 switch( aCol )
433 {
434 case 1: offset.x = m_frame->ValueFromString( aValue ); break;
435 case 2: offset.y = m_frame->ValueFromString( aValue ); break;
436 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); break;
437 }
438
439 m_items[aRow].second.hatching_offset = offset;
440}
441
442
444{
445 switch( aCol )
446 {
447 case 0: return m_items[aRow].first;
448 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); return -1;
449 }
450}
451
452
453void LAYER_PROPERTIES_GRID_TABLE::SetValueAsLong( int aRow, int aCol, long aValue )
454{
455 switch( aCol )
456 {
457 case 0: m_items[aRow].first = ToLAYER_ID( (int) aValue ); break;
458 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); break;
459 }
460}
461
462
464{
465 m_items.emplace_back( std::make_pair( aLayer, aProps ) );
466
467 if( GetView() )
468 {
469 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
470 GetView()->ProcessTableMessage( msg );
471 }
472}
473
474
476{
478
479 auto contains =
480 [&]( PCB_LAYER_ID candidate )
481 {
482 for( const auto& [l, props] : m_items )
483 {
484 if( candidate == l )
485 return true;
486 }
487
488 return false;
489 };
490
491 for( PCB_LAYER_ID layer : m_getLayersFunc().UIOrder() )
492 {
493 if( !contains( layer ) )
494 {
495 next = layer;
496 break;
497 }
498 }
499
500 if( next == UNDEFINED_LAYER )
501 return false;
502
503 AddItem( next, ZONE_LAYER_PROPERTIES( { VECTOR2I( 0, 0 ) } ) );
504
505 return true;
506}
507
508
509bool LAYER_PROPERTIES_GRID_TABLE::DeleteRows( size_t aPos, size_t aNumRows )
510{
511 // aPos may be a large positive, e.g. size_t(-1), and the sum of
512 // aPos+aNumRows may wrap here, so both ends of the range are tested.
513 if( aPos < m_items.size() && aPos + aNumRows <= m_items.size() )
514 {
515 m_items.erase( m_items.begin() + (int) aPos, m_items.begin() + (int) aPos + (int) aNumRows );
516
517 if( GetView() )
518 {
519 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, (int) aPos, (int) aNumRows );
520 GetView()->ProcessTableMessage( msg );
521 }
522
523 return true;
524 }
525
526 return false;
527}
528
529
531{
532 if( GetView() )
533 GetView()->ForceRefresh();
534
535 aEvent.Skip();
536}
537
538
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:121
void SetLocked(bool aLocked) override
Definition board_item.h:356
bool IsLocked() const override
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:372
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition board.cpp:793
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:101
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
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:739
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)
THIEVING_SETTINGS m_ThievingSettings
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:70
void SetHatchThickness(int aThickness)
Definition zone.h:326
void SetHatchBorderAlgorithm(int aAlgo)
Definition zone.h:344
void SetDoNotAllowPads(bool aEnable)
Definition zone.h:830
void SetLayerProperties(const std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > &aOther)
Definition zone.cpp:666
int GetHatchBorderAlgorithm() const
Definition zone.h:343
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
Definition zone.h:811
std::optional< int > GetLocalClearance() const override
Definition zone.cpp:973
const THIEVING_SETTINGS & GetThievingSettings() const
Definition zone.h:351
void SetLocalClearance(std::optional< int > aClearance)
Definition zone.h:183
bool GetDoNotAllowVias() const
Definition zone.h:822
void SetCornerRadius(unsigned int aRadius)
Definition zone.cpp:797
ZONE_LAYER_PROPERTIES & LayerProperties(PCB_LAYER_ID aLayer)
Definition zone.h:146
void SetCornerSmoothingType(int aType)
Definition zone.h:750
wxString GetPlacementAreaSource() const
Definition zone.h:816
void SetBorderDisplayStyle(ZONE_BORDER_DISPLAY_STYLE aBorderHatchStyle, int aBorderHatchPitch, bool aRebuilBorderdHatch)
Set all hatch parameters for the zone.
Definition zone.cpp:1458
bool GetDoNotAllowPads() const
Definition zone.h:824
void SetMinThickness(int aMinThickness)
Definition zone.h:316
void SetPlacementAreaSource(const wxString &aSource)
Definition zone.h:817
PLACEMENT_SOURCE_T GetPlacementAreaSourceType() const
Definition zone.h:818
bool GetDoNotAllowTracks() const
Definition zone.h:823
void SetHatchOrientation(const EDA_ANGLE &aStep)
Definition zone.h:332
void SetHatchSmoothingValue(double aValue)
Definition zone.h:338
void SetHatchSmoothingLevel(int aLevel)
Definition zone.h:335
void SetThermalReliefSpokeWidth(int aThermalReliefSpokeWidth)
Definition zone.h:251
void SetPlacementAreaSourceType(PLACEMENT_SOURCE_T aType)
Definition zone.h:819
ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
Definition zone.h:833
bool SetNetCode(int aNetCode, bool aNoAssert) override
Override that clamps the netcode to 0 when this zone is in copper-thieving fill mode.
Definition zone.cpp:581
long long int GetMinIslandArea() const
Definition zone.h:836
void SetIsRuleArea(bool aEnable)
Definition zone.h:812
void SetDoNotAllowTracks(bool aEnable)
Definition zone.h:829
const wxString & GetZoneName() const
Definition zone.h:160
int GetMinThickness() const
Definition zone.h:315
void SetFillMode(ZONE_FILL_MODE aFillMode)
Definition zone.cpp:605
ZONE_CONNECTION GetPadConnection() const
Definition zone.h:312
int GetHatchThickness() const
Definition zone.h:325
double GetHatchHoleMinArea() const
Definition zone.h:340
void SetThievingSettings(const THIEVING_SETTINGS &aSettings)
Definition zone.h:352
void SetLayerSet(const LSET &aLayerSet) override
Definition zone.cpp:624
bool GetPlacementAreaEnabled() const
Definition zone.h:813
void SetDoNotAllowVias(bool aEnable)
Definition zone.h:828
int GetThermalReliefSpokeWidth() const
Definition zone.h:259
int GetBorderHatchPitch() const
HatchBorder related methods.
Definition zone.h:846
ZONE_BORDER_DISPLAY_STYLE GetHatchStyle() const
Definition zone.h:685
void SetThermalReliefGap(int aThermalReliefGap)
Definition zone.h:240
EDA_ANGLE GetHatchOrientation() const
Definition zone.h:331
bool GetDoNotAllowFootprints() const
Definition zone.h:825
ZONE_FILL_MODE GetFillMode() const
Definition zone.h:238
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
Definition zone.h:133
void SetDoNotAllowFootprints(bool aEnable)
Definition zone.h:831
int GetHatchGap() const
Definition zone.h:328
void SetHatchHoleMinArea(double aPct)
Definition zone.h:341
TEARDROP_TYPE GetTeardropAreaType() const
Definition zone.h:797
double GetHatchSmoothingValue() const
Definition zone.h:337
bool GetDoNotAllowZoneFills() const
Definition zone.h:821
int GetHatchSmoothingLevel() const
Definition zone.h:334
unsigned int GetCornerRadius() const
Definition zone.h:756
int GetCornerSmoothingType() const
Definition zone.h:752
void SetDoNotAllowZoneFills(bool aEnable)
Definition zone.h:827
void SetAssignedPriority(unsigned aPriority)
Definition zone.h:117
void SetPadConnection(ZONE_CONNECTION aPadConnection)
Definition zone.h:313
void SetZoneName(const wxString &aName)
Definition zone.h:161
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:792
void SetIslandRemovalMode(ISLAND_REMOVAL_MODE aRemove)
Definition zone.h:834
void SetMinIslandArea(long long int aArea)
Definition zone.h:837
int GetThermalReliefGap() const
Definition zone.h:248
void SetHatchGap(int aStep)
Definition zone.h:329
void SetPlacementAreaEnabled(bool aEnabled)
Definition zone.h:814
unsigned GetAssignedPriority() const
Definition zone.h:122
static constexpr EDA_ANGLE ANGLE_0
Definition eda_angle.h:411
@ LAYER_PCB_BACKGROUND
PCB background color.
Definition layer_ids.h:277
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
@ UNDEFINED_LAYER
Definition layer_ids.h:57
@ F_Cu
Definition layer_ids.h:60
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition lset.cpp:750
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:120
std::optional< VECTOR2I > hatching_offset
bool operator==(const ZONE_LAYER_PROPERTIES &aOther) const
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683
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:28
@ THERMAL
Use thermal relief for pads.
Definition zones.h:46
@ NONE
Pads are not covered.
Definition zones.h:45
#define ZONE_BORDER_HATCH_DIST_MM
Definition zones.h:34
#define ZONE_THERMAL_RELIEF_COPPER_WIDTH_MM
Definition zones.h:29
#define ZONE_CLEARANCE_MM
Definition zones.h:32
#define ZONE_THICKNESS_MM
Definition zones.h:30