KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_footprint_properties_fp_editor.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) 2015 Dick Hollenbeck, [email protected]
6 * Copyright (C) 2008 Wayne Stambaugh <[email protected]>
7 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, you may find one here:
21 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22 * or you may search the http://www.gnu.org website for the version 2 license,
23 * or you may write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25 */
26
28
29#include <wx/debug.h>
30#include <wx/tokenzr.h>
31
34#include <bitmaps.h>
35#include <board_commit.h>
37#include <confirm.h>
38
41#include <embedded_files.h>
42#include <filename_resolver.h>
43#include <footprint.h>
45#include <pad.h>
48#include <layer_utils.h>
49#include <kiplatform/ui.h>
52#include <pgm_base.h>
54#include <tool/tool_manager.h>
55#include <tools/pcb_actions.h>
57#include <validators.h>
61#include <widgets/wx_grid.h>
62#include <zone.h>
63
65#include <project_pcb.h>
66#include <kidialog.h>
67
68
69class LAYERS_GRID_TABLE : public WX_GRID_TABLE_BASE, public std::vector<PCB_LAYER_ID>
70{
71public:
72 LAYERS_GRID_TABLE( PCB_BASE_FRAME* aFrame, const LSET& aForbiddenLayers );
74
75 int GetNumberRows() override { return (int) size(); }
76 int GetNumberCols() override { return 1; }
77
78 bool CanGetValueAs( int aRow, int aCol, const wxString& aTypeName ) override;
79 bool CanSetValueAs( int aRow, int aCol, const wxString& aTypeName ) override;
80 wxGridCellAttr* GetAttr( int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind ) override;
81
82 wxString GetValue( int aRow, int aCol ) override;
83 long GetValueAsLong( int aRow, int aCol ) override;
84
85 void SetValue( int aRow, int aCol, const wxString& aValue ) override;
86 void SetValueAsLong( int aRow, int aCol, long aValue ) override;
87
88private:
90 wxGridCellAttr* m_layerColAttr;
91};
92
93
94LAYERS_GRID_TABLE::LAYERS_GRID_TABLE( PCB_BASE_FRAME* aFrame, const LSET& aForbiddenLayers ) :
95 m_frame( aFrame )
96{
97 m_layerColAttr = new wxGridCellAttr;
98 m_layerColAttr->SetRenderer( new GRID_CELL_LAYER_RENDERER( m_frame ) );
99
100 m_layerColAttr->SetEditor( new GRID_CELL_LAYER_SELECTOR( m_frame, aForbiddenLayers, true ) );
101}
102
103
108
109
110bool LAYERS_GRID_TABLE::CanGetValueAs( int aRow, int aCol, const wxString& aTypeName )
111{
112 return aTypeName == wxGRID_VALUE_NUMBER;
113}
114
115
116bool LAYERS_GRID_TABLE::CanSetValueAs( int aRow, int aCol, const wxString& aTypeName )
117{
118 return aTypeName == wxGRID_VALUE_NUMBER;
119}
120
121
122wxGridCellAttr* LAYERS_GRID_TABLE::GetAttr( int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind )
123{
124 m_layerColAttr->IncRef();
125 return enhanceAttr( m_layerColAttr, aRow, aCol, aKind );
126}
127
128
129wxString LAYERS_GRID_TABLE::GetValue( int aRow, int aCol )
130{
131 return m_frame->GetBoard()->GetLayerName( this->at( (size_t) aRow ) );
132}
133
134
135long LAYERS_GRID_TABLE::GetValueAsLong( int aRow, int aCol )
136{
137 return this->at( (size_t) aRow );
138}
139
140
141void LAYERS_GRID_TABLE::SetValue( int aRow, int aCol, const wxString& aValue )
142{
143 wxFAIL_MSG( wxString::Format( wxT( "column %d doesn't hold a string value" ), aCol ) );
144}
145
146
147void LAYERS_GRID_TABLE::SetValueAsLong( int aRow, int aCol, long aValue )
148{
149 this->at( (size_t) aRow ) = ToLAYER_ID( (int) aValue );
150}
151
152
153// Remember the last open page during session.
154
156
157
159 FOOTPRINT* aFootprint ) :
161 m_frame( aParent ),
162 m_footprint( aFootprint ),
163 m_initialized( false ),
167{
168 SetEvtHandlerEnabled( false );
169
170 // Create the extra panels.
173
174 m_NoteBook->AddPage( m_3dPanel, _("3D Models"), false );
175 m_NoteBook->AddPage( m_embeddedFiles, _( "Embedded Files" ) );
176
177 m_fields = new PCB_FIELDS_GRID_TABLE( m_frame, this, { m_embeddedFiles->GetLocalFiles() } );
178
179 {
180 LSET forbiddenLayers = LSET::AllCuMask() | LSET::AllTechMask();
181 forbiddenLayers.set( Edge_Cuts );
182 forbiddenLayers.set( Margin );
183
184 m_privateLayers = new LAYERS_GRID_TABLE( m_frame, forbiddenLayers );
185 }
186
187 {
188 LSET forbiddenLayers = LSET::AllLayersMask() & ~LSET::UserDefinedLayersMask();
189 m_customUserLayers = new LAYERS_GRID_TABLE( m_frame, forbiddenLayers );
190 }
191
192 m_delayedErrorMessage = wxEmptyString;
193 m_delayedFocusCtrl = nullptr;
194 m_delayedFocusGrid = nullptr;
198
199 // Give an icon
200 wxIcon icon;
201 icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_modedit ) );
202 SetIcon( icon );
203
204 m_itemsGrid->SetTable( m_fields );
207
208 m_itemsGrid->PushEventHandler( new GRID_TRICKS( m_itemsGrid ) );
210 [this]( wxCommandEvent& aEvent )
211 {
212 OnAddPrivateLayer( aEvent );
213 } ) );
214 m_nettieGroupsGrid->PushEventHandler( new GRID_TRICKS( m_nettieGroupsGrid,
215 [this]( wxCommandEvent& aEvent )
216 {
217 OnAddNettieGroup( aEvent );
218 } ) );
219 m_jumperGroupsGrid->PushEventHandler( new GRID_TRICKS( m_jumperGroupsGrid,
220 [this]( wxCommandEvent& aEvent )
221 {
222 OnAddJumperGroup( aEvent );
223 } ) );
225 [this]( wxCommandEvent& aEvent )
226 {
227 OnAddCustomLayer( aEvent );
228 } ) );
229
230 m_itemsGrid->SetupColumnAutosizer( PFC_VALUE );
231 m_privateLayersGrid->SetupColumnAutosizer( 0 );
232 m_nettieGroupsGrid->SetupColumnAutosizer( 0 );
233 m_jumperGroupsGrid->SetupColumnAutosizer( 0 );
234 m_customUserLayersGrid->SetupColumnAutosizer( 0 );
235
236 m_itemsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
237 m_privateLayersGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
238 m_nettieGroupsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
239 m_jumperGroupsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
240 m_customUserLayersGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
241
242 m_itemsGrid->ShowHideColumns( "0 1 2 3 4 5 7" );
243
245
246 // Set font sizes
247 wxFont infoFont = KIUI::GetInfoFont( this ).Italic();
248 m_staticTextInfoCopper->SetFont( infoFont );
249 m_staticTextInfoPaste->SetFont( infoFont );
250
251 if( static_cast<int>( m_page ) >= 0 )
252 m_NoteBook->SetSelection( (unsigned) m_page );
253
255 {
260 }
262 {
264 }
265
266 // Update label text and tooltip for combined offset + ratio field
267 m_SolderPasteMarginLabel->SetLabel( _( "Solder paste clearance:" ) );
268 m_SolderPasteMarginLabel->SetToolTip( _( "Local solder paste clearance for this footprint.\n"
269 "Enter an absolute value (e.g., -0.1mm), a percentage "
270 "(e.g., -5%), or both (e.g., -0.1mm - 5%).\n"
271 "If blank, the global value is used." ) );
272
273 // Hide the old ratio controls - they're no longer needed
274 m_PasteMarginRatioLabel->Show( false );
275 m_PasteMarginRatioCtrl->Show( false );
276 m_PasteMarginRatioUnits->Show( false );
277
278 // Configure button logos
289
291
293 SetEvtHandlerEnabled( true );
294}
295
296
298{
299 // Prevents crash bug in wxGrid's d'tor
300 m_itemsGrid->DestroyTable( m_fields );
301 m_privateLayersGrid->DestroyTable( m_privateLayers );
303
304 // Delete the GRID_TRICKS.
305 m_itemsGrid->PopEventHandler( true );
306 m_privateLayersGrid->PopEventHandler( true );
307 m_nettieGroupsGrid->PopEventHandler( true );
308 m_jumperGroupsGrid->PopEventHandler( true );
309 m_customUserLayersGrid->PopEventHandler( true );
310
311 m_page = static_cast<NOTEBOOK_PAGES>( m_NoteBook->GetSelection() );
312
313 // the GL canvas on the 3D models page has to be visible before it is destroyed
314 m_NoteBook->SetSelection( static_cast<int>( NOTEBOOK_PAGES::PAGE_3D_MODELS ) );
315}
316
317
319{
320 LIB_ID fpID = m_footprint->GetFPID();
321 wxString footprintName = fpID.GetLibItemName();
322
323 m_FootprintNameCtrl->ChangeValue( footprintName );
324
325 m_DocCtrl->SetValue( EscapeString( m_footprint->GetLibDescription(), CTX_LINE ) );
326 m_KeywordCtrl->SetValue( m_footprint->GetKeywords() );
327
328 if( !wxDialog::TransferDataToWindow() )
329 return false;
330
331 if( !m_PanelGeneral->TransferDataToWindow() )
332 return false;
333
334 // Add the models to the panel
335 if( !m_3dPanel->TransferDataToWindow() )
336 return false;
337
338 if( !m_embeddedFiles->TransferDataToWindow() )
339 return false;
340
341 // Footprint Fields
342 for( PCB_FIELD* field : m_footprint->GetFields() )
343 {
344 wxCHECK2( field, continue );
345
346 m_fields->push_back( *field );
347 }
348
349 // Notify the grid
350 wxGridTableMessage tmsg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_fields->GetNumberRows() );
351 m_itemsGrid->ProcessTableMessage( tmsg );
352
353 if( m_footprint->GetAttributes() & FP_THROUGH_HOLE )
354 m_componentType->SetSelection( 0 );
355 else if( m_footprint->GetAttributes() & FP_SMD )
356 m_componentType->SetSelection( 1 );
357 else
358 m_componentType->SetSelection( 2 );
359
360 // Private layers
361 for( PCB_LAYER_ID privateLayer : m_footprint->GetPrivateLayers().UIOrder() )
362 m_privateLayers->push_back( privateLayer );
363
364 // Notify the grid
365 wxGridTableMessage gridTableMessagesg( m_privateLayers, wxGRIDTABLE_NOTIFY_ROWS_APPENDED,
366 m_privateLayers->GetNumberRows() );
367 m_privateLayersGrid->ProcessTableMessage( gridTableMessagesg );
368
369 switch( m_footprint->GetStackupMode() )
370 {
372 {
373 m_cbCustomLayers->SetValue( false );
374
375 m_copperLayerCount->SetSelection( 0 );
376 break;
377 }
379 {
380 m_cbCustomLayers->SetValue( true );
381
382 const LSET& customFpLayers = m_footprint->GetStackupLayers();
383 const LSET customUserLayers = customFpLayers & LSET::UserDefinedLayersMask();
384
385 for( PCB_LAYER_ID customUserLayer : customUserLayers )
386 {
387 m_customUserLayers->push_back( customUserLayer );
388 }
389
390 // Set the number of copper layers
391 m_copperLayerCount->SetSelection( ( customFpLayers & LSET::AllCuMask() ).count() / 2 - 1 );
392 break;
393 }
394 }
396
397 // Notify the grid
398 {
399 wxGridTableMessage gridTableMessagesCustom( m_customUserLayers, wxGRIDTABLE_NOTIFY_ROWS_APPENDED,
400 m_customUserLayers->GetNumberRows() );
401 m_customUserLayersGrid->ProcessTableMessage( gridTableMessagesCustom );
402 }
403
404 m_boardOnly->SetValue( m_footprint->GetAttributes() & FP_BOARD_ONLY );
405 m_excludeFromPosFiles->SetValue( m_footprint->GetAttributes() & FP_EXCLUDE_FROM_POS_FILES );
406 m_excludeFromBOM->SetValue( m_footprint->GetAttributes() & FP_EXCLUDE_FROM_BOM );
407 m_cbDNP->SetValue( m_footprint->GetAttributes() & FP_DNP );
408
409 // Local Clearances
410
411 if( m_footprint->GetLocalClearance().has_value() )
412 m_netClearance.SetValue( m_footprint->GetLocalClearance().value() );
413 else
414 m_netClearance.SetValue( wxEmptyString );
415
416 if( m_footprint->GetLocalSolderMaskMargin().has_value() )
417 m_solderMask.SetValue( m_footprint->GetLocalSolderMaskMargin().value() );
418 else
419 m_solderMask.SetValue( wxEmptyString );
420
421 m_solderPaste.SetOffsetValue( m_footprint->GetLocalSolderPasteMargin() );
422 m_solderPaste.SetRatioValue( m_footprint->GetLocalSolderPasteMarginRatio() );
423
424 m_noCourtyards->SetValue( m_footprint->AllowMissingCourtyard() );
425 m_allowBridges->SetValue( m_footprint->AllowSolderMaskBridges() );
426
427 switch( m_footprint->GetLocalZoneConnection() )
428 {
429 default:
430 case ZONE_CONNECTION::INHERITED: m_ZoneConnectionChoice->SetSelection( 0 ); break;
431 case ZONE_CONNECTION::FULL: m_ZoneConnectionChoice->SetSelection( 1 ); break;
432 case ZONE_CONNECTION::THERMAL: m_ZoneConnectionChoice->SetSelection( 2 ); break;
433 case ZONE_CONNECTION::NONE: m_ZoneConnectionChoice->SetSelection( 3 ); break;
434 }
435
436 for( const wxString& group : m_footprint->GetNetTiePadGroups() )
437 {
438 if( !group.IsEmpty() )
439 {
440 m_nettieGroupsGrid->AppendRows( 1 );
441 m_nettieGroupsGrid->SetCellValue( m_nettieGroupsGrid->GetNumberRows() - 1, 0, group );
442 }
443 }
444
445 m_cbDuplicatePadsAreJumpers->SetValue( m_footprint->GetDuplicatePadNumbersAreJumpers() );
446
447 for( const std::set<wxString>& group : m_footprint->JumperPadGroups() )
448 {
449 wxString groupTxt;
450
451 for( const wxString& pinNumber : group )
452 {
453 if( !groupTxt.IsEmpty() )
454 groupTxt << ", ";
455
456 groupTxt << pinNumber;
457 }
458
459 m_jumperGroupsGrid->AppendRows( 1 );
460 m_jumperGroupsGrid->SetCellValue( m_jumperGroupsGrid->GetNumberRows() - 1, 0, groupTxt );
461 }
462
463 // Items grid
464 for( int col = 0; col < m_itemsGrid->GetNumberCols(); col++ )
465 {
466 // Adjust min size to the column label size
467 m_itemsGrid->SetColMinimalWidth( col, m_itemsGrid->GetVisibleWidth( col, true, false ) );
468 // Adjust the column size.
469 int col_size = m_itemsGrid->GetVisibleWidth( col );
470
471 if( col == PFC_LAYER ) // This one's a drop-down. Check all possible values.
472 {
473 BOARD* board = m_footprint->GetBoard();
474
475 for( PCB_LAYER_ID layer : board->GetEnabledLayers() )
476 col_size = std::max( col_size, GetTextExtent( board->GetLayerName( layer ) ).x );
477
478 // Swatch and gaps:
479 col_size += KiROUND( 14 * GetDPIScaleFactor() ) + 12;
480 }
481
482 if( m_itemsGrid->IsColShown( col ) )
483 m_itemsGrid->SetColSize( col, col_size );
484 }
485
486 m_itemsGrid->SetRowLabelSize( 0 );
487
488 Layout();
489 m_initialized = true;
490
491 return true;
492}
493
494
496 LIB_ID* doOverwrite )
497{
498 if( aFootprintName.IsEmpty() )
499 {
500 m_delayedErrorMessage = _( "Footprint must have a name." );
501 return false;
502 }
503 else if( !FOOTPRINT::IsLibNameValid( aFootprintName ) )
504 {
505 m_delayedErrorMessage.Printf( _( "Footprint name may not contain '%s'." ),
507 return false;
508 }
509
510 LIB_ID fpID = m_footprint->GetFPID();
511 wxString libraryName = fpID.GetLibNickname();
512 wxString originalFPName = fpID.GetLibItemName();
513
515
516 if( aFootprintName != originalFPName && adapter->FootprintExists( libraryName, aFootprintName ) )
517 {
518 wxString msg = wxString::Format( _( "Footprint '%s' already exists in library '%s'." ),
519 aFootprintName, libraryName );
520
521 KIDIALOG errorDlg( m_frame, msg, _( "Confirmation" ), wxOK | wxCANCEL | wxICON_WARNING );
522 errorDlg.SetOKLabel( _( "Overwrite" ) );
523
524 if( errorDlg.ShowModal() == wxID_OK )
525 {
526 doOverwrite->SetLibNickname( libraryName );
527 doOverwrite->SetLibItemName( aFootprintName );
528 return true;
529 }
530 }
531
532 return true;
533}
534
535
537{
538 LSET userLayers;
539 if( m_cbCustomLayers->GetValue() )
540 {
541 userLayers |= LSET::AllCuMask( ( m_copperLayerCount->GetSelection() + 1 ) * 2 );
542
543 for( PCB_LAYER_ID layer : *m_customUserLayers )
544 {
545 userLayers.set( layer );
546 }
547 }
548 else
549 {
550 userLayers |= LSET{ F_Cu, B_Cu };
551 userLayers |= LSET::InternalCuMask();
552 userLayers |= LSET::UserDefinedLayersMask( 4 );
553 }
554
555 return userLayers;
556}
557
558
559static LSET GetAllUsedFootprintLayers( const FOOTPRINT& aFootprint )
560{
561 LSET usedLayers{};
562 aFootprint.RunOnChildren(
563 [&]( BOARD_ITEM* aSubItem )
564 {
565 wxCHECK2( aSubItem, /*void*/ );
566
567 switch( aSubItem->Type() )
568 {
569 case PCB_ZONE_T:
570 {
571 ZONE& zone = static_cast<ZONE&>( *aSubItem );
572 usedLayers |= zone.GetLayerSet();
573 break;
574 }
575 default:
576 {
577 usedLayers.set( aSubItem->GetLayer() );
578 break;
579 }
580 }
581 },
583 return usedLayers;
584}
585
586
588{
589 if( !m_itemsGrid->CommitPendingChanges() )
590 return false;
591
592 if( !DIALOG_SHIM::Validate() )
593 return false;
594
595 // First, test for invalid chars in footprint name
596 wxString footprintName = m_FootprintNameCtrl->GetValue();
597 LIB_ID overwrite;
598
599 if( !checkFootprintName( footprintName, &overwrite ) )
600 {
601 if( m_NoteBook->GetSelection() != 0 )
602 m_NoteBook->SetSelection( 0 );
603
606
607 return false;
608 }
609
610 // Check for valid field text properties
611 for( int i = 0; i < (int) m_fields->size(); ++i )
612 {
613 PCB_FIELD& field = m_fields->at( i );
614
615 // Check for missing field names.
616 if( field.GetName( false ).IsEmpty() )
617 {
619 m_delayedErrorMessage = wxString::Format( _( "Fields must have a name." ) );
622
623 return false;
624 }
625
626 int minSize = pcbIUScale.mmToIU( TEXT_MIN_SIZE_MM );
627 int maxSize = pcbIUScale.mmToIU( TEXT_MAX_SIZE_MM );
628
629 if( field.GetTextWidth() < minSize || field.GetTextWidth() > maxSize )
630 {
632 m_delayedErrorMessage = wxString::Format( _( "The text width must be between %s and %s." ),
633 m_frame->StringFromValue( minSize, true ),
634 m_frame->StringFromValue( maxSize, true ) );
637
638 return false;
639 }
640
641 if( field.GetTextHeight() < minSize || field.GetTextHeight() > maxSize )
642 {
644 m_delayedErrorMessage = wxString::Format( _( "The text height must be between %s and %s." ),
645 m_frame->StringFromValue( minSize, true ),
646 m_frame->StringFromValue( maxSize, true ) );
649
650 return false;
651 }
652
653 // Test for acceptable values for thickness and size and clamp if fails
654 int maxPenWidth = ClampTextPenSize( field.GetTextThickness(), field.GetTextSize() );
655
656 if( field.GetTextThickness() > maxPenWidth )
657 {
658 m_itemsGrid->SetCellValue( i, PFC_THICKNESS, m_frame->StringFromValue( maxPenWidth, true ) );
659
661 m_delayedErrorMessage = _( "The text thickness is too large for the text size.\n"
662 "It will be clamped." );
665
666 return false;
667 }
668 }
669
670 if( !m_netClearance.Validate( 0, INT_MAX ) )
671 return false;
672
673 if( overwrite.IsValid() )
674 {
675 if( m_frame->DeleteFootprintFromLibrary( overwrite, false /* already confirmed */ ) )
676 m_frame->SyncLibraryTree( true );
677 }
678
679 // See if there is an object in the footprint that uses a layer that is not in that list
681
682 // Check that the user isn't trying to remove a layer that is used by the footprint
683 usedLayers &= ~getCustomLayersFromControls();
684 usedLayers &= ~LSET::AllTechMask();
685 usedLayers &= ~LSET::UserMask();
686
687 if( usedLayers.any() )
688 {
690 wxString::Format( _( "You are trying to remove layers that are used by the footprint: %s.\n"
691 "Please remove the objects that use these layers first." ),
692 LAYER_UTILS::AccumulateNames( usedLayers, m_frame->GetBoard() ) );
697 return false;
698 }
699
700 return true;
701}
702
703
705{
706 if( !m_itemsGrid->CommitPendingChanges()
707 || !m_privateLayersGrid->CommitPendingChanges()
708 || !m_nettieGroupsGrid->CommitPendingChanges()
709 || !m_jumperGroupsGrid->CommitPendingChanges()
710 || !m_customUserLayersGrid->CommitPendingChanges() )
711 {
712 return false;
713 }
714
715 KIGFX::PCB_VIEW* view = m_frame->GetCanvas()->GetView();
716 PCB_SELECTION_TOOL* selectionTool = m_frame->GetToolManager()->GetTool<PCB_SELECTION_TOOL>();
717 BOARD_COMMIT commit( m_frame );
718 commit.Modify( m_footprint );
719
720 // Must be done inside the commit to capture the undo state
721 // This will call TransferDataToWindow() on the 3D panel and
722 // the embedded files panel.
723 if( !DIALOG_SHIM::TransferDataFromWindow() )
724 return false;
725
726 // Clear out embedded files that are no longer in use
727 std::set<wxString> files;
728 std::set<wxString> files_to_delete;
729
730 // Get the new files from the footprint fields
731 for( const PCB_FIELD& field : *m_fields )
732 {
733 if( field.GetText().StartsWith( FILEEXT::KiCadUriPrefix ) )
734 files.insert( field.GetText() );
735 }
736
737 // Find any files referenced in the old fields that are not in the new fields
738 for( PCB_FIELD* field : m_footprint->GetFields() )
739 {
740 wxCHECK2( field, continue );
741
742 if( field->GetText().StartsWith( FILEEXT::KiCadUriPrefix ) )
743 {
744 if( files.find( field->GetText() ) == files.end() )
745 files_to_delete.insert( field->GetText() );
746 }
747 }
748
749 for( const wxString& file : files_to_delete )
750 {
751 wxString name = file.Mid( FILEEXT::KiCadUriPrefix.size() + 3 ); // Skip "kicad-embed://"
752 m_footprint->RemoveFile( name );
753 }
754
755 LIB_ID fpID = m_footprint->GetFPID();
756 fpID.SetLibItemName( m_FootprintNameCtrl->GetValue() );
757 m_footprint->SetFPID( fpID );
758
759 m_footprint->SetLibDescription( UnescapeString( m_DocCtrl->GetValue() ) );
760 m_footprint->SetKeywords( m_KeywordCtrl->GetValue() );
761
762 // Update fields
763 m_frame->GetToolManager()->RunAction( ACTIONS::selectionClear );
764
765 while( !m_footprint->GetFields().empty() )
766 {
767 PCB_FIELD* existing = m_footprint->GetFields().front();
768 view->Remove( existing );
769 m_footprint->Remove( existing );
770 delete existing;
771 }
772
773 for( PCB_FIELD& field : *m_fields )
774 {
775 PCB_FIELD* newField = field.CloneField();
776 m_footprint->Add( newField );
777 view->Add( newField );
778
779 if( newField->IsSelected() )
780 {
781 // The old copy was in the selection list, but this one is not. Remove the
782 // out-of-sync selection flag so we can re-add the field to the selection.
783 newField->ClearSelected();
784 selectionTool->AddItemToSel( newField, true );
785 }
786 }
787
788 LSET privateLayers;
789
790 for( PCB_LAYER_ID layer : *m_privateLayers )
791 privateLayers.set( layer );
792
793 m_footprint->SetPrivateLayers( privateLayers );
794
795 if( m_cbCustomLayers->GetValue() )
796 {
797 const LSET customLayers = getCustomLayersFromControls();
798
800 m_footprint->SetStackupLayers( std::move( customLayers ) );
801 }
802 else
803 {
804 // Just use the default stackup mode
806 }
807
808 int attributes = 0;
809
810 switch( m_componentType->GetSelection() )
811 {
812 case 0: attributes |= FP_THROUGH_HOLE; break;
813 case 1: attributes |= FP_SMD; break;
814 default: break;
815 }
816
817 if( m_boardOnly->GetValue() )
818 attributes |= FP_BOARD_ONLY;
819
820 if( m_excludeFromPosFiles->GetValue() )
821 attributes |= FP_EXCLUDE_FROM_POS_FILES;
822
823 if( m_excludeFromBOM->GetValue() )
824 attributes |= FP_EXCLUDE_FROM_BOM;
825
826 if( m_cbDNP->GetValue() )
827 attributes |= FP_DNP;
828
829 m_footprint->SetAttributes( attributes );
830
831 m_footprint->SetAllowMissingCourtyard( m_noCourtyards->GetValue() );
832 m_footprint->SetAllowSolderMaskBridges( m_allowBridges->GetValue() );
833
834 // Initialize mask clearances
835 if( m_netClearance.IsNull() )
836 m_footprint->SetLocalClearance( {} );
837 else
838 m_footprint->SetLocalClearance( m_netClearance.GetValue() );
839
840 if( m_solderMask.IsNull() )
841 m_footprint->SetLocalSolderMaskMargin( {} );
842 else
843 m_footprint->SetLocalSolderMaskMargin( m_solderMask.GetValue() );
844
845 m_footprint->SetLocalSolderPasteMargin( m_solderPaste.GetOffsetValue() );
846 m_footprint->SetLocalSolderPasteMarginRatio( m_solderPaste.GetRatioValue() );
847
848 switch( m_ZoneConnectionChoice->GetSelection() )
849 {
850 default:
851 case 0: m_footprint->SetLocalZoneConnection( ZONE_CONNECTION::INHERITED ); break;
852 case 1: m_footprint->SetLocalZoneConnection( ZONE_CONNECTION::FULL ); break;
853 case 2: m_footprint->SetLocalZoneConnection( ZONE_CONNECTION::THERMAL ); break;
854 case 3: m_footprint->SetLocalZoneConnection( ZONE_CONNECTION::NONE ); break;
855 }
856
857 m_footprint->ClearNetTiePadGroups();
858
859 for( int ii = 0; ii < m_nettieGroupsGrid->GetNumberRows(); ++ii )
860 {
861 wxString group = m_nettieGroupsGrid->GetCellValue( ii, 0 );
862
863 if( !group.IsEmpty() )
864 m_footprint->AddNetTiePadGroup( group );
865 }
866
867 m_footprint->SetDuplicatePadNumbersAreJumpers( m_cbDuplicatePadsAreJumpers->GetValue() );
868
869 std::set<wxString> availablePads;
870
871 for( const PAD* pad : m_footprint->Pads() )
872 availablePads.insert( pad->GetNumber() );
873
874 std::vector<std::set<wxString>> newJumpers;
875
876 for( int ii = 0; ii < m_jumperGroupsGrid->GetNumberRows(); ++ii )
877 {
878 wxStringTokenizer tokenizer( m_jumperGroupsGrid->GetCellValue( ii, 0 ), ", \t\r\n", wxTOKEN_STRTOK );
879 std::set<wxString>& group = newJumpers.emplace_back();
880
881 while( tokenizer.HasMoreTokens() )
882 {
883 wxString token = tokenizer.GetNextToken();
884
885 if( token.IsEmpty() )
886 continue;
887
888 if( !availablePads.count( token ) )
889 {
890 wxString msg;
891 msg.Printf( _( "Pad '%s' in jumper pad group %d does not exist in this footprint." ),
892 token, ii + 1 );
893 DisplayErrorMessage( this, msg );
894 return false;
895 }
896
897 group.insert( token );
898 }
899 }
900
901 m_footprint->JumperPadGroups() = std::move( newJumpers );
902
903 // Copy the models from the panel to the footprint
904 std::vector<FP_3DMODEL>& panelList = m_3dPanel->GetModelList();
905 std::vector<FP_3DMODEL>* fpList = &m_footprint->Models();
906 fpList->clear();
907 fpList->insert( fpList->end(), panelList.begin(), panelList.end() );
908
909 commit.Push( _( "Edit Footprint Properties" ) );
910
911 return true;
912}
913
914
916{
917 m_itemsGrid->OnAddRow(
918 [&]() -> std::pair<int, int>
919 {
920 const BOARD_DESIGN_SETTINGS& dsnSettings = m_frame->GetDesignSettings();
921
923
924 // Set active layer if legal; otherwise copy layer from previous text item
925 if( LSET::AllTechMask().test( m_frame->GetActiveLayer() ) )
926 newField.SetLayer( m_frame->GetActiveLayer() );
927 else
928 newField.SetLayer( m_fields->at( m_fields->size() - 1 ).GetLayer() );
929
930 newField.SetTextSize( dsnSettings.GetTextSize( newField.GetLayer() ) );
931 newField.SetTextThickness( dsnSettings.GetTextThickness( newField.GetLayer() ) );
932 newField.SetItalic( dsnSettings.GetTextItalic( newField.GetLayer() ) );
933
934 m_fields->push_back( newField );
935
936 // notify the grid
937 wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
938 m_itemsGrid->ProcessTableMessage( msg );
939 OnModify();
940
941 return { m_fields->size() - 1, PFC_NAME };
942 } );
943}
944
945
947{
948 m_itemsGrid->OnDeleteRows(
949 [&]( int row )
950 {
951 if( row < m_fields->GetMandatoryRowCount() )
952 {
953 DisplayError( this, wxString::Format( _( "The first %d fields are mandatory." ),
954 m_fields->GetMandatoryRowCount() ) );
955 return false;
956 }
957
958 return true;
959 },
960 [&]( int row )
961 {
962 m_fields->erase( m_fields->begin() + row );
963
964 // notify the grid
965 wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, row, 1 );
966 m_itemsGrid->ProcessTableMessage( msg );
967 } );
968
969 OnModify();
970}
971
972
974 int aRow )
975{
976 aLayerTable.erase( aLayerTable.begin() + aRow );
977
978 // notify the grid
979 wxGridTableMessage msg( &aLayerTable, wxGRIDTABLE_NOTIFY_ROWS_DELETED, aRow, 1 );
980 aGrid.ProcessTableMessage( msg );
981
982 OnModify();
983}
984
985
987 LAYERS_GRID_TABLE& aGridTable )
988{
989 PCB_LAYER_ID nextLayer = User_1;
990
991 while( alg::contains( aGridTable, nextLayer ) && nextLayer < User_45 )
992 nextLayer = ToLAYER_ID( nextLayer + 2 );
993
994 aGridTable.push_back( nextLayer );
995
996 // notify the grid
997 wxGridTableMessage msg( &aGridTable, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
998 aGrid.ProcessTableMessage( msg );
999 OnModify();
1000
1001 return { aGridTable.size() - 1, -1 };
1002}
1003
1004
1006{
1007 m_privateLayersGrid->OnAddRow(
1008 [&]()
1009 {
1011 } );
1012}
1013
1014
1016{
1017 m_privateLayersGrid->OnDeleteRows(
1018 [&]( int row )
1019 {
1021 } );
1022}
1023
1024
1029
1030
1032{
1033 m_customUserLayersGrid->OnAddRow(
1034 [&]()
1035 {
1037 } );
1038}
1039
1040
1042{
1043 m_customUserLayersGrid->OnDeleteRows(
1044 [&]( int row )
1045 {
1047 } );
1048}
1049
1050
1055
1056
1061
1062
1067
1068
1073
1074
1076{
1077 aGrid->OnAddRow(
1078 [&]() -> std::pair<int, int>
1079 {
1080 aGrid->AppendRows( 1 );
1081 OnModify();
1082
1083 return { aGrid->GetNumberRows() - 1, 0 };
1084 } );
1085}
1086
1087
1089{
1090 aGrid->OnDeleteRows(
1091 [&]( int row )
1092 {
1093 aGrid->DeleteRows( row, 1 );
1094 } );
1095
1096 OnModify();
1097}
1098
1099
1101{
1102 // Handle a delayed focus. The delay allows us to:
1103 // a) change focus when the error was triggered from within a killFocus handler
1104 // b) show the correct notebook page in the background before the error dialog comes up
1105 // when triggered from an OK or a notebook page change
1106
1107 if( static_cast<int>( m_delayedFocusPage ) >= 0 )
1108 {
1109 if( m_NoteBook->GetSelection() != static_cast<int>( m_delayedFocusPage ) )
1110 m_NoteBook->ChangeSelection( static_cast<int>( m_delayedFocusPage ) );
1111
1113 }
1114
1115 if( !m_delayedErrorMessage.IsEmpty() )
1116 {
1117 // We will re-enter this routine when the error dialog is displayed, so make
1118 // sure we don't keep putting up more dialogs.
1119 wxString msg = m_delayedErrorMessage;
1120 m_delayedErrorMessage = wxEmptyString;
1121
1122 // Do not use DisplayErrorMessage(); it screws up window order on Mac
1123 DisplayError( nullptr, msg );
1124 }
1125
1126 if( m_delayedFocusCtrl )
1127 {
1128 m_delayedFocusCtrl->SetFocus();
1129
1130 if( wxTextEntry* textEntry = dynamic_cast<wxTextEntry*>( m_delayedFocusCtrl ) )
1131 textEntry->SelectAll();
1132
1133 m_delayedFocusCtrl = nullptr;
1134 }
1135 else if( m_delayedFocusGrid )
1136 {
1137 m_delayedFocusGrid->SetFocus();
1140
1141 if( !( m_delayedFocusColumn == 0 && m_delayedFocusRow < m_fields->GetMandatoryRowCount() ) )
1142 m_delayedFocusGrid->EnableCellEditControl( true );
1143
1144 m_delayedFocusGrid->ShowCellEditControl();
1145
1146 m_delayedFocusGrid = nullptr;
1147 m_delayedFocusRow = -1;
1149 }
1150}
1151
1152
1154{
1155 bool enableCustomCtrls = m_cbCustomLayers->GetValue();
1156
1157 m_copperLayerCount->Enable( enableCustomCtrls );
1158 m_customUserLayersGrid->Enable( enableCustomCtrls );
1159 m_bpAddCustomLayer->Enable( enableCustomCtrls );
1160 m_bpDeleteCustomLayer->Enable( enableCustomCtrls );
1161}
1162
1163
1165{
1166 if( !m_itemsGrid->CommitPendingChanges() )
1167 aEvent.Veto();
1168
1169 if( !m_privateLayersGrid->CommitPendingChanges() )
1170 aEvent.Veto();
1171
1172 if( !m_customUserLayersGrid->CommitPendingChanges() )
1173 aEvent.Veto();
1174}
1175
1176
1178{
1179 if( m_initialized )
1180 OnModify();
1181}
1182
1183
1185{
1186 if( m_initialized )
1187 OnModify();
1188}
1189
1190
1192{
1193 if( m_initialized )
1194 OnModify();
1195}
const char * name
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:112
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition bitmap.cpp:104
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Definition bitmap.cpp:110
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
Definition box2.h:990
static TOOL_ACTION selectionClear
Clear the current selection.
Definition actions.h:224
BASE_SET & set(size_t pos)
Definition base_set.h:116
Container for design settings for a BOARD object.
int GetTextThickness(PCB_LAYER_ID aLayer) const
Return the default text thickness from the layer class for the given layer.
bool GetTextItalic(PCB_LAYER_ID aLayer) const
VECTOR2I GetTextSize(PCB_LAYER_ID aLayer) const
Return the default text size from the layer class for the given layer.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:84
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition board_item.h:237
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition board_item.h:285
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:729
const LSET & GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
Definition board.cpp:968
DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Footprint Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(FOOTPRINT_EDIT_FRAME *aParent, FOOTPRINT *aFootprint)
LSET getCustomLayersFromControls() const
Get the layers for the footprint from the controls that can be affected by the stackup.
bool checkFootprintName(const wxString &aFootprintName, LIB_ID *doOverwrite)
void onLayerGridRowDelete(WX_GRID &aGrid, LAYERS_GRID_TABLE &aLayerTable, int aRow)
std::pair< int, int > onLayerGridRowAddUserLayer(WX_GRID &aGrid, LAYERS_GRID_TABLE &aLayerTable)
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
Definition dialog_shim.h:82
void SetupStandardButtons(std::map< int, wxString > aLabels={})
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:111
void ClearSelected()
Definition eda_item.h:143
bool IsSelected() const
Definition eda_item.h:128
int GetTextHeight() const
Definition eda_text.h:267
void SetTextSize(VECTOR2I aNewSize, bool aEnforceMinTextSize=true)
Definition eda_text.cpp:546
int GetTextWidth() const
Definition eda_text.h:264
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
Definition eda_text.cpp:298
int GetTextThickness() const
Definition eda_text.h:128
void SetItalic(bool aItalic)
Set the text to be italic - this will also update the font if needed.
Definition eda_text.cpp:321
VECTOR2I GetTextSize() const
Definition eda_text.h:261
An interface to the global shared library manager that is schematic-specific and linked to one projec...
bool FootprintExists(const wxString &aNickname, const wxString &aName)
Provide a custom wxValidator object for limiting the allowable characters when defining footprint nam...
Definition validators.h:53
static bool IsLibNameValid(const wxString &aName)
Test for validity of a name of a footprint to be used in a footprint library ( no spaces,...
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction, RECURSE_MODE aMode) const override
Invoke a function on all children.
static const wxChar * StringLibNameInvalidChars(bool aUserReadable)
Test for validity of the name in a library of the footprint ( no spaces, dir separators ....
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Definition grid_tricks.h:61
Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.
Definition kidialog.h:42
int ShowModal() override
Definition kidialog.cpp:93
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
Definition pcb_view.cpp:57
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
Definition pcb_view.cpp:74
LAYERS_GRID_TABLE(PCB_BASE_FRAME *aFrame, const LSET &aForbiddenLayers)
wxString GetValue(int aRow, int aCol) override
bool CanGetValueAs(int aRow, int aCol, const wxString &aTypeName) override
void SetValueAsLong(int aRow, int aCol, long aValue) override
long GetValueAsLong(int aRow, int aCol) override
bool CanSetValueAs(int aRow, int aCol, const wxString &aTypeName) override
void SetValue(int aRow, int aCol, const wxString &aValue) override
wxGridCellAttr * GetAttr(int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind) override
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:49
int SetLibItemName(const UTF8 &aLibItemName)
Override the library item name portion of the LIB_ID to aLibItemName.
Definition lib_id.cpp:111
bool IsValid() const
Check if this LID_ID is valid.
Definition lib_id.h:172
int SetLibNickname(const UTF8 &aLibNickname)
Override the logical library name portion of the LIB_ID to aLibNickname.
Definition lib_id.cpp:100
const UTF8 & GetLibItemName() const
Definition lib_id.h:102
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition lib_id.h:87
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
static const LSET & AllCuMask()
return AllCuMask( MAX_CU_LAYERS );
Definition lset.cpp:608
static const LSET & AllTechMask()
Return a mask holding all technical layers (no CU layer) on both side.
Definition lset.cpp:676
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition lset.cpp:599
static const LSET & AllLayersMask()
Definition lset.cpp:641
static LSET UserDefinedLayersMask(int aUserDefinedLayerCount=MAX_USER_DEFINED_LAYERS)
Return a mask with the requested number of user defined layers.
Definition lset.cpp:704
static const LSET & InternalCuMask()
Return a complete set of internal copper layers which is all Cu layers except F_Cu and B_Cu.
Definition lset.cpp:577
Definition pad.h:55
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
wxString GetName(bool aUseDefaultName=true) const
Return the field name (not translated).
PCB_FIELD * CloneField() const
Same as Clone, but returns a PCB_FIELD item.
Definition pcb_field.h:92
The selection tool: currently supports:
static FOOTPRINT_LIBRARY_ADAPTER * FootprintLibAdapter(PROJECT *aProject)
int AddItemToSel(const TOOL_EVENT &aEvent)
wxGridCellAttr * enhanceAttr(wxGridCellAttr *aInputAttr, int aRow, int aCol, wxGridCellAttr::wxAttrKind aKind)
Definition wx_grid.cpp:47
void OnDeleteRows(const std::function< void(int row)> &aDeleter)
Handles a row deletion event.
Definition wx_grid.cpp:742
void OnAddRow(const std::function< std::pair< int, int >()> &aAdder)
Definition wx_grid.cpp:722
Handle a list of polygons defining a copper zone.
Definition zone.h:73
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
Definition zone.h:136
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition confirm.cpp:202
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
Definition confirm.cpp:177
This file is part of the common library.
static LSET GetAllUsedFootprintLayers(const FOOTPRINT &aFootprint)
const int minSize
Push and Shove router track width and via size dialog.
#define _(s)
Declaration of the eda_3d_viewer class.
@ RECURSE
Definition eda_item.h:52
#define TEXT_MIN_SIZE_MM
Minimum text size (1 micron).
Definition eda_text.h:47
#define TEXT_MAX_SIZE_MM
Maximum text size in mm (~10 inches)
Definition eda_text.h:48
@ FP_SMD
Definition footprint.h:85
@ FP_DNP
Definition footprint.h:90
@ FP_EXCLUDE_FROM_POS_FILES
Definition footprint.h:86
@ FP_BOARD_ONLY
Definition footprint.h:88
@ FP_EXCLUDE_FROM_BOM
Definition footprint.h:87
@ FP_THROUGH_HOLE
Definition footprint.h:84
@ EXPAND_INNER_LAYERS
The 'normal' stackup handling, where there is a single inner layer (In1) and rule areas using it expa...
Definition footprint.h:99
@ CUSTOM_LAYERS
Stackup handling where the footprint can have any number of copper layers, and objects on those layer...
Definition footprint.h:104
int ClampTextPenSize(int aPenSize, int aSize, bool aStrict)
Pen width should not allow characters to become cluttered up in their own fatness.
Definition gr_text.cpp:73
static const std::string KiCadUriPrefix
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:60
@ User_45
Definition layer_ids.h:168
@ Edge_Cuts
Definition layer_ids.h:112
@ B_Cu
Definition layer_ids.h:65
@ Margin
Definition layer_ids.h:113
@ User_1
Definition layer_ids.h:124
@ F_Cu
Definition layer_ids.h:64
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition lset.cpp:754
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
wxString AccumulateNames(const LSEQ &aLayers, const BOARD *aBoard)
Accumulate layer names from a layer set into a comma separated string.
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
Definition kicad_algo.h:100
@ PFC_THICKNESS
see class PGM_BASE
wxString UnescapeString(const wxString &aSource)
wxString EscapeString(const wxString &aSource, ESCAPE_CONTEXT aContext)
The Escape/Unescape routines use HTML-entity-reference-style encoding to handle characters which are:...
@ CTX_LINE
wxString GetUserFieldName(int aFieldNdx, bool aTranslateForHI)
#define DO_TRANSLATE
@ USER
The field ID hasn't been set yet; field is invalid.
@ PCB_ZONE_T
class ZONE, a copper pour area
Definition typeinfo.h:108
Custom text control validator definitions.
@ THERMAL
Use thermal relief for pads.
Definition zones.h:50
@ NONE
Pads are not covered.
Definition zones.h:49
@ FULL
pads are covered by copper
Definition zones.h:51