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