KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_zone_manager.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) 2023 Ethan Chien <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#include <memory>
26#include <optional>
27#include <wx/dataview.h>
28#include <wx/debug.h>
29#include <wx/event.h>
30#include <wx/gdicmn.h>
31#include <wx/wupdlock.h>
32#include <pcb_edit_frame.h>
33#include <wx/string.h>
34#include <board_commit.h>
37#include <zone.h>
38#include <zone_settings_bag.h>
39#include <board.h>
40#include <bitmaps.h>
41#include <string_utils.h>
42#include <zone_filler.h>
43#include <zone_utils.h>
44
48#include "dialog_zone_manager.h"
49
50
52 DIALOG_ZONE_MANAGER_BASE( aParent ),
53 m_pcbFrame( aParent ),
54 m_zoneSettingsBag( aParent->GetBoard() ),
56 m_isFillingZones( false ),
57 m_zoneFillComplete( false )
58{
59#ifdef __APPLE__
60 m_sizerZoneOP->InsertSpacer( m_sizerZoneOP->GetItemCount(), 5 );
61#endif
62
63 m_btnMoveTop->SetBitmap( KiBitmapBundle( BITMAPS::small_top ) );
64 m_btnMoveUp->SetBitmap( KiBitmapBundle( BITMAPS::small_up ) );
65 m_btnMoveDown->SetBitmap( KiBitmapBundle( BITMAPS::small_down ) );
66 m_btnMoveBottom->SetBitmap( KiBitmapBundle( BITMAPS::small_bottom ) );
67 m_btnAutoAssign->SetBitmap( KiBitmapBundle( BITMAPS::small_sort_desc ) );
68
69 m_panelZoneProperties = new PANEL_ZONE_PROPERTIES( m_zonePanel, aParent, m_zoneSettingsBag );
70 m_sizerProperties->Add( m_panelZoneProperties, 0, wxEXPAND, 5 );
71
72 m_zonePreviewNotebook = new ZONE_PREVIEW_NOTEBOOK( m_zonePanel, aParent );
73 m_sizerPreview->Add( m_zonePreviewNotebook, 1, wxBOTTOM | wxLEFT | wxRIGHT | wxEXPAND, 5 );
74
75 for( const auto& [k, v] : MODEL_ZONES_OVERVIEW::GetColumnNames() )
76 {
78 m_viewZonesOverview->AppendIconTextColumn( v, k, wxDATAVIEW_CELL_INERT, 140 );
79 else
80 m_viewZonesOverview->AppendTextColumn( v, k, wxDATAVIEW_CELL_INERT, 160 );
81 }
82
83 m_modelZonesOverview = new MODEL_ZONES_OVERVIEW( this, m_pcbFrame, m_zoneSettingsBag );
84 m_viewZonesOverview->AssociateModel( m_modelZonesOverview.get() );
85 m_viewZonesOverview->SetLayoutDirection( wxLayout_LeftToRight );
86
87#if wxUSE_DRAG_AND_DROP
88 m_viewZonesOverview->EnableDragSource( wxDF_UNICODETEXT );
89 m_viewZonesOverview->EnableDropTarget( wxDF_UNICODETEXT );
90
91 int id = m_viewZonesOverview->GetId();
92 Bind( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, &DIALOG_ZONE_MANAGER::OnBeginDrag, this, id );
93 Bind( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, &DIALOG_ZONE_MANAGER::OnDropPossible, this, id );
94 Bind( wxEVT_DATAVIEW_ITEM_DROP, &DIALOG_ZONE_MANAGER::OnDrop, this, id );
95#endif // wxUSE_DRAG_AND_DROP
96
97 Bind( EVT_ZONE_NAME_UPDATE, &DIALOG_ZONE_MANAGER::OnZoneNameUpdate, this );
98 Bind( EVT_ZONE_NET_UPDATE, &DIALOG_ZONE_MANAGER::OnZoneNetUpdate, this );
99 Bind( EVT_ZONES_OVERVIEW_COUNT_CHANGE, &DIALOG_ZONE_MANAGER::OnZonesTableRowCountChange, this );
100 Bind( wxEVT_CHECKBOX, &DIALOG_ZONE_MANAGER::OnCheckBoxClicked, this );
101 Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
102 Bind( wxEVT_CHAR_HOOK, &DIALOG_ZONE_MANAGER::OnDialogCharHook, this );
103 Bind( wxEVT_BOOKCTRL_PAGE_CHANGED,
104 [this]( wxNotebookEvent& aEvent )
105 {
106 Layout();
107 },
108 m_zonePreviewNotebook->GetId() );
109
110 Layout();
111 m_MainBoxSizer->Fit( this );
112 finishDialogSettings();
113}
114
115
117
118
120{
121 m_layerFilter->Clear();
122 m_layerFilter->Append( _( "All Layers" ) );
123
124 LSET usedLayers;
125 BOARD* board = m_pcbFrame->GetBoard();
126
127 for( ZONE* zone : m_zoneSettingsBag.GetClonedZoneList() )
128 usedLayers |= zone->GetLayerSet();
129
130 for( PCB_LAYER_ID layer : usedLayers.Seq() )
131 {
132 m_layerFilter->Append( board->GetLayerName( layer ),
133 reinterpret_cast<void*>( static_cast<intptr_t>( layer ) ) );
134 }
135
136 m_modelZonesOverview->SetLayerFilter( UNDEFINED_LAYER );
137 m_layerFilter->SetSelection( 0 );
138
139 m_modelZonesOverview->ApplyFilter( m_filterCtrl->GetValue(), m_viewZonesOverview->GetSelection() );
140
141 if( m_modelZonesOverview->GetCount() )
143
144 return true;
145}
146
147
148void DIALOG_ZONE_MANAGER::PostProcessZoneViewSelChange( wxDataViewItem const& aItem )
149{
150 bool textCtrlHasFocus = m_filterCtrl->HasFocus();
151 long filterInsertPos = m_filterCtrl->GetInsertionPoint();
152
153 if( aItem.IsOk() )
154 {
155 m_viewZonesOverview->Select( aItem );
156 m_viewZonesOverview->EnsureVisible( aItem );
157 SelectZoneTableItem( aItem );
158 }
159 else
160 {
161 if( m_modelZonesOverview->GetCount() )
162 {
163 wxDataViewItem first_item = m_modelZonesOverview->GetItem( 0 );
164 m_viewZonesOverview->Select( first_item );
165 m_viewZonesOverview->EnsureVisible( first_item );
166 m_zonePreviewNotebook->OnZoneSelectionChanged( m_modelZonesOverview->GetZone( first_item ) );
167 }
168 else
169 {
170 m_zonePreviewNotebook->OnZoneSelectionChanged( nullptr );
171 }
172 }
173
174 if( textCtrlHasFocus )
175 {
176 m_filterCtrl->SetFocus();
177 m_filterCtrl->SetInsertionPoint( filterInsertPos );
178 }
179}
180
181
183{
184 aEvent.Skip();
185}
186
187
189{
190 if( aEvent.GetKeyCode() == WXK_UP )
191 {
193 }
194 else if( aEvent.GetKeyCode() == WXK_DOWN )
195 {
197 }
198 else
199 {
200 aEvent.Skip();
201 }
202}
203
204
206{
207 unsigned count = m_modelZonesOverview->GetCount();
208
209 if( count == 0 )
210 return;
211
212 wxDataViewItem current = m_viewZonesOverview->GetSelection();
213 unsigned currentRow = 0;
214
215 if( current.IsOk() )
216 currentRow = m_modelZonesOverview->GetRow( current );
217
218 int newRow = (int) currentRow + aDirection;
219 newRow = std::max( 0, std::min( newRow, (int) count - 1 ) );
220
221 if( !current.IsOk() || (unsigned) newRow != currentRow )
222 PostProcessZoneViewSelChange( m_modelZonesOverview->GetItem( (unsigned) newRow ) );
223}
224
225
226void DIALOG_ZONE_MANAGER::OnTableChar( wxKeyEvent& aEvent )
227{
228 GenericProcessChar( aEvent );
229}
230
231
232void DIALOG_ZONE_MANAGER::OnTableCharHook( wxKeyEvent& aEvent )
233{
234 GenericProcessChar( aEvent );
235}
236
237
238void DIALOG_ZONE_MANAGER::OnIdle( wxIdleEvent& aEvent )
239{
240 WXUNUSED( aEvent )
241 m_viewZonesOverview->SetFocus();
242 Unbind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
243}
244
245
246void DIALOG_ZONE_MANAGER::onDialogResize( wxSizeEvent& event )
247{
248 event.Skip();
249}
250
251
253{
254 wxWindowUpdateLocker updateLock( this );
255
256 m_panelZoneProperties->SetZone( zone );
257 m_zonePreviewNotebook->OnZoneSelectionChanged( zone );
258
259 Layout();
260}
261
262
264{
265 Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
266}
267
268
270{
271 SelectZoneTableItem( aEvent.GetItem() );
272}
273
274
275void DIALOG_ZONE_MANAGER::SelectZoneTableItem( wxDataViewItem const& aItem )
276{
277 ZONE* zone = m_modelZonesOverview->GetZone( aItem );
278
279 if( !zone )
280 return;
281
283}
284
285
286void DIALOG_ZONE_MANAGER::OnOk( wxCommandEvent& aEvt )
287{
288 m_panelZoneProperties->TransferZoneSettingsFromWindow();
289
290 m_zoneSettingsBag.UpdateClonedZones();
291
292 for( const auto& [ zone, zoneClone ] : m_zoneSettingsBag.GetZonesCloneMap() )
293 {
294 std::map<PCB_LAYER_ID, std::shared_ptr<SHAPE_POLY_SET>> filled_zone_to_restore;
295 ZONE* internal_zone = zone; // Duplicate the zone pointer to allow capture on older MacOS (13)
296
297 zone->GetLayerSet().RunOnLayers(
298 [&]( PCB_LAYER_ID layer )
299 {
300 std::shared_ptr<SHAPE_POLY_SET> fill = internal_zone->GetFilledPolysList( layer );
301
302 if( fill )
303 filled_zone_to_restore[layer] = fill;
304 } );
305
306 *zone = *zoneClone;
307
308 for( const auto& [ layer, fill ] : filled_zone_to_restore )
309 zone->SetFilledPolysList( layer, *fill );
310 }
311
312 aEvt.Skip();
313}
314
315
316#if wxUSE_DRAG_AND_DROP
317
318void DIALOG_ZONE_MANAGER::OnBeginDrag( wxDataViewEvent& aEvent )
319{
320 wxTextDataObject* obj = new wxTextDataObject;
321 obj->SetText( "42" ); //FIXME - Workaround for drop on GTK
322 aEvent.SetDataObject( obj );
323 aEvent.SetDragFlags( wxDrag_AllowMove );
324 const wxDataViewItem it = aEvent.GetItem();
325
326 if( it.IsOk() )
328}
329
330
331void DIALOG_ZONE_MANAGER::OnDropPossible( wxDataViewEvent& aEvent )
332{
333 aEvent.SetDropEffect( wxDragMove ); // check 'move' drop effect
334}
335
336
337void DIALOG_ZONE_MANAGER::OnDrop( wxDataViewEvent& aEvent )
338{
339 if( aEvent.GetDataFormat() != wxDF_UNICODETEXT )
340 {
341 aEvent.Veto();
342 return;
343 }
344
345 if( !m_priorityDragIndex.has_value() )
346 return;
347
348 const wxDataViewItem it = aEvent.GetItem();
349
350 if( !it.IsOk() )
351 {
352 aEvent.Veto();
353 return;
354 }
355
356 unsigned int drop_index = m_modelZonesOverview->GetRow( it );
357 const std::optional<unsigned> rtn = m_modelZonesOverview->SwapZonePriority( *m_priorityDragIndex, drop_index );
358
359 if( rtn.has_value() )
360 {
361 const wxDataViewItem item = m_modelZonesOverview->GetItem( *rtn );
362
363 if( item.IsOk() )
364 m_viewZonesOverview->Select( item );
365 }
366}
367
368#endif // wxUSE_DRAG_AND_DROP
369
370
375
376
381
382
387
388
393
394
395void DIALOG_ZONE_MANAGER::OnAutoAssignClick( wxCommandEvent& aEvent )
396{
397 BOARD* board = m_pcbFrame->GetBoard();
398
399 // Save original priorities so we can restore them after copying to clones.
400 // The dialog operates on clones; originals must stay untouched until OnOk.
401 std::unordered_map<ZONE*, unsigned> savedPriorities;
402
403 for( ZONE* zone : board->Zones() )
404 savedPriorities[zone] = zone->GetAssignedPriority();
405
406 if( AutoAssignZonePriorities( board ) )
407 {
408 for( auto& [original, clone] : m_zoneSettingsBag.GetZonesCloneMap() )
409 {
410 unsigned newPri = original->GetAssignedPriority();
411 clone->SetAssignedPriority( newPri );
412 m_zoneSettingsBag.SetZonePriority( clone.get(), newPri );
413 }
414
416 m_modelZonesOverview->ApplyFilter( m_filterCtrl->GetValue(),
417 m_viewZonesOverview->GetSelection() ) );
418 }
419
420 for( auto& [zone, priority] : savedPriorities )
421 zone->SetAssignedPriority( priority );
422}
423
424
425void DIALOG_ZONE_MANAGER::OnFilterCtrlCancel( wxCommandEvent& aEvent )
426{
428 aEvent.Skip();
429}
430
431
432void DIALOG_ZONE_MANAGER::OnFilterCtrlSearch( wxCommandEvent& aEvent )
433{
434 PostProcessZoneViewSelChange( m_modelZonesOverview->ApplyFilter( aEvent.GetString(),
435 m_viewZonesOverview->GetSelection() ) );
436 aEvent.Skip();
437}
438
439
441{
442 PostProcessZoneViewSelChange( m_modelZonesOverview->ApplyFilter( aEvent.GetString(),
443 m_viewZonesOverview->GetSelection() ) );
444 aEvent.Skip();
445}
446
447
448void DIALOG_ZONE_MANAGER::OnFilterCtrlEnter( wxCommandEvent& aEvent )
449{
450 PostProcessZoneViewSelChange( m_modelZonesOverview->ApplyFilter( aEvent.GetString(),
451 m_viewZonesOverview->GetSelection() ) );
452 aEvent.Skip();
453}
454
455
456void DIALOG_ZONE_MANAGER::OnLayerFilterChanged( wxCommandEvent& aEvent )
457{
458 int sel = m_layerFilter->GetSelection();
459
460 if( sel <= 0 )
461 {
462 m_modelZonesOverview->SetLayerFilter( UNDEFINED_LAYER );
463 }
464 else
465 {
466 void* data = m_layerFilter->GetClientData( sel );
467 PCB_LAYER_ID layer = static_cast<PCB_LAYER_ID>( reinterpret_cast<intptr_t>( data ) );
468 m_modelZonesOverview->SetLayerFilter( layer );
469 }
470
472 m_modelZonesOverview->ApplyFilter( m_filterCtrl->GetValue(),
473 m_viewZonesOverview->GetSelection() ) );
474}
475
476
478{
479 if( m_isFillingZones )
480 return;
481
482 m_isFillingZones = true;
483
484 if( !m_panelZoneProperties->TransferZoneSettingsFromWindow() )
485 {
486 m_isFillingZones = false;
487 return;
488 }
489
490 m_zoneSettingsBag.UpdateClonedZones();
491
492 BOARD* board = m_pcbFrame->GetBoard();
493 board->IncrementTimeStamp();
494
495 // Save the original zones before swapping so we can restore them later
496 ZONES originalZones = board->Zones();
497
498 // Do not use a commit here since we're operating on cloned zones that are not owned by the
499 // board. Using a commit would create undo entries pointing to the clones, which would cause
500 // corruption when the commit is destroyed.
501 m_filler = std::make_unique<ZONE_FILLER>( board, nullptr );
502 auto reporter = std::make_unique<WX_PROGRESS_REPORTER>( this, _( "Fill All Zones" ), 5, PR_CAN_ABORT );
503 m_filler->SetProgressReporter( reporter.get() );
504
505 // TODO: replace these const_cast calls with a different solution that avoids mutating the
506 // container of the board. This is relatively safe as-is because the original zones list is
507 // swapped back in below, but still should be changed to avoid invalidating the board state
508 // in case this code is refactored to be a non-modal dialog in the future.
509 const_cast<ZONES&>( board->Zones() ) = m_zoneSettingsBag.GetClonedZoneList();
510
511 m_zoneFillComplete = m_filler->Fill( board->Zones() );
512 board->BuildConnectivity();
513
514 m_zonePreviewNotebook->OnZoneSelectionChanged( m_panelZoneProperties->GetZone() );
515
516 // Restore the original zones. The connectivity MUST be rebuilt to remove stale pointers to
517 // cloned zones in case of a cancel.
518 const_cast<ZONES&>( board->Zones() ) = originalZones;
519 board->BuildConnectivity();
520
521 m_isFillingZones = false;
522}
523
524
525void DIALOG_ZONE_MANAGER::OnZoneNameUpdate( wxCommandEvent& aEvent )
526{
527 if( ZONE* zone = m_panelZoneProperties->GetZone() )
528 m_modelZonesOverview->RowChanged( m_modelZonesOverview->GetRow( m_modelZonesOverview->GetItemByZone( zone ) ) );
529}
530
531
532void DIALOG_ZONE_MANAGER::OnZoneNetUpdate( wxCommandEvent& aEvent )
533{
534 if( ZONE* zone = m_panelZoneProperties->GetZone() )
535 m_modelZonesOverview->RowChanged( m_modelZonesOverview->GetRow( m_modelZonesOverview->GetItemByZone( zone ) ) );
536}
537
538
540{
541 unsigned count = aEvent.GetInt();
542
545 {
546 btn->Enable( count > 1 );
547 }
548}
549
550
551void DIALOG_ZONE_MANAGER::OnCheckBoxClicked( wxCommandEvent& aEvent )
552{
553 const wxObject* sender = aEvent.GetEventObject();
554
555 if( aEvent.GetEventObject() == m_checkName )
556 m_modelZonesOverview->EnableFitterByName( aEvent.IsChecked() );
557 else if( aEvent.GetEventObject() == m_checkNet )
558 m_modelZonesOverview->EnableFitterByNet( aEvent.IsChecked() );
559
560 if( ( sender == m_checkName || sender == m_checkNet ) && !m_filterCtrl->IsEmpty() )
561 m_modelZonesOverview->ApplyFilter( m_filterCtrl->GetValue(), m_viewZonesOverview->GetSelection() );
562}
563
564
566{
567 if( !m_viewZonesOverview->HasSelection() )
568 return;
569
570 const wxDataViewItem selectedItem = m_viewZonesOverview->GetSelection();
571
572 if( !selectedItem.IsOk() )
573 return;
574
575 const unsigned int selectedRow = m_modelZonesOverview->GetRow( selectedItem );
576 const std::optional<unsigned> new_index = m_modelZonesOverview->MoveZoneIndex( selectedRow, aMove );
577
578 if( new_index.has_value() )
579 {
580 wxDataViewItem new_item = m_modelZonesOverview->GetItem( *new_index );
582 }
583}
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Definition bitmap.cpp:110
@ small_sort_desc
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:323
const ZONES & Zones() const
Definition board.h:368
bool BuildConnectivity(PROGRESS_REPORTER *aReporter=nullptr)
Build or rebuild the board connectivity database for the board, especially the list of connected item...
Definition board.cpp:195
void IncrementTimeStamp()
Definition board.cpp:266
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition board.cpp:737
DIALOG_ZONE_MANAGER_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Zone Manager"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void OnZoneNameUpdate(wxCommandEvent &aEvent)
void OnViewZonesOverviewOnLeftUp(wxMouseEvent &aEvent) override
~DIALOG_ZONE_MANAGER() override
void GenericProcessChar(wxKeyEvent &event)
PCB_BASE_FRAME * m_pcbFrame
wxObjectDataPtr< MODEL_ZONES_OVERVIEW > m_modelZonesOverview
PANEL_ZONE_PROPERTIES * m_panelZoneProperties
void OnMoveDownClick(wxCommandEvent &aEvent) override
void PostProcessZoneViewSelChange(wxDataViewItem const &aItem)
std::unique_ptr< ZONE_FILLER > m_filler
void OnMoveTopClick(wxCommandEvent &aEvent) override
void OnTableChar(wxKeyEvent &event) override
void onDialogResize(wxSizeEvent &event) override
void OnMoveUpClick(wxCommandEvent &aEvent) override
void OnDialogCharHook(wxKeyEvent &aEvent)
void OnUpdateDisplayedZonesClick(wxCommandEvent &aEvent) override
void MoveSelectedZonePriority(ZONE_INDEX_MOVEMENT aMove)
ZONE_SETTINGS_BAG m_zoneSettingsBag
void OnDataViewCtrlSelectionChanged(wxDataViewEvent &event) override
std::optional< unsigned > m_priorityDragIndex
void OnTableCharHook(wxKeyEvent &event) override
void OnIdle(wxIdleEvent &aEvent)
void OnZoneNetUpdate(wxCommandEvent &aEvent)
void OnCheckBoxClicked(wxCommandEvent &aEvent)
void OnFilterCtrlTextChange(wxCommandEvent &aEvent) override
void NavigateZoneSelection(int aDirection)
bool TransferDataToWindow() override
ZONE_PREVIEW_NOTEBOOK * m_zonePreviewNotebook
void SelectZoneTableItem(wxDataViewItem const &aItem)
void OnOk(wxCommandEvent &aEvt) override
void OnFilterCtrlCancel(wxCommandEvent &aEvent) override
void OnFilterCtrlEnter(wxCommandEvent &aEvent) override
void OnMoveBottomClick(wxCommandEvent &aEvent) override
void OnZoneSelectionChanged(ZONE *aZone)
DIALOG_ZONE_MANAGER(PCB_BASE_FRAME *aParent)
void OnZonesTableRowCountChange(wxCommandEvent &aEvent)
void OnLayerFilterChanged(wxCommandEvent &aEvent) override
void OnFilterCtrlSearch(wxCommandEvent &aEvent) override
void OnAutoAssignClick(wxCommandEvent &aEvent) override
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
void RunOnLayers(const std::function< void(PCB_LAYER_ID)> &aFunction) const
Execute a function on each layer of the LSET.
Definition lset.h:263
LSEQ Seq(const LSEQ &aSequence) const
Return an LSEQ from the union of this LSET and a desired sequence.
Definition lset.cpp:313
static std::map< int, wxString > GetColumnNames()
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
A bitmap button widget that behaves like a standard dialog button except with an icon.
Handle a list of polygons defining a copper zone.
Definition zone.h:74
std::shared_ptr< SHAPE_POLY_SET > GetFilledPolysList(PCB_LAYER_ID aLayer) const
Definition zone.h:602
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
Definition zone.h:137
#define _(s)
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:60
@ UNDEFINED_LAYER
Definition layer_ids.h:61
ZONE_INDEX_MOVEMENT
std::vector< ZONE * > ZONES
#define PR_CAN_ABORT
bool AutoAssignZonePriorities(BOARD *aBoard, PROGRESS_REPORTER *aReporter)
Automatically assign zone priorities based on connectivity analysis of overlapping regions.