KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_global_edit_teardrops.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 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#include <widgets/unit_binder.h>
25#include <pcb_edit_frame.h>
26#include <board.h>
28#include <pcb_track.h>
29#include <pcb_group.h>
30#include <footprint.h>
31#include <teardrop/teardrop.h>
32#include <zone_filler.h>
35#include <tool/tool_manager.h>
38
39
40// Globals to remember control settings during a session
41static bool g_vias = true;
42static bool g_pthPads = true;
43static bool g_smdPads = true;
44static bool g_trackToTrack = false;
46static wxString g_netclassFilter;
47static bool g_filterByNet;
48static wxString g_netFilter;
49static bool g_filterByLayer;
50static int g_layerFilter;
51static bool g_filterRoundPads = false;
52static bool g_filterSelected = false;
53static int g_action = 1;
54
55
57{
58public:
61
62protected:
63 void onSpecifiedValuesUpdateUi( wxUpdateUIEvent& event ) override
64 {
65 event.Enable( m_specifiedValues->GetValue() );
66 }
67 void onCurvedEdgesUpdateUi( wxUpdateUIEvent& event ) override
68 {
69 event.Enable( m_specifiedValues->GetValue()
70 && m_curvedEdges->GetValue() == wxCHK_CHECKED );
71 }
72 void onFilterUpdateUi( wxUpdateUIEvent& event ) override
73 {
74 event.Enable( !m_trackToTrack->GetValue() );
75 }
76
77 // Track-to-track teardrops always follow the document-wide settings (there are no teardrop
78 // properties on individual track segments as they're too ephemeral). Therefore we disable
79 // Set-to-specified-values when track-to-track is selected.
80 void onTrackToTrack( wxCommandEvent& event ) override
81 {
82 if( event.IsChecked() && m_specifiedValues->GetValue() )
83 {
84 m_specifiedValues->SetValue( false );
85 m_addTeardrops->SetValue( true );
86 }
87 }
88
89 // These just improve usability so that you don't have to click twice to enable a filter.
90 void OnNetclassFilterSelect( wxCommandEvent& event ) override
91 {
92 m_netclassFilterOpt->SetValue( true );
93 }
94 void OnLayerFilterSelect( wxCommandEvent& event ) override
95 {
96 m_layerFilterOpt->SetValue( true );
97 }
98 void OnNetFilterSelect( wxCommandEvent& event )
99 {
100 m_netFilterOpt->SetValue( true );
101 }
102
103 // Remove "add" terminology when updating only existing teardrops.
104 void OnExistingFilterSelect( wxCommandEvent& event ) override
105 {
106 if( event.IsChecked() )
107 {
108 m_addTeardrops->SetLabel( _( "Set teardrops to default values for shape" ) );
109 m_specifiedValues->SetLabel( _( "Set teardrops to specified values:" ) );
110 }
111 else
112 {
113 m_addTeardrops->SetLabel( _( "Add teardrops with default values for shape" ) );
114 m_specifiedValues->SetLabel( _( "Add teardrops with specified values:" ) );
115 }
116 }
117
118 void setSpecifiedParams( TEARDROP_PARAMETERS* targetParams );
119 void visitItem( BOARD_COMMIT* aCommit, BOARD_CONNECTED_ITEM* aItem );
120 void processItem( BOARD_COMMIT* aCommit, BOARD_CONNECTED_ITEM* aItem );
121
122 bool TransferDataToWindow() override;
123 bool TransferDataFromWindow() override;
124
125
126 void onShowBoardSetup( wxHyperlinkEvent& event ) override
127 {
128 m_parent->ShowBoardSetupDialog( _( "Teardrops" ) );
129 }
130
131 void buildFilterLists();
132
133private:
137
143};
144
145
148 m_teardropHDPercent( aParent, m_stHDRatio, m_tcHDRatio, m_stHDRatioUnits ),
149 m_teardropLenPercent( aParent, m_stLenPercentLabel, m_tcLenPercent, nullptr ),
150 m_teardropMaxLen( aParent, m_stMaxLen, m_tcTdMaxLen, m_stMaxLenUnits ),
151 m_teardropHeightPercent( aParent, m_stHeightPercentLabel, m_tcHeightPercent, nullptr ),
152 m_teardropMaxHeight( aParent, m_stMaxHeight, m_tcMaxHeight, m_stMaxHeightUnits )
153{
154 m_parent = aParent;
156
157 m_bitmapTeardrop->SetBitmap( KiBitmapBundle( BITMAPS::teardrop_sizes ) );
158
159 m_teardropHDPercent.SetUnits( EDA_UNITS::PERCENT );
160 m_teardropLenPercent.SetUnits( EDA_UNITS::PERCENT );
161 m_teardropHeightPercent.SetUnits( EDA_UNITS::PERCENT );
162
163 m_minTrackWidthHint->SetFont( KIUI::GetInfoFont( this ).Italic() );
164
166
168
169 m_netFilter->Connect( NET_SELECTED,
171 nullptr, this );
172
174}
175
176
178{
179 g_vias = m_vias->GetValue();
180 g_pthPads = m_pthPads->GetValue();
181 g_smdPads = m_smdPads->GetValue();
182 g_trackToTrack = m_trackToTrack->GetValue();
184 g_netclassFilter = m_netclassFilter->GetStringSelection();
185 g_filterByNet = m_netFilterOpt->GetValue();
187 g_filterByLayer = m_layerFilterOpt->GetValue();
191
192 if( m_removeTeardrops->GetValue() )
193 g_action = 0;
194 else if( m_specifiedValues->GetValue() )
195 g_action = 2;
196 else
197 g_action = 1;
198
199 m_netFilter->Disconnect( NET_SELECTED,
201 nullptr, this );
202}
203
204
206{
207 // Populate the net filter list with net names
210
211 if( !m_brd->GetHighLightNetCodes().empty() )
213
214 // Populate the netclass filter list with netclass names
215 wxArrayString netclassNames;
216 std::shared_ptr<NET_SETTINGS>& settings = m_brd->GetDesignSettings().m_NetSettings;
217
218 netclassNames.push_back( settings->m_DefaultNetClass->GetName() );
219
220 for( const auto& [ name, netclass ] : settings->m_NetClasses )
221 netclassNames.push_back( name );
222
223 m_netclassFilter->Set( netclassNames );
225
226 // Populate the layer filter list
232}
233
234
236{
238 m_selection = selTool->GetSelection();
240
241 m_vias->SetValue( g_vias );
242 m_pthPads->SetValue( g_pthPads );
243 m_smdPads->SetValue( g_smdPads );
244 m_trackToTrack->SetValue( g_trackToTrack );
245
246 if( g_filterByNetclass && m_netclassFilter->SetStringSelection( g_netclassFilter ) )
247 m_netclassFilterOpt->SetValue( true );
248 else if( item )
249 m_netclassFilter->SetStringSelection( item->GetNet()->GetNetClass()->GetName() );
250
251 if( g_filterByNet && m_brd->FindNet( g_netFilter ) != nullptr )
252 {
254 m_netFilterOpt->SetValue( true );
255 }
256 else if( item )
257 {
259 }
260
262 {
263 m_layerFilterOpt->SetValue( true );
264 }
265 else if( item )
266 {
267 if( item->Type() == PCB_ZONE_T ) // a zone can be on more than one layer
268 m_layerFilter->SetLayerSelection( static_cast<ZONE*>(item)->GetFirstLayer() );
269 else
271 }
272
275
276 if( g_action == 0 )
277 m_removeTeardrops->SetValue( true );
278 else if( g_action == 1 )
279 m_addTeardrops->SetValue( true );
280 else
281 m_specifiedValues->SetValue( true );
282
283 m_cbPreferZoneConnection->Set3StateValue( wxCHK_UNDETERMINED );
284 m_cbTeardropsUseNextTrack->Set3StateValue( wxCHK_UNDETERMINED );
290 m_curvedEdges->Set3StateValue( wxCHK_UNDETERMINED );
291
292 return true;
293}
294
295
297{
298 if( m_cbPreferZoneConnection->Get3StateValue() != wxCHK_UNDETERMINED )
299 targetParams->m_TdOnPadsInZones = !m_cbPreferZoneConnection->GetValue();
300
301 if( m_cbTeardropsUseNextTrack->Get3StateValue() != wxCHK_UNDETERMINED )
302 targetParams->m_AllowUseTwoTracks = m_cbTeardropsUseNextTrack->GetValue();
303
306
308 targetParams->m_BestLengthRatio = m_teardropLenPercent.GetDoubleValue() / 100.0;
309
311 targetParams->m_TdMaxLen = m_teardropMaxLen.GetIntValue();
312
315
318
319 if( m_curvedEdges->Get3StateValue() != wxCHK_UNDETERMINED )
320 {
321 if( m_curvedEdges->GetValue() )
322 targetParams->m_CurveSegCount = m_curvePointsCtrl->GetValue();
323 else
324 targetParams->m_CurveSegCount = 0;
325 }
326}
327
328
330{
332 TEARDROP_PARAMETERS* targetParams = nullptr;
333
334 if( aItem->Type() == PCB_PAD_T )
335 targetParams = &static_cast<PAD*>( aItem )->GetTeardropParams();
336 else if( aItem->Type() == PCB_VIA_T )
337 targetParams = &static_cast<PCB_VIA*>( aItem )->GetTeardropParams();
338 else
339 return;
340
341 aCommit->Stage( aItem, CHT_MODIFY );
342
343 if( m_removeTeardrops->GetValue() )
344 {
345 targetParams->m_Enabled = false;
346 }
347 else if( m_addTeardrops->GetValue() )
348 {
349 if( TEARDROP_MANAGER::IsRound( aItem ) )
350 *targetParams = *brdSettings.GetTeadropParamsList()->GetParameters( TARGET_ROUND );
351 else
352 *targetParams = *brdSettings.GetTeadropParamsList()->GetParameters( TARGET_RECT );
353
354 targetParams->m_Enabled = true;
355 }
356 else if( m_specifiedValues->GetValue() )
357 {
358 setSpecifiedParams( targetParams );
359
360 if( !m_existingFilter->GetValue() )
361 targetParams->m_Enabled = true;
362 }
363}
364
365
367{
368 if( m_selectedItemsFilter->GetValue() )
369 {
370 if( !aItem->IsSelected() )
371 {
372 PCB_GROUP* group = aItem->GetParentGroup();
373
374 while( group && !group->IsSelected() )
375 group = group->GetParentGroup();
376
377 if( !group )
378 return;
379 }
380 }
381
382 if( m_netFilterOpt->GetValue() && m_netFilter->GetSelectedNetcode() >= 0 )
383 {
384 if( aItem->GetNetCode() != m_netFilter->GetSelectedNetcode() )
385 return;
386 }
387
388 if( m_netclassFilterOpt->GetValue() && !m_netclassFilter->GetStringSelection().IsEmpty() )
389 {
390 if( aItem->GetEffectiveNetClass()->GetName() != m_netclassFilter->GetStringSelection() )
391 return;
392 }
393
395 {
396 if( aItem->GetLayer() != m_layerFilter->GetLayerSelection() )
397 return;
398 }
399
400 if( m_roundPadsFilter->GetValue() )
401 {
402 if( !TEARDROP_MANAGER::IsRound( aItem ) )
403 return;
404 }
405
406 if( m_existingFilter->GetValue() )
407 {
408 if( aItem->Type() == PCB_PAD_T )
409 {
410 if( !static_cast<PAD*>( aItem )->GetTeardropParams().m_Enabled )
411 return;
412 }
413 else if( aItem->Type() == PCB_VIA_T )
414 {
415 if( !static_cast<PCB_VIA*>( aItem )->GetTeardropParams().m_Enabled )
416 return;
417 }
418 }
419
420 processItem( aCommit, aItem );
421}
422
423
425{
426 m_brd->SetLegacyTeardrops( false );
427
428 BOARD_COMMIT commit( m_parent );
429 wxBusyCursor dummy;
430
431 if( m_vias->GetValue() )
432 {
433 for( PCB_TRACK* track : m_brd->Tracks() )
434 {
435 if ( track->Type() == PCB_VIA_T )
436 visitItem( &commit, track );
437 }
438 }
439
440 for( FOOTPRINT* footprint : m_brd->Footprints() )
441 {
442 for( PAD* pad : footprint->Pads() )
443 {
444 if( m_pthPads->GetValue() && pad->GetAttribute() == PAD_ATTRIB::PTH )
445 {
446 visitItem( &commit, pad );
447 }
448 else if( m_smdPads->GetValue() && ( pad->GetAttribute() == PAD_ATTRIB::SMD
449 || pad->GetAttribute() == PAD_ATTRIB::CONN ) )
450 {
451 visitItem( &commit, pad );
452 }
453 }
454 }
455
456 if( m_trackToTrack->GetValue() )
457 {
459 TEARDROP_PARAMETERS* targetParams = paramsList->GetParameters( TARGET_TRACK );
460 TEARDROP_MANAGER teardropManager( m_brd, m_parent->GetToolManager() );
461
462 teardropManager.DeleteTrackToTrackTeardrops( commit );
463
464 if( m_removeTeardrops->GetValue() )
465 {
466 targetParams->m_Enabled = false; // JEY TODO: how does this get undone/redone?
467 }
468 else if( m_addTeardrops->GetValue() )
469 {
470 targetParams->m_Enabled = true; // JEY TODO: how does this get undone/redone?
471 teardropManager.AddTeardropsOnTracks( commit, nullptr, true );
472 }
473 }
474
475 // If there are no filters then a force-full-update is equivalent, and will be faster.
476 if( !m_netFilterOpt->GetValue()
477 && !m_netclassFilterOpt->GetValue()
478 && !m_layerFilterOpt->GetValue()
479 && !m_roundPadsFilter->GetValue()
480 && !m_existingFilter->GetValue()
481 && !m_selectedItemsFilter->GetValue() )
482 {
483 commit.Push( _( "Edit Teardrops" ), SKIP_TEARDROPS );
484
486 teardropMgr.UpdateTeardrops( commit, nullptr, nullptr, true /* forceFullUpdate */ );
487 commit.Push( _( "Edit Teardrops" ), SKIP_TEARDROPS | APPEND_UNDO );
488 }
489 else
490 {
491 commit.Push( _( "Edit Teardrops" ) );
492 }
493
494 // Showing the unfilled, fully cross-hatched teardrops seems to be working fairly well, and
495 // accurate fills can then be manually generated by doing a zone fill.
496 //
497 // But here's the old code which allowed for either "draft" fills or an automatic full zone
498 // fill in case we decide the current situation isn't good enough:
499#if 0
500 if( aFillAfter )
501 {
502 ZONE_FILLER filler( m_board, aCommit );
503
504 if( m_reporter )
505 filler.SetProgressReporter( m_reporter );
506
507 filler.Fill( m_board->Zones() );
508
509 if( aCommit )
510 aCommit->Push( _( "Edit Teardrops" ), APPEND_UNDO );
511 }
512 else
513 {
514 // Fill raw teardrop shapes. This is a rough calculation, just to show a filled
515 // shape on screen without the (potentially large) performance hit of a zone refill
516 int epsilon = pcbIUScale.mmToIU( 0.001 );
517 int allowed_error = pcbIUScale.mmToIU( 0.005 );
518
519 for( ZONE* zone: m_createdTdList )
520 {
521 int half_min_width = zone->GetMinThickness() / 2;
522 int numSegs = GetArcToSegmentCount( half_min_width, allowed_error, FULL_CIRCLE );
523 SHAPE_POLY_SET filledPolys = *zone->Outline();
524
525 filledPolys.Deflate( half_min_width - epsilon, numSegs );
526
527 // Re-inflate after pruning of areas that don't meet minimum-width criteria
528 if( half_min_width - epsilon > epsilon )
529 filledPolys.Inflate( half_min_width - epsilon, numSegs );
530
531 zone->SetFilledPolysList( zone->GetFirstLayer(), filledPolys );
532 }
533 }
534#endif
535
536 return true;
537}
538
539
541{
542 PCB_EDIT_FRAME* editFrame = getEditFrame<PCB_EDIT_FRAME>();
543 DIALOG_GLOBAL_EDIT_TEARDROPS dlg( editFrame );
544
545 dlg.ShowQuasiModal(); // QuasiModal required for NET_SELECTOR
546 return 0;
547}
548
const char * name
Definition: DXF_plotter.cpp:57
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:108
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
Definition: bitmap.cpp:110
#define SKIP_TEARDROPS
Definition: board_commit.h:44
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
COMMIT & Stage(EDA_ITEM *aItem, CHANGE_TYPE aChangeType, BASE_SCREEN *aScreen=nullptr) override
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual NETCLASS * GetEffectiveNetClass() const
Return the NETCLASS for this item.
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
TEARDROP_PARAMETERS & GetTeardropParams()
Container for design settings for a BOARD object.
TEARDROP_PARAMETERS_LIST * GetTeadropParamsList()
std::shared_ptr< NET_SETTINGS > m_NetSettings
const wxString & GetCurrentNetClassName() const
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:226
PCB_GROUP * GetParentGroup() const
Definition: board_item.h:91
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:281
const NETINFO_LIST & GetNetInfo() const
Definition: board.h:850
const std::set< int > & GetHighLightNetCodes() const
Definition: board.h:516
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
Definition: board.cpp:1810
const FOOTPRINTS & Footprints() const
Definition: board.h:322
const TRACKS & Tracks() const
Definition: board.h:320
void SetLegacyTeardrops(bool aFlag)
Definition: board.h:1244
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:797
Class DIALOG_GLOBAL_EDIT_TEARDROPS_BASE.
void processItem(BOARD_COMMIT *aCommit, BOARD_CONNECTED_ITEM *aItem)
void onCurvedEdgesUpdateUi(wxUpdateUIEvent &event) override
void OnNetFilterSelect(wxCommandEvent &event)
void setSpecifiedParams(TEARDROP_PARAMETERS *targetParams)
void OnNetclassFilterSelect(wxCommandEvent &event) override
DIALOG_GLOBAL_EDIT_TEARDROPS(PCB_EDIT_FRAME *aParent)
void onTrackToTrack(wxCommandEvent &event) override
void visitItem(BOARD_COMMIT *aCommit, BOARD_CONNECTED_ITEM *aItem)
void onSpecifiedValuesUpdateUi(wxUpdateUIEvent &event) override
void OnExistingFilterSelect(wxCommandEvent &event) override
void onShowBoardSetup(wxHyperlinkEvent &event) override
void onFilterUpdateUi(wxUpdateUIEvent &event) override
void OnLayerFilterSelect(wxCommandEvent &event) override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
int ShowQuasiModal()
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:100
bool IsSelected() const
Definition: eda_item.h:109
int EditTeardrops(const TOOL_EVENT &aEvent)
int SetLayerSelection(int layer)
bool SetLayersHotkeys(bool value)
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
Definition: lset.cpp:884
const wxString GetName() const
Definition: netclass.h:62
NETCLASS * GetNetClass()
Definition: netinfo.h:101
void SetNetInfo(const NETINFO_LIST *aNetInfoList)
void SetBoard(BOARD *aBoard)
int GetSelectedNetcode()
void SetSelectedNetcode(int aNetcode)
void SetSelectedNet(const wxString &aNetname)
wxString GetSelectedNetname()
Definition: pad.h:59
virtual PCB_LAYER_ID GetActiveLayer() const
BOARD * GetBoard() const
The main frame for Pcbnew.
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
A set of BOARD_ITEMs (i.e., without duplicates).
Definition: pcb_group.h:51
void SetBoardFrame(PCB_BASE_FRAME *aFrame)
void SetNotAllowedLayerSet(LSET aMask)
The selection tool: currently supports:
PCB_SELECTION & GetSelection()
EDA_ITEM * Front() const
Definition: selection.h:208
Represent a set of closed polygons.
void Inflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, bool aSimplify=false)
Perform outline inflation/deflation.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
void Deflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError)
TEARDROP_MANAGER manage and build teardrop areas A teardrop area is a polygonal area (a copper ZONE) ...
Definition: teardrop.h:97
void UpdateTeardrops(BOARD_COMMIT &aCommit, const std::vector< BOARD_ITEM * > *dirtyPadsAndVias, const std::set< PCB_TRACK * > *dirtyTracks, bool aForceFullUpdate=false)
Update teardrops on a list of items.
Definition: teardrop.cpp:151
void AddTeardropsOnTracks(BOARD_COMMIT &aCommit, const std::set< PCB_TRACK * > *aTracks, bool aForceFullUpdate=false)
Add teardrop on tracks of different sizes connected by their end.
Definition: teardrop.cpp:347
static bool IsRound(BOARD_ITEM *aItem)
void DeleteTrackToTrackTeardrops(BOARD_COMMIT &aCommit)
Definition: teardrop.cpp:289
TEARDROP_PARAMETERS_LIST is a helper class to handle the list of TEARDROP_PARAMETERS needed to build ...
TEARDROP_PARAMETERS * GetParameters(TARGET_TD aTdType)
TEARDROP_PARAMETARS is a helper class to handle parameters needed to build teardrops for a board thes...
int m_CurveSegCount
number of segments to build the curved sides of a teardrop area must be > 2.
double m_BestWidthRatio
The height of a teardrop as ratio between height and size of pad/via.
int m_TdMaxLen
max allowed length for teardrops in IU. <= 0 to disable
bool m_AllowUseTwoTracks
True to create teardrops using 2 track segments if the first in too small.
int m_TdMaxWidth
max allowed height for teardrops in IU. <= 0 to disable
double m_BestLengthRatio
The length of a teardrop as ratio between length and size of pad/via.
double m_WidthtoSizeFilterRatio
The ratio (H/D) between the via/pad size and the track width max value to create a teardrop 1....
bool m_TdOnPadsInZones
A filter to exclude pads inside zone fills.
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:55
Generic, UI-independent tool event.
Definition: tool_event.h:167
int GetIntValue()
Definition: unit_binder.h:127
virtual void SetUnits(EDA_UNITS aUnits)
Normally not needed (as the UNIT_BINDER inherits from the parent frame), but can be used to set to DE...
virtual double GetDoubleValue()
Return the current value in Internal Units.
bool IsIndeterminate() const
Return true if the control holds the indeterminate value (for instance, if it represents a multiple s...
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
void SetProgressReporter(PROGRESS_REPORTER *aReporter)
Definition: zone_filler.cpp:72
bool Fill(const std::vector< ZONE * > &aZones, bool aCheck=false, wxWindow *aParent=nullptr)
Fills the given list of zones.
Definition: zone_filler.cpp:90
Handle a list of polygons defining a copper zone.
Definition: zone.h:72
PCB_LAYER_ID GetFirstLayer() const
Definition: zone.cpp:246
@ CHT_MODIFY
Definition: commit.h:44
static bool g_filterByNet
static wxString g_netclassFilter
static bool g_smdPads
static bool g_filterByNetclass
static bool g_vias
static int g_layerFilter
static bool g_filterSelected
static bool g_trackToTrack
static wxString g_netFilter
static bool g_pthPads
static int g_action
static bool g_filterRoundPads
static bool g_filterByLayer
#define _(s)
static constexpr EDA_ANGLE FULL_CIRCLE
Definition: eda_angle.h:433
int GetArcToSegmentCount(int aRadius, int aErrorMax, const EDA_ANGLE &aArcAngle)
@ UNDEFINED_LAYER
Definition: layer_ids.h:61
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
Definition: ui_common.cpp:151
Class to handle a set of BOARD_ITEMs.
const double epsilon
#define APPEND_UNDO
Definition: sch_commit.h:42
std::vector< FAB_LAYER_COLOR > dummy
constexpr int mmToIU(double mm) const
Definition: base_units.h:88
@ TARGET_ROUND
@ TARGET_RECT
@ TARGET_TRACK
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:97
@ PCB_ZONE_T
class ZONE, a copper pour area
Definition: typeinfo.h:107
@ PCB_PAD_T
class PAD, a pad in a footprint
Definition: typeinfo.h:87
#define INDETERMINATE_ACTION
Definition: ui_common.h:46