ADDED Exclude Footprint from Courtyard Requirement.

Fixes https://gitlab.com/kicad/code/kicad/issues/9881
This commit is contained in:
Jeff Young 2021-12-07 19:24:26 +00:00
parent d649b288a6
commit 09b7e0b72b
13 changed files with 166 additions and 7 deletions

View File

@ -28,6 +28,7 @@ add_net
addsublayer
aligned
allowed
allow_missing_courtyard
allow_soldermask_bridges
anchor
angle

View File

@ -266,6 +266,7 @@ bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow()
m_boardOnly->SetValue( m_footprint->GetAttributes() & FP_BOARD_ONLY );
m_excludeFromPosFiles->SetValue( m_footprint->GetAttributes() & FP_EXCLUDE_FROM_POS_FILES );
m_excludeFromBOM->SetValue( m_footprint->GetAttributes() & FP_EXCLUDE_FROM_BOM );
m_noCourtyards->SetValue( m_footprint->GetAttributes() & FP_ALLOW_MISSING_COURTYARD );
// Local Clearances
@ -435,6 +436,9 @@ bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataFromWindow()
if( m_excludeFromBOM->GetValue() )
attributes |= FP_EXCLUDE_FROM_BOM;
if( m_noCourtyards->GetValue() )
attributes |= FP_ALLOW_MISSING_COURTYARD;
if( m_allowSolderMaskBridges->GetValue() )
attributes |= FP_ALLOW_SOLDERMASK_BRIDGES;

View File

@ -203,6 +203,11 @@ DIALOG_FOOTPRINT_PROPERTIES_BASE::DIALOG_FOOTPRINT_PROPERTIES_BASE( wxWindow* pa
m_excludeFromBOM = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exclude from BOM"), wxDefaultPosition, wxDefaultSize, 0 );
sbFabSizer->Add( m_excludeFromBOM, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_noCourtyards = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exempt from courtyard requirement"), wxDefaultPosition, wxDefaultSize, 0 );
m_noCourtyards->SetToolTip( _("Will not generate \"missing courtyard\" DRC violations") );
sbFabSizer->Add( m_noCourtyards, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerMiddle->Add( sbFabSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );

View File

@ -1556,6 +1556,70 @@
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Exempt from courtyard requirement</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_noCourtyards</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Will not generate &quot;missing courtyard&quot; DRC violations</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>

View File

@ -72,6 +72,7 @@ class DIALOG_FOOTPRINT_PROPERTIES_BASE : public DIALOG_SHIM
wxCheckBox* m_boardOnly;
wxCheckBox* m_excludeFromPosFiles;
wxCheckBox* m_excludeFromBOM;
wxCheckBox* m_noCourtyards;
wxButton* m_buttonUpdate;
wxButton* m_buttonExchange;
wxButton* m_buttonModuleEditor;

View File

@ -281,6 +281,7 @@ bool DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow()
m_boardOnly->SetValue( m_footprint->GetAttributes() & FP_BOARD_ONLY );
m_excludeFromPosFiles->SetValue( m_footprint->GetAttributes() & FP_EXCLUDE_FROM_POS_FILES );
m_excludeFromBOM->SetValue( m_footprint->GetAttributes() & FP_EXCLUDE_FROM_BOM );
m_noCourtyards->SetValue( m_footprint->GetAttributes() & FP_ALLOW_MISSING_COURTYARD );
// Local Clearances
@ -490,6 +491,9 @@ bool DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataFromWindow()
if( m_excludeFromBOM->GetValue() )
attributes |= FP_EXCLUDE_FROM_BOM;
if( m_noCourtyards->GetValue() )
attributes |= FP_ALLOW_MISSING_COURTYARD;
if( m_allowBridges->GetValue() )
attributes |= FP_ALLOW_SOLDERMASK_BRIDGES;

View File

@ -207,6 +207,11 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITO
m_excludeFromBOM = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exclude from BOM"), wxDefaultPosition, wxDefaultSize, 0 );
sbFabSizer->Add( m_excludeFromBOM, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_noCourtyards = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exempt from courtyard requirement"), wxDefaultPosition, wxDefaultSize, 0 );
m_noCourtyards->SetToolTip( _("Will not generate \"missing courtyard\" DRC violations") );
sbFabSizer->Add( m_noCourtyards, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerProperties->Add( sbFabSizer, 1, wxEXPAND|wxRIGHT, 5 );

View File

@ -1460,6 +1460,70 @@
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Exempt from courtyard requirement</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_noCourtyards</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Will not generate &quot;missing courtyard&quot; DRC violations</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>

View File

@ -66,6 +66,7 @@ class DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE : public DIALOG_SHIM
wxCheckBox* m_boardOnly;
wxCheckBox* m_excludeFromPosFiles;
wxCheckBox* m_excludeFromBOM;
wxCheckBox* m_noCourtyards;
wxPanel* m_PanelClearances;
wxStaticText* m_staticTextInfo;
wxStaticText* m_NetClearanceLabel;

View File

@ -123,6 +123,9 @@ bool DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testFootprintCourtyardDefinitions()
if( m_drcEngine->IsErrorLimitExceeded( DRCE_MISSING_COURTYARD ) )
continue;
if( footprint->GetAttributes() & FP_ALLOW_MISSING_COURTYARD )
continue;
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_MISSING_COURTYARD );
drcItem->SetItems( footprint );
reportViolation( drcItem, footprint->GetPosition() );

View File

@ -71,7 +71,8 @@ enum FOOTPRINT_ATTR_T
FP_EXCLUDE_FROM_BOM = 0x0008,
FP_BOARD_ONLY = 0x0010, // Footprint has no corresponding symbol
FP_JUST_ADDED = 0x0020, // Footprint just added by netlist update
FP_ALLOW_SOLDERMASK_BRIDGES = 0x0040
FP_ALLOW_SOLDERMASK_BRIDGES = 0x0040,
FP_ALLOW_MISSING_COURTYARD = 0x0080
};
class FP_3DMODEL

View File

@ -3467,6 +3467,9 @@ FOOTPRINT* PCB_PARSER::parseFOOTPRINT_unchecked( wxArrayString* aInitialComments
attributes |= FP_EXCLUDE_FROM_BOM;
break;
case T_allow_missing_courtyard:
attributes |= FP_ALLOW_MISSING_COURTYARD;
case T_allow_soldermask_bridges:
attributes |= FP_ALLOW_SOLDERMASK_BRIDGES;
break;

View File

@ -1212,6 +1212,9 @@ void PCB_PLUGIN::format( const FOOTPRINT* aFootprint, int aNestLevel ) const
if( aFootprint->GetAttributes() & FP_EXCLUDE_FROM_BOM )
m_out->Print( 0, " exclude_from_bom" );
if( aFootprint->GetAttributes() & FP_ALLOW_MISSING_COURTYARD )
m_out->Print( 0, " allow_missing_courtyard" );
if( aFootprint->GetAttributes() & FP_ALLOW_SOLDERMASK_BRIDGES )
m_out->Print( 0, " allow_soldermask_bridges" );