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 m_Netcode = 0; // Net code for the current zone
62 // outlines only, short
63 // hatches or full hatches
65
66 m_Layers.reset().set( F_Cu );
67 m_Name = wxEmptyString;
68
69 // thickness of the gap in thermal reliefs:
71 // thickness of the copper bridge in thermal reliefs:
73
74 m_padConnection = ZONE_CONNECTION::THERMAL; // How pads are covered by copper in zone
75
76 m_Locked = false;
77
80
82 m_minIslandArea = 10 * pcbIUScale.IU_PER_MM * pcbIUScale.IU_PER_MM;
83
84 SetIsRuleArea( false );
87 SetDoNotAllowVias( true );
88 SetDoNotAllowTracks( true );
89 SetDoNotAllowPads( true );
91
94}
95
96
97bool ZONE_SETTINGS::operator==( const ZONE_SETTINGS& aOther ) const
98{
99 if( m_ZonePriority != aOther.m_ZonePriority ) return false;
100 if( m_FillMode != aOther.m_FillMode ) return false;
101 if( m_ZoneClearance != aOther.m_ZoneClearance ) return false;
102 if( m_ZoneMinThickness != aOther.m_ZoneMinThickness ) return false;
103 if( m_HatchThickness != aOther.m_HatchThickness ) return false;
104 if( m_HatchGap != aOther.m_HatchGap ) return false;
105 if( m_HatchOrientation != aOther.m_HatchOrientation ) return false;
106 if( m_HatchSmoothingLevel != aOther.m_HatchSmoothingLevel ) return false;
107 if( m_HatchSmoothingValue != aOther.m_HatchSmoothingValue ) return false;
108 if( m_HatchBorderAlgorithm != aOther.m_HatchBorderAlgorithm ) return false;
109 if( m_HatchHoleMinArea != aOther.m_HatchHoleMinArea ) return false;
110 if( m_Netcode != aOther.m_Netcode ) return false;
111 if( m_Name != aOther.m_Name ) return false;
112 if( m_ZoneBorderDisplayStyle != aOther.m_ZoneBorderDisplayStyle ) return false;
113 if( m_BorderHatchPitch != aOther.m_BorderHatchPitch ) return false;
114 if( m_ThermalReliefGap != aOther.m_ThermalReliefGap ) return false;
115 if( m_ThermalReliefSpokeWidth != aOther.m_ThermalReliefSpokeWidth ) return false;
116 if( m_padConnection != aOther.m_padConnection ) return false;
117 if( m_cornerSmoothingType != aOther.m_cornerSmoothingType ) return false;
118 if( m_cornerRadius != aOther.m_cornerRadius ) return false;
119 if( m_isRuleArea != aOther.m_isRuleArea ) return false;
120 if( m_placementAreaEnabled != aOther.m_placementAreaEnabled ) return false;
121 if( m_placementAreaSourceType != aOther.m_placementAreaSourceType ) return false;
122 if( m_placementAreaSource != aOther.m_placementAreaSource ) return false;
124 if( m_keepoutDoNotAllowVias != aOther.m_keepoutDoNotAllowVias ) return false;
125 if( m_keepoutDoNotAllowTracks != aOther.m_keepoutDoNotAllowTracks ) return false;
126 if( m_keepoutDoNotAllowPads != aOther.m_keepoutDoNotAllowPads ) return false;
128 if( m_Locked != aOther.m_Locked ) return false;
129 if( m_removeIslands != aOther.m_removeIslands ) return false;
130 if( m_minIslandArea != aOther.m_minIslandArea ) return false;
131
132 if( !std::equal( std::begin( m_LayerProperties ), std::end( m_LayerProperties ),
133 std::begin( aOther.m_LayerProperties ) ) )
134 return false;
135
136 // Currently, the teardrop area type is not really a ZONE_SETTINGS parameter,
137 // but a ZONE parameter only.
138 // However it can be used in dialogs
139 if( m_TeardropType != aOther.m_TeardropType ) return false;
140
141 if( m_Layers != aOther.m_Layers ) return false;
142
143 return true;
144}
145
146
148{
150 m_FillMode = aSource.GetFillMode();
151 m_ZoneClearance = aSource.GetLocalClearance().value();
154 m_HatchGap = aSource.GetHatchGap();
160 m_Netcode = aSource.GetNetCode();
161 m_Name = aSource.GetZoneName();
169 m_isRuleArea = aSource.GetIsRuleArea();
178 m_Locked = aSource.IsLocked();
182
183 // Currently, the teardrop area type is not really a ZONE_SETTINGS parameter,
184 // but a ZONE parameter only.
185 // However it can be used in dialogs
187
188 m_Layers = aSource.GetLayerSet();
189
190 return *this;
191}
192
193
194void ZONE_SETTINGS::ExportSetting( ZONE& aTarget, bool aFullExport ) const
195{
196 aTarget.SetFillMode( m_FillMode );
200 aTarget.SetHatchGap( m_HatchGap );
211 aTarget.SetIsRuleArea( GetIsRuleArea() );
220 aTarget.SetLocked( m_Locked );
223 // Currently, the teardrop area type is not imported from a ZONE_SETTINGS, because
224 // it is not really a ZONE_SETTINGS parameter, but a ZONE parameter only
225#if 0
227#endif
228
229
230 if( aFullExport )
231 {
233
235 aTarget.SetLayerSet( m_Layers );
236
237 aTarget.SetZoneName( m_Name );
238
239 if( !m_isRuleArea )
240 aTarget.SetNetCode( m_Netcode );
241 }
242
243 // call SetBorderDisplayStyle last, because hatch lines will be rebuilt,
244 // using new parameters values
246 m_BorderHatchPitch, true );
247}
248
249void ZONE_SETTINGS::CopyFrom( const ZONE_SETTINGS& aOther, bool aCopyFull )
250{
252 m_FillMode = aOther.m_FillMode;
256 m_HatchGap = aOther.m_HatchGap;
262 m_Netcode = aOther.m_Netcode;
263 m_Name = aOther.m_Name;
271 m_isRuleArea = aOther.m_isRuleArea;
280 m_Locked = aOther.m_Locked;
284
285 if( aCopyFull )
286 {
288 m_Layers = aOther.m_Layers;
289 }
290}
291
292
294{
295 if( aRadius < 0 )
296 m_cornerRadius = 0;
297 else
298 m_cornerRadius = aRadius;
299}
300
301
302#ifdef __WXOSX_MAC__
303const static wxSize LAYER_BITMAP_SIZE( 28, 28 ); // wxCocoa impl unhappy if this isn't square...
304#else
305const static wxSize LAYER_BITMAP_SIZE( 24, 16 );
306#endif
307
308const static wxSize CHECKERBOARD_SIZE( 8, 8 );
309
310
312{
313 static ZONE_SETTINGS defaultSettings;
314
315 return defaultSettings;
316}
317
318
319// A helper for setting up a dialog list for specifying zone layers. Used by all three
320// zone settings dialogs.
321void ZONE_SETTINGS::SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME* aFrame, LSET aLayers )
322{
323 BOARD* board = aFrame->GetBoard();
324 COLOR4D backgroundColor = aFrame->GetColorSettings()->GetColor( LAYER_PCB_BACKGROUND );
325
326 wxDataViewColumn* checkColumn = aList->AppendToggleColumn( wxEmptyString, wxDATAVIEW_CELL_ACTIVATABLE,
327 wxCOL_WIDTH_DEFAULT, wxALIGN_CENTER );
328
329 wxDataViewColumn* layerColumn = aList->AppendIconTextColumn( wxEmptyString );
330 wxDataViewColumn* layerIDColumn = aList->AppendTextColumn( wxEmptyString );
331 layerIDColumn->SetHidden( true );
332
333 int textWidth = 0;
334
335 for( PCB_LAYER_ID layerID : aLayers.UIOrder() )
336 {
337 wxString layerName = board->GetLayerName( layerID );
338
339 // wxCOL_WIDTH_AUTOSIZE doesn't work on all platforms, so we calculate width here
340 textWidth = std::max( textWidth, KIUI::GetTextSize( layerName, aList ).x );
341
342 COLOR4D layerColor = aFrame->GetColorSettings()->GetColor( layerID );
343 auto bitmap = COLOR_SWATCH::MakeBitmap( layerColor, backgroundColor, LAYER_BITMAP_SIZE,
344 CHECKERBOARD_SIZE, aList->GetBackgroundColour() );
345 wxIcon icon;
346 icon.CopyFromBitmap( bitmap );
347
348 wxVector<wxVariant> row;
349 row.push_back( wxVariant( m_Layers.test( layerID ) ) );
350 row.push_back( wxVariant( wxDataViewIconText( layerName, icon ) ) );
351 row.push_back( wxVariant( wxString::Format( wxT( "%i" ), layerID ) ) );
352 aList->AppendItem( row );
353
354 if( m_Layers.test( layerID ) )
355 aList->SetToggleValue( true, (unsigned) aList->GetItemCount() - 1, 0 );
356 }
357
358 int checkColSize = aList->FromDIP( 22 );
359 int layerColSize = textWidth + LAYER_BITMAP_SIZE.x + aList->FromDIP( 15 );
360
361 // You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
362 // for the tree expanders... but you'd be wrong. Force indent to 0.
363 aList->SetIndent( 0 );
364
365 checkColumn->SetWidth( checkColSize );
366 layerColumn->SetWidth( layerColSize );
367
368#ifdef __WXMAC__
369 // TODO: something in wxWidgets 3.1.x pads checkbox columns with extra space. (It used to
370 // also be that the width of the column would get set too wide (to 30), but that's patched in
371 // our local wxWidgets fork.)
372 checkColSize += 50;
373#endif
374
375 aList->SetMinClientSize( wxSize( checkColSize + layerColSize, aList->GetMinClientSize().y ) );
376}
377
378
380 m_frame( aFrame ),
381 m_getLayersFunc( getLayers )
382{
383 m_frame->Bind( EDA_EVT_UNITS_CHANGED, &LAYER_PROPERTIES_GRID_TABLE::onUnitsChanged, this );
384}
385
386
391
392
393wxString LAYER_PROPERTIES_GRID_TABLE::GetValue( int aRow, int aCol )
394{
395 VECTOR2I offset = m_items[aRow].second.hatching_offset.value_or( VECTOR2I() );
396
397 switch( aCol )
398 {
399 case 1: return m_frame->StringFromValue( offset.x, true );
400 case 2: return m_frame->StringFromValue( offset.y, true );
401
402 default:
403 // we can't assert here because wxWidgets sometimes calls this without checking
404 // the column type when trying to see if there's an overflow
405 return wxT( "bad wxWidgets!" );
406 }
407}
408
409
410void LAYER_PROPERTIES_GRID_TABLE::SetValue( int aRow, int aCol, const wxString& aValue )
411{
412 VECTOR2I offset = m_items[aRow].second.hatching_offset.value_or( VECTOR2I() );
413
414 switch( aCol )
415 {
416 case 1: offset.x = m_frame->ValueFromString( aValue ); break;
417 case 2: offset.y = m_frame->ValueFromString( aValue ); break;
418 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); break;
419 }
420
421 m_items[aRow].second.hatching_offset = offset;
422}
423
424
426{
427 switch( aCol )
428 {
429 case 0: return m_items[aRow].first;
430 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); return -1;
431 }
432}
433
434
435void LAYER_PROPERTIES_GRID_TABLE::SetValueAsLong( int aRow, int aCol, long aValue )
436{
437 switch( aCol )
438 {
439 case 0: m_items[aRow].first = ToLAYER_ID( (int) aValue ); break;
440 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); break;
441 }
442}
443
444
446{
447 m_items.emplace_back( std::make_pair( aLayer, aProps ) );
448
449 if( GetView() )
450 {
451 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
452 GetView()->ProcessTableMessage( msg );
453 }
454}
455
456
458{
460
461 auto contains =
462 [&]( PCB_LAYER_ID candidate )
463 {
464 for( const auto& [l, props] : m_items )
465 {
466 if( candidate == l )
467 return true;
468 }
469
470 return false;
471 };
472
473 for( PCB_LAYER_ID layer : m_getLayersFunc().UIOrder() )
474 {
475 if( !contains( layer ) )
476 {
477 next = layer;
478 break;
479 }
480 }
481
482 if( next == UNDEFINED_LAYER )
483 return false;
484
485 AddItem( next, ZONE_LAYER_PROPERTIES( { VECTOR2I( 0, 0 ) } ) );
486
487 return true;
488}
489
490
491bool LAYER_PROPERTIES_GRID_TABLE::DeleteRows( size_t aPos, size_t aNumRows )
492{
493 // aPos may be a large positive, e.g. size_t(-1), and the sum of
494 // aPos+aNumRows may wrap here, so both ends of the range are tested.
495 if( aPos < m_items.size() && aPos + aNumRows <= m_items.size() )
496 {
497 m_items.erase( m_items.begin() + (int) aPos, m_items.begin() + (int) aPos + (int) aNumRows );
498
499 if( GetView() )
500 {
501 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, (int) aPos, (int) aNumRows );
502 GetView()->ProcessTableMessage( msg );
503 }
504
505 return true;
506 }
507
508 return false;
509}
510
511
513{
514 if( GetView() )
515 GetView()->ForceRefresh();
516
517 aEvent.Skip();
518}
519
520
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:328
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:728
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)
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:73
void SetHatchThickness(int aThickness)
Definition zone.h:316
void SetHatchBorderAlgorithm(int aAlgo)
Definition zone.h:334
void SetDoNotAllowPads(bool aEnable)
Definition zone.h:738
void SetLayerProperties(const std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > &aOther)
Definition zone.cpp:592
int GetHatchBorderAlgorithm() const
Definition zone.h:333
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
Definition zone.h:719
std::optional< int > GetLocalClearance() const override
Definition zone.cpp:846
void SetLocalClearance(std::optional< int > aClearance)
Definition zone.h:186
bool GetDoNotAllowVias() const
Definition zone.h:730
void SetCornerRadius(unsigned int aRadius)
Definition zone.cpp:703
ZONE_LAYER_PROPERTIES & LayerProperties(PCB_LAYER_ID aLayer)
Definition zone.h:149
void SetCornerSmoothingType(int aType)
Definition zone.h:658
wxString GetPlacementAreaSource() const
Definition zone.h:724
void SetBorderDisplayStyle(ZONE_BORDER_DISPLAY_STYLE aBorderHatchStyle, int aBorderHatchPitch, bool aRebuilBorderdHatch)
Set all hatch parameters for the zone.
Definition zone.cpp:1274
bool GetDoNotAllowPads() const
Definition zone.h:732
void SetMinThickness(int aMinThickness)
Definition zone.h:307
void SetPlacementAreaSource(const wxString &aSource)
Definition zone.h:725
PLACEMENT_SOURCE_T GetPlacementAreaSourceType() const
Definition zone.h:726
bool GetDoNotAllowTracks() const
Definition zone.h:731
void SetHatchOrientation(const EDA_ANGLE &aStep)
Definition zone.h:322
void SetHatchSmoothingValue(double aValue)
Definition zone.h:328
void SetHatchSmoothingLevel(int aLevel)
Definition zone.h:325
void SetThermalReliefSpokeWidth(int aThermalReliefSpokeWidth)
Definition zone.h:237
void SetPlacementAreaSourceType(PLACEMENT_SOURCE_T aType)
Definition zone.h:727
ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
Definition zone.h:741
long long int GetMinIslandArea() const
Definition zone.h:744
void SetIsRuleArea(bool aEnable)
Definition zone.h:720
void SetDoNotAllowTracks(bool aEnable)
Definition zone.h:737
const wxString & GetZoneName() const
Definition zone.h:163
int GetMinThickness() const
Definition zone.h:306
void SetFillMode(ZONE_FILL_MODE aFillMode)
Definition zone.h:223
ZONE_CONNECTION GetPadConnection() const
Definition zone.h:303
int GetHatchThickness() const
Definition zone.h:315
double GetHatchHoleMinArea() const
Definition zone.h:330
void SetLayerSet(const LSET &aLayerSet) override
Definition zone.cpp:556
bool GetPlacementAreaEnabled() const
Definition zone.h:721
void SetDoNotAllowVias(bool aEnable)
Definition zone.h:736
int GetThermalReliefSpokeWidth() const
Definition zone.h:245
int GetBorderHatchPitch() const
HatchBorder related methods.
Definition zone.h:754
ZONE_BORDER_DISPLAY_STYLE GetHatchStyle() const
Definition zone.h:594
void SetThermalReliefGap(int aThermalReliefGap)
Definition zone.h:226
EDA_ANGLE GetHatchOrientation() const
Definition zone.h:321
bool GetDoNotAllowFootprints() const
Definition zone.h:733
ZONE_FILL_MODE GetFillMode() const
Definition zone.h:224
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:739
int GetHatchGap() const
Definition zone.h:318
void SetHatchHoleMinArea(double aPct)
Definition zone.h:331
TEARDROP_TYPE GetTeardropAreaType() const
Definition zone.h:705
double GetHatchSmoothingValue() const
Definition zone.h:327
bool GetDoNotAllowZoneFills() const
Definition zone.h:729
int GetHatchSmoothingLevel() const
Definition zone.h:324
unsigned int GetCornerRadius() const
Definition zone.h:664
int GetCornerSmoothingType() const
Definition zone.h:660
void SetDoNotAllowZoneFills(bool aEnable)
Definition zone.h:735
void SetAssignedPriority(unsigned aPriority)
Definition zone.h:120
void SetPadConnection(ZONE_CONNECTION aPadConnection)
Definition zone.h:304
void SetZoneName(const wxString &aName)
Definition zone.h:164
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:700
void SetIslandRemovalMode(ISLAND_REMOVAL_MODE aRemove)
Definition zone.h:742
void SetMinIslandArea(long long int aArea)
Definition zone.h:745
int GetThermalReliefGap() const
Definition zone.h:234
void SetHatchGap(int aStep)
Definition zone.h:319
void SetPlacementAreaEnabled(bool aEnabled)
Definition zone.h:722
unsigned GetAssignedPriority() const
Definition zone.h:125
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: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:32
@ THERMAL
Use thermal relief for pads.
Definition zones.h:50
#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