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
224
227 aTarget.SetIsRuleArea( GetIsRuleArea() );
236 aTarget.SetLocked( m_Locked );
239
240 // Currently, the teardrop area type is not imported from a ZONE_SETTINGS, because
241 // it is not really a ZONE_SETTINGS parameter, but a ZONE parameter only
242#if 0
244#endif
245
246 if( aFullExport )
247 {
249
251 aTarget.SetLayerSet( m_Layers );
252
253 aTarget.SetZoneName( m_Name );
254
256 aTarget.SetNetCode( 0 );
257 else if( !m_isRuleArea )
258 aTarget.SetNetCode( m_Netcode );
259 }
260
261 // call SetBorderDisplayStyle last, because hatch lines will be rebuilt,
262 // using new parameters values
264}
265
267{
268 if( aRadius < 0 )
269 m_cornerRadius = 0;
270 else
271 m_cornerRadius = aRadius;
272}
273
274
275#ifdef __WXOSX_MAC__
276const static wxSize LAYER_BITMAP_SIZE( 28, 28 ); // wxCocoa impl unhappy if this isn't square...
277#else
278const static wxSize LAYER_BITMAP_SIZE( 24, 16 );
279#endif
280
281const static wxSize CHECKERBOARD_SIZE( 8, 8 );
282
283
285{
286 static ZONE_SETTINGS defaultSettings;
287
288 return defaultSettings;
289}
290
291
292// A helper for setting up a dialog list for specifying zone layers. Used by all three
293// zone settings dialogs.
294void ZONE_SETTINGS::SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME* aFrame, LSET aLayers )
295{
296 BOARD* board = aFrame->GetBoard();
297 COLOR4D backgroundColor = aFrame->GetColorSettings()->GetColor( LAYER_PCB_BACKGROUND );
298
299 wxDataViewColumn* checkColumn = aList->AppendToggleColumn( wxEmptyString, wxDATAVIEW_CELL_ACTIVATABLE,
300 wxCOL_WIDTH_DEFAULT, wxALIGN_CENTER );
301
302 wxDataViewColumn* layerColumn = aList->AppendIconTextColumn( wxEmptyString );
303 wxDataViewColumn* layerIDColumn = aList->AppendTextColumn( wxEmptyString );
304 layerIDColumn->SetHidden( true );
305
306 int textWidth = 0;
307
308 for( PCB_LAYER_ID layerID : aLayers.UIOrder() )
309 {
310 wxString layerName = board->GetLayerName( layerID );
311
312 // wxCOL_WIDTH_AUTOSIZE doesn't work on all platforms, so we calculate width here
313 textWidth = std::max( textWidth, KIUI::GetTextSize( layerName, aList ).x );
314
315 COLOR4D layerColor = aFrame->GetColorSettings()->GetColor( layerID );
316 auto bitmap = COLOR_SWATCH::MakeBitmap( layerColor, backgroundColor, LAYER_BITMAP_SIZE,
317 CHECKERBOARD_SIZE, aList->GetBackgroundColour() );
318 wxIcon icon;
319 icon.CopyFromBitmap( bitmap );
320
321 wxVector<wxVariant> row;
322 row.push_back( wxVariant( m_Layers.test( layerID ) ) );
323 row.push_back( wxVariant( wxDataViewIconText( layerName, icon ) ) );
324 row.push_back( wxVariant( wxString::Format( wxT( "%i" ), layerID ) ) );
325 aList->AppendItem( row );
326
327 if( m_Layers.test( layerID ) )
328 aList->SetToggleValue( true, (unsigned) aList->GetItemCount() - 1, 0 );
329 }
330
331 int checkColSize = aList->FromDIP( 22 );
332 int layerColSize = textWidth + LAYER_BITMAP_SIZE.x + aList->FromDIP( 15 );
333
334 // You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
335 // for the tree expanders... but you'd be wrong. Force indent to 0.
336 aList->SetIndent( 0 );
337
338 checkColumn->SetWidth( checkColSize );
339 layerColumn->SetWidth( layerColSize );
340
341#ifdef __WXMAC__
342 // TODO: something in wxWidgets 3.1.x pads checkbox columns with extra space. (It used to
343 // also be that the width of the column would get set too wide (to 30), but that's patched in
344 // our local wxWidgets fork.)
345 checkColSize += 50;
346#endif
347
348 aList->SetMinClientSize( wxSize( checkColSize + layerColSize, aList->GetMinClientSize().y ) );
349}
350
351
353 m_frame( aFrame ),
354 m_getLayersFunc( getLayers )
355{
356 m_frame->Bind( EDA_EVT_UNITS_CHANGED, &LAYER_PROPERTIES_GRID_TABLE::onUnitsChanged, this );
357}
358
359
364
365
366wxString LAYER_PROPERTIES_GRID_TABLE::GetValue( int aRow, int aCol )
367{
368 VECTOR2I offset = m_items[aRow].second.hatching_offset.value_or( VECTOR2I() );
369
370 switch( aCol )
371 {
372 case 1: return m_frame->StringFromValue( offset.x, true );
373 case 2: return m_frame->StringFromValue( offset.y, true );
374
375 default:
376 // we can't assert here because wxWidgets sometimes calls this without checking
377 // the column type when trying to see if there's an overflow
378 return wxT( "bad wxWidgets!" );
379 }
380}
381
382
383void LAYER_PROPERTIES_GRID_TABLE::SetValue( int aRow, int aCol, const wxString& aValue )
384{
385 VECTOR2I offset = m_items[aRow].second.hatching_offset.value_or( VECTOR2I() );
386
387 switch( aCol )
388 {
389 case 1: offset.x = m_frame->ValueFromString( aValue ); break;
390 case 2: offset.y = m_frame->ValueFromString( aValue ); break;
391 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); break;
392 }
393
394 m_items[aRow].second.hatching_offset = offset;
395}
396
397
399{
400 switch( aCol )
401 {
402 case 0: return m_items[aRow].first;
403 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); return -1;
404 }
405}
406
407
408void LAYER_PROPERTIES_GRID_TABLE::SetValueAsLong( int aRow, int aCol, long aValue )
409{
410 switch( aCol )
411 {
412 case 0: m_items[aRow].first = ToLAYER_ID( (int) aValue ); break;
413 default: wxFAIL_MSG( wxString::Format( wxT( "column %d isn't a long" ), aCol ) ); break;
414 }
415}
416
417
419{
420 m_items.emplace_back( std::make_pair( aLayer, aProps ) );
421
422 if( GetView() )
423 {
424 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
425 GetView()->ProcessTableMessage( msg );
426 }
427}
428
429
431{
433
434 auto contains =
435 [&]( PCB_LAYER_ID candidate )
436 {
437 for( const auto& [l, props] : m_items )
438 {
439 if( candidate == l )
440 return true;
441 }
442
443 return false;
444 };
445
446 for( PCB_LAYER_ID layer : m_getLayersFunc().UIOrder() )
447 {
448 if( !contains( layer ) )
449 {
450 next = layer;
451 break;
452 }
453 }
454
455 if( next == UNDEFINED_LAYER )
456 return false;
457
458 AddItem( next, ZONE_LAYER_PROPERTIES( { VECTOR2I( 0, 0 ) } ) );
459
460 return true;
461}
462
463
464bool LAYER_PROPERTIES_GRID_TABLE::DeleteRows( size_t aPos, size_t aNumRows )
465{
466 // aPos may be a large positive, e.g. size_t(-1), and the sum of
467 // aPos+aNumRows may wrap here, so both ends of the range are tested.
468 if( aPos < m_items.size() && aPos + aNumRows <= m_items.size() )
469 {
470 m_items.erase( m_items.begin() + (int) aPos, m_items.begin() + (int) aPos + (int) aNumRows );
471
472 if( GetView() )
473 {
474 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, (int) aPos, (int) aNumRows );
475 GetView()->ProcessTableMessage( msg );
476 }
477
478 return true;
479 }
480
481 return false;
482}
483
484
486{
487 if( GetView() )
488 GetView()->ForceRefresh();
489
490 aEvent.Skip();
491}
492
493
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:121
void SetLocked(bool aLocked) override
Definition board_item.h:386
bool IsLocked() const override
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:373
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition board.cpp:802
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 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:832
void SetLayerProperties(const std::map< PCB_LAYER_ID, ZONE_LAYER_PROPERTIES > &aOther)
Definition zone.cpp:686
int GetHatchBorderAlgorithm() const
Definition zone.h:343
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
Definition zone.h:813
std::optional< int > GetLocalClearance() const override
Definition zone.cpp:1012
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:824
void SetCornerRadius(unsigned int aRadius)
Definition zone.cpp:836
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:818
void SetBorderDisplayStyle(ZONE_BORDER_DISPLAY_STYLE aBorderHatchStyle, int aBorderHatchPitch, bool aRebuilBorderdHatch)
Set all hatch parameters for the zone.
Definition zone.cpp:1501
bool GetDoNotAllowPads() const
Definition zone.h:826
void SetMinThickness(int aMinThickness)
Definition zone.h:316
void SetPlacementAreaSource(const wxString &aSource)
Definition zone.h:819
PLACEMENT_SOURCE_T GetPlacementAreaSourceType() const
Definition zone.h:820
bool GetDoNotAllowTracks() const
Definition zone.h:825
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:821
ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
Definition zone.h:835
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:601
long long int GetMinIslandArea() const
Definition zone.h:838
void SetIsRuleArea(bool aEnable)
Definition zone.h:814
void SetDoNotAllowTracks(bool aEnable)
Definition zone.h:831
const wxString & GetZoneName() const
Definition zone.h:160
int GetMinThickness() const
Definition zone.h:315
void SetFillMode(ZONE_FILL_MODE aFillMode)
Definition zone.cpp:625
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:644
bool GetPlacementAreaEnabled() const
Definition zone.h:815
void SetDoNotAllowVias(bool aEnable)
Definition zone.h:830
int GetThermalReliefSpokeWidth() const
Definition zone.h:259
int GetBorderHatchPitch() const
HatchBorder related methods.
Definition zone.h:848
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:827
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:833
int GetHatchGap() const
Definition zone.h:328
void SetHatchHoleMinArea(double aPct)
Definition zone.h:341
TEARDROP_TYPE GetTeardropAreaType() const
Definition zone.h:799
double GetHatchSmoothingValue() const
Definition zone.h:337
bool GetDoNotAllowZoneFills() const
Definition zone.h:823
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:829
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:794
void SetIslandRemovalMode(ISLAND_REMOVAL_MODE aRemove)
Definition zone.h:836
void SetMinIslandArea(long long int aArea)
Definition zone.h:839
int GetThermalReliefGap() const
Definition zone.h:248
void SetHatchGap(int aStep)
Definition zone.h:329
void SetPlacementAreaEnabled(bool aEnabled)
Definition zone.h:816
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