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, 1, 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 m_sizerPreview->Layout();
75
76 for( const auto& [k, v] : MODEL_ZONES_OVERVIEW::GetColumnNames() )
77 {
79 m_viewZonesOverview->AppendIconTextColumn( v, k, wxDATAVIEW_CELL_INERT, 140 );
80 else
81 m_viewZonesOverview->AppendTextColumn( v, k, wxDATAVIEW_CELL_INERT, 160 );
82 }
83
84 m_modelZonesOverview = new MODEL_ZONES_OVERVIEW( this, m_pcbFrame, m_zoneSettingsBag );
85 m_viewZonesOverview->AssociateModel( m_modelZonesOverview.get() );
86 m_viewZonesOverview->SetLayoutDirection( wxLayout_LeftToRight );
87
88#if wxUSE_DRAG_AND_DROP
89 m_viewZonesOverview->EnableDragSource( wxDF_UNICODETEXT );
90 m_viewZonesOverview->EnableDropTarget( wxDF_UNICODETEXT );
91
92 int id = m_viewZonesOverview->GetId();
93 Bind( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, &DIALOG_ZONE_MANAGER::OnBeginDrag, this, id );
94 Bind( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, &DIALOG_ZONE_MANAGER::OnDropPossible, this, id );
95 Bind( wxEVT_DATAVIEW_ITEM_DROP, &DIALOG_ZONE_MANAGER::OnDrop, this, id );
96#endif // wxUSE_DRAG_AND_DROP
97
98 Bind( EVT_ZONE_NAME_UPDATE, &DIALOG_ZONE_MANAGER::OnZoneNameUpdate, this );
99 Bind( EVT_ZONE_NET_UPDATE, &DIALOG_ZONE_MANAGER::OnZoneNetUpdate, this );
100 Bind( EVT_ZONES_OVERVIEW_COUNT_CHANGE, &DIALOG_ZONE_MANAGER::OnZonesTableRowCountChange, this );
101 Bind( wxEVT_CHECKBOX, &DIALOG_ZONE_MANAGER::OnCheckBoxClicked, this );
102 Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
103 Bind( wxEVT_CHAR_HOOK, &DIALOG_ZONE_MANAGER::OnDialogCharHook, this );
104 Bind( wxEVT_BOOKCTRL_PAGE_CHANGED,
105 [this]( wxNotebookEvent& aEvent )
106 {
107 Layout();
108 },
109 m_zonePreviewNotebook->GetId() );
110
111 Layout();
112 m_MainBoxSizer->Fit( this );
113 finishDialogSettings();
114}
115
116
118
119
121{
122 m_layerFilter->Clear();
123 m_layerFilter->Append( _( "All Layers" ) );
124
125 LSET usedLayers;
126 BOARD* board = m_pcbFrame->GetBoard();
127
128 for( ZONE* zone : m_zoneSettingsBag.GetClonedZoneList() )
129 usedLayers |= zone->GetLayerSet();
130
131 for( PCB_LAYER_ID layer : usedLayers.Seq() )
132 {
133 m_layerFilter->Append( board->GetLayerName( layer ),
134 reinterpret_cast<void*>( static_cast<intptr_t>( layer ) ) );
135 }
136
137 m_modelZonesOverview->SetLayerFilter( UNDEFINED_LAYER );
138 m_layerFilter->SetSelection( 0 );
139
140 m_modelZonesOverview->ApplyFilter( m_filterCtrl->GetValue(), m_viewZonesOverview->GetSelection() );
141
142 if( m_modelZonesOverview->GetCount() )
144
145 return true;
146}
147
148
149void DIALOG_ZONE_MANAGER::PostProcessZoneViewSelChange( wxDataViewItem const& aItem )
150{
151 bool textCtrlHasFocus = m_filterCtrl->HasFocus();
152 long filterInsertPos = m_filterCtrl->GetInsertionPoint();
153
154 if( aItem.IsOk() )
155 {
156 m_viewZonesOverview->Select( aItem );
157 m_viewZonesOverview->EnsureVisible( aItem );
158 SelectZoneTableItem( aItem );
159 }
160 else
161 {
162 if( m_modelZonesOverview->GetCount() )
163 {
164 wxDataViewItem first_item = m_modelZonesOverview->GetItem( 0 );
165 m_viewZonesOverview->Select( first_item );
166 m_viewZonesOverview->EnsureVisible( first_item );
167 m_zonePreviewNotebook->OnZoneSelectionChanged( m_modelZonesOverview->GetZone( first_item ) );
168 }
169 else
170 {
171 m_zonePreviewNotebook->OnZoneSelectionChanged( nullptr );
172 }
173 }
174
175 if( textCtrlHasFocus )
176 {
177 m_filterCtrl->SetFocus();
178 m_filterCtrl->SetInsertionPoint( filterInsertPos );
179 }
180}
181
182
184{
185 aEvent.Skip();
186}
187
188
190{
191 if( aEvent.GetKeyCode() == WXK_UP )
192 {
194 }
195 else if( aEvent.GetKeyCode() == WXK_DOWN )
196 {
198 }
199 else
200 {
201 aEvent.Skip();
202 }
203}
204
205
207{
208 unsigned count = m_modelZonesOverview->GetCount();
209
210 if( count == 0 )
211 return;
212
213 wxDataViewItem current = m_viewZonesOverview->GetSelection();
214 unsigned currentRow = 0;
215
216 if( current.IsOk() )
217 currentRow = m_modelZonesOverview->GetRow( current );
218
219 int newRow = (int) currentRow + aDirection;
220 newRow = std::max( 0, std::min( newRow, (int) count - 1 ) );
221
222 if( !current.IsOk() || (unsigned) newRow != currentRow )
223 PostProcessZoneViewSelChange( m_modelZonesOverview->GetItem( (unsigned) newRow ) );
224}
225
226
227void DIALOG_ZONE_MANAGER::OnTableChar( wxKeyEvent& aEvent )
228{
229 GenericProcessChar( aEvent );
230}
231
232
233void DIALOG_ZONE_MANAGER::OnTableCharHook( wxKeyEvent& aEvent )
234{
235 GenericProcessChar( aEvent );
236}
237
238
239void DIALOG_ZONE_MANAGER::OnIdle( wxIdleEvent& aEvent )
240{
241 WXUNUSED( aEvent )
242 m_viewZonesOverview->SetFocus();
243 Unbind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
244}
245
246
247void DIALOG_ZONE_MANAGER::onDialogResize( wxSizeEvent& event )
248{
249 event.Skip();
250}
251
252
254{
255 wxWindowUpdateLocker updateLock( this );
256
257 m_panelZoneProperties->SetZone( zone );
258 m_zonePreviewNotebook->OnZoneSelectionChanged( zone );
259
260 Layout();
261}
262
263
265{
266 Bind( wxEVT_IDLE, &DIALOG_ZONE_MANAGER::OnIdle, this );
267}
268
269
271{
272 SelectZoneTableItem( aEvent.GetItem() );
273}
274
275
276void DIALOG_ZONE_MANAGER::SelectZoneTableItem( wxDataViewItem const& aItem )
277{
278 ZONE* zone = m_modelZonesOverview->GetZone( aItem );
279
280 if( !zone )
281 return;
282
284}
285
286
287void DIALOG_ZONE_MANAGER::OnOk( wxCommandEvent& aEvt )
288{
289 m_panelZoneProperties->TransferZoneSettingsFromWindow();
290
291 m_zoneSettingsBag.UpdateClonedZones();
292
293 for( const auto& [ zone, zoneClone ] : m_zoneSettingsBag.GetZonesCloneMap() )
294 {
295 std::map<PCB_LAYER_ID, std::shared_ptr<SHAPE_POLY_SET>> filled_zone_to_restore;
296 ZONE* internal_zone = zone; // Duplicate the zone pointer to allow capture on older MacOS (13)
297
298 zone->GetLayerSet().RunOnLayers(
299 [&]( PCB_LAYER_ID layer )
300 {
301 std::shared_ptr<SHAPE_POLY_SET> fill = internal_zone->GetFilledPolysList( layer );
302
303 if( fill )
304 filled_zone_to_restore[layer] = fill;
305 } );
306
307 *zone = *zoneClone;
308
309 for( const auto& [ layer, fill ] : filled_zone_to_restore )
310 zone->SetFilledPolysList( layer, *fill );
311 }
312
313 aEvt.Skip();
314}
315
316
317#if wxUSE_DRAG_AND_DROP
318
319void DIALOG_ZONE_MANAGER::OnBeginDrag( wxDataViewEvent& aEvent )
320{
321 wxTextDataObject* obj = new wxTextDataObject;
322 obj->SetText( "42" ); //FIXME - Workaround for drop on GTK
323 aEvent.SetDataObject( obj );
324 aEvent.SetDragFlags( wxDrag_AllowMove );
325 const wxDataViewItem it = aEvent.GetItem();
326
327 if( it.IsOk() )
329}
330
331
332void DIALOG_ZONE_MANAGER::OnDropPossible( wxDataViewEvent& aEvent )
333{
334 aEvent.SetDropEffect( wxDragMove ); // check 'move' drop effect
335}
336
337
338void DIALOG_ZONE_MANAGER::OnDrop( wxDataViewEvent& aEvent )
339{
340 if( aEvent.GetDataFormat() != wxDF_UNICODETEXT )
341 {
342 aEvent.Veto();
343 return;
344 }
345
346 if( !m_priorityDragIndex.has_value() )
347 return;
348
349 const wxDataViewItem it = aEvent.GetItem();
350
351 if( !it.IsOk() )
352 {
353 aEvent.Veto();
354 return;
355 }
356
357 unsigned int drop_index = m_modelZonesOverview->GetRow( it );
358 const std::optional<unsigned> rtn = m_modelZonesOverview->SwapZonePriority( *m_priorityDragIndex, drop_index );
359
360 if( rtn.has_value() )
361 {
362 const wxDataViewItem item = m_modelZonesOverview->GetItem( *rtn );
363
364 if( item.IsOk() )
365 m_viewZonesOverview->Select( item );
366 }
367}
368
369#endif // wxUSE_DRAG_AND_DROP
370
371
376
377
382
383
388
389
394
395
396void DIALOG_ZONE_MANAGER::OnAutoAssignClick( wxCommandEvent& aEvent )
397{
398 BOARD* board = m_pcbFrame->GetBoard();
399
400 // Save original priorities so we can restore them after copying to clones.
401 // The dialog operates on clones; originals must stay untouched until OnOk.
402 std::unordered_map<ZONE*, unsigned> savedPriorities;
403
404 for( ZONE* zone : board->Zones() )
405 savedPriorities[zone] = zone->GetAssignedPriority();
406
407 if( AutoAssignZonePriorities( board ) )
408 {
409 for( auto& [original, clone] : m_zoneSettingsBag.GetZonesCloneMap() )
410 {
411 unsigned newPri = original->GetAssignedPriority();
412 clone->SetAssignedPriority( newPri );
413 m_zoneSettingsBag.SetZonePriority( clone.get(), newPri );
414 }
415
417 m_modelZonesOverview->ApplyFilter( m_filterCtrl->GetValue(),
418 m_viewZonesOverview->GetSelection() ) );
419 }
420
421 for( auto& [zone, priority] : savedPriorities )
422 zone->SetAssignedPriority( priority );
423}
424
425
426void DIALOG_ZONE_MANAGER::OnFilterCtrlCancel( wxCommandEvent& aEvent )
427{
429 aEvent.Skip();
430}
431
432
433void DIALOG_ZONE_MANAGER::OnFilterCtrlSearch( wxCommandEvent& aEvent )
434{
435 PostProcessZoneViewSelChange( m_modelZonesOverview->ApplyFilter( aEvent.GetString(),
436 m_viewZonesOverview->GetSelection() ) );
437 aEvent.Skip();
438}
439
440
442{
443 PostProcessZoneViewSelChange( m_modelZonesOverview->ApplyFilter( aEvent.GetString(),
444 m_viewZonesOverview->GetSelection() ) );
445 aEvent.Skip();
446}
447
448
449void DIALOG_ZONE_MANAGER::OnFilterCtrlEnter( wxCommandEvent& aEvent )
450{
451 PostProcessZoneViewSelChange( m_modelZonesOverview->ApplyFilter( aEvent.GetString(),
452 m_viewZonesOverview->GetSelection() ) );
453 aEvent.Skip();
454}
455
456
457void DIALOG_ZONE_MANAGER::OnLayerFilterChanged( wxCommandEvent& aEvent )
458{
459 int sel = m_layerFilter->GetSelection();
460
461 if( sel <= 0 )
462 {
463 m_modelZonesOverview->SetLayerFilter( UNDEFINED_LAYER );
464 }
465 else
466 {
467 void* data = m_layerFilter->GetClientData( sel );
468 PCB_LAYER_ID layer = static_cast<PCB_LAYER_ID>( reinterpret_cast<intptr_t>( data ) );
469 m_modelZonesOverview->SetLayerFilter( layer );
470 }
471
473 m_modelZonesOverview->ApplyFilter( m_filterCtrl->GetValue(),
474 m_viewZonesOverview->GetSelection() ) );
475}
476
477
479{
480 if( m_isFillingZones )
481 return;
482
483 m_isFillingZones = true;
484
485 if( !m_panelZoneProperties->TransferZoneSettingsFromWindow() )
486 {
487 m_isFillingZones = false;
488 return;
489 }
490
491 m_zoneSettingsBag.UpdateClonedZones();
492
493 BOARD* board = m_pcbFrame->GetBoard();
494 board->IncrementTimeStamp();
495
496 // Save the original zones before swapping so we can restore them later
497 ZONES originalZones = board->Zones();
498
499 // Do not use a commit here since we're operating on cloned zones that are not owned by the
500 // board. Using a commit would create undo entries pointing to the clones, which would cause
501 // corruption when the commit is destroyed.
502 m_filler = std::make_unique<ZONE_FILLER>( board, nullptr );
503 auto reporter = std::make_unique<WX_PROGRESS_REPORTER>( this, _( "Fill All Zones" ), 5, PR_CAN_ABORT );
504 m_filler->SetProgressReporter( reporter.get() );
505
506 // TODO: replace these const_cast calls with a different solution that avoids mutating the
507 // container of the board. This is relatively safe as-is because the original zones list is
508 // swapped back in below, but still should be changed to avoid invalidating the board state
509 // in case this code is refactored to be a non-modal dialog in the future.
510 const_cast<ZONES&>( board->Zones() ) = m_zoneSettingsBag.GetClonedZoneList();
511
512 m_zoneFillComplete = m_filler->Fill( board->Zones() );
513 board->BuildConnectivity();
514
515 m_zonePreviewNotebook->OnZoneSelectionChanged( m_panelZoneProperties->GetZone() );
516
517 // Restore the original zones. The connectivity MUST be rebuilt to remove stale pointers to
518 // cloned zones in case of a cancel.
519 const_cast<ZONES&>( board->Zones() ) = originalZones;
520 board->BuildConnectivity();
521
522 m_isFillingZones = false;
523}
524
525
526void DIALOG_ZONE_MANAGER::OnZoneNameUpdate( wxCommandEvent& aEvent )
527{
528 if( ZONE* zone = m_panelZoneProperties->GetZone() )
529 m_modelZonesOverview->RowChanged( m_modelZonesOverview->GetRow( m_modelZonesOverview->GetItemByZone( zone ) ) );
530}
531
532
533void DIALOG_ZONE_MANAGER::OnZoneNetUpdate( wxCommandEvent& aEvent )
534{
535 if( ZONE* zone = m_panelZoneProperties->GetZone() )
536 m_modelZonesOverview->RowChanged( m_modelZonesOverview->GetRow( m_modelZonesOverview->GetItemByZone( zone ) ) );
537}
538
539
541{
542 unsigned count = aEvent.GetInt();
543
546 {
547 btn->Enable( count > 1 );
548 }
549}
550
551
552void DIALOG_ZONE_MANAGER::OnCheckBoxClicked( wxCommandEvent& aEvent )
553{
554 const wxObject* sender = aEvent.GetEventObject();
555
556 if( aEvent.GetEventObject() == m_checkName )
557 m_modelZonesOverview->EnableFitterByName( aEvent.IsChecked() );
558 else if( aEvent.GetEventObject() == m_checkNet )
559 m_modelZonesOverview->EnableFitterByNet( aEvent.IsChecked() );
560
561 if( ( sender == m_checkName || sender == m_checkNet ) && !m_filterCtrl->IsEmpty() )
562 m_modelZonesOverview->ApplyFilter( m_filterCtrl->GetValue(), m_viewZonesOverview->GetSelection() );
563}
564
565
567{
568 if( !m_viewZonesOverview->HasSelection() )
569 return;
570
571 const wxDataViewItem selectedItem = m_viewZonesOverview->GetSelection();
572
573 if( !selectedItem.IsOk() )
574 return;
575
576 const unsigned int selectedRow = m_modelZonesOverview->GetRow( selectedItem );
577 const std::optional<unsigned> new_index = m_modelZonesOverview->MoveZoneIndex( selectedRow, aMove );
578
579 if( new_index.has_value() )
580 {
581 wxDataViewItem new_item = m_modelZonesOverview->GetItem( *new_index );
583 }
584}
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:203
void IncrementTimeStamp()
Definition board.cpp:274
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Definition board.cpp:745
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.