From 18e17abd6ad9349fd695d658269e5e9f4a7e78fd Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 21 Sep 2020 19:32:07 -0400 Subject: [PATCH] Rename "Keepout" to "Rule Area" These objects can now be used in advanced DRC rules and not just for keeping things out. Also remove the restriction that at least one of the "basic" keepout rules must be set, so that these areas can be used for more advanced rules. --- pcbnew/CMakeLists.txt | 4 +- pcbnew/class_zone.cpp | 43 +++++------ pcbnew/class_zone.h | 8 +- pcbnew/dialogs/dialog_copper_zones.cpp | 2 +- ...es.cpp => dialog_rule_area_properties.cpp} | 35 +++------ ...p => dialog_rule_area_properties_base.cpp} | 28 ++++--- ...p => dialog_rule_area_properties_base.fbp} | 75 +++++++++++++++++-- ...e.h => dialog_rule_area_properties_base.h} | 9 ++- .../drc_test_provider_copper_clearance.cpp | 6 +- pcbnew/eagle_plugin.cpp | 8 +- pcbnew/exporters/gerber_jobfile_writer.cpp | 2 +- pcbnew/footprint_edit_frame.cpp | 2 +- pcbnew/footprint_editor_utils.cpp | 4 +- pcbnew/kicad_plugin.cpp | 6 +- pcbnew/legacy_plugin.cpp | 4 +- pcbnew/menubar_footprint_editor.cpp | 2 +- pcbnew/menubar_pcb_editor.cpp | 2 +- .../netlist_reader/board_netlist_updater.cpp | 6 +- pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp | 4 +- pcbnew/pcb_edit_frame.cpp | 2 +- pcbnew/pcb_parser.cpp | 11 +-- pcbnew/plugins/altium/altium_pcb.cpp | 8 +- .../cadstar/cadstar_pcb_archive_loader.cpp | 4 +- pcbnew/router/pns_kicad_iface.cpp | 2 +- .../specctra_export.cpp | 4 +- pcbnew/toolbars_footprint_editor.cpp | 2 +- pcbnew/toolbars_pcb_editor.cpp | 2 +- pcbnew/tools/convert_tool.cpp | 2 +- pcbnew/tools/drawing_tool.cpp | 4 +- pcbnew/tools/pcb_actions.cpp | 8 +- pcbnew/tools/pcb_actions.h | 2 +- pcbnew/tools/pcb_editor_control.cpp | 10 +-- pcbnew/tools/selection_tool.cpp | 4 +- pcbnew/tools/zone_create_helper.cpp | 4 +- .../widgets/panel_selection_filter_base.cpp | 2 +- .../widgets/panel_selection_filter_base.fbp | 2 +- pcbnew/zone_filler.cpp | 16 ++-- pcbnew/zone_settings.cpp | 8 +- pcbnew/zone_settings.h | 8 +- pcbnew/zones.h | 4 +- pcbnew/zones_by_polygon.cpp | 6 +- pcbnew/zones_functions_for_undo_redo.cpp | 4 +- pcbnew/zones_test_and_combine_areas.cpp | 6 +- 43 files changed, 217 insertions(+), 158 deletions(-) rename pcbnew/dialogs/{dialog_keepout_area_properties.cpp => dialog_rule_area_properties.cpp} (81%) rename pcbnew/dialogs/{dialog_keepout_area_properties_base.cpp => dialog_rule_area_properties_base.cpp} (77%) rename pcbnew/dialogs/{dialog_keepout_area_properties_base.fbp => dialog_rule_area_properties_base.fbp} (93%) rename pcbnew/dialogs/{dialog_keepout_area_properties_base.h => dialog_rule_area_properties_base.h} (79%) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 6b098c71b1..7939457179 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -109,8 +109,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_graphic_item_properties_base.cpp dialogs/dialog_import_settings.cpp dialogs/dialog_import_settings_base.cpp - dialogs/dialog_keepout_area_properties.cpp - dialogs/dialog_keepout_area_properties_base.cpp + dialogs/dialog_rule_area_properties.cpp + dialogs/dialog_rule_area_properties_base.cpp dialogs/dialog_layer_selection_base.cpp dialogs/dialog_move_exact.cpp dialogs/dialog_move_exact_base.cpp diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 37e4883b60..00e4170aca 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -58,12 +58,12 @@ ZONE_CONTAINER::ZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent, bool aInModule ) m_hatchBorderAlgorithm = 1; // 0 = use zone min thickness; 1 = use hatch width m_priority = 0; m_cornerSmoothingType = ZONE_SETTINGS::SMOOTHING_NONE; - SetIsKeepout( aInModule ? true : false ); // Zones living in modules have the keepout option. - SetDoNotAllowCopperPour( false ); // has meaning only if m_isKeepout == true - SetDoNotAllowVias( true ); // has meaning only if m_isKeepout == true - SetDoNotAllowTracks( true ); // has meaning only if m_isKeepout == true - SetDoNotAllowPads( true ); // has meaning only if m_isKeepout == true - SetDoNotAllowFootprints( false ); // has meaning only if m_isKeepout == true + SetIsRuleArea( aInModule ? true : false ); // Zones living in modules have the rule area option + SetDoNotAllowCopperPour( false ); // has meaning only if m_isRuleArea == true + SetDoNotAllowVias( true ); // has meaning only if m_isRuleArea == true + SetDoNotAllowTracks( true ); // has meaning only if m_isRuleArea == true + SetDoNotAllowPads( true ); // has meaning only if m_isRuleArea == true + SetDoNotAllowFootprints( false ); // has meaning only if m_isRuleArea == true m_cornerRadius = 0; SetLocalFlags( 0 ); // flags tempoarry used in zone calculations m_Poly = new SHAPE_POLY_SET(); // Outlines @@ -120,7 +120,7 @@ void ZONE_CONTAINER::InitDataFromSrcInCopyCtor( const ZONE_CONTAINER& aZone ) m_zoneName = aZone.m_zoneName; SetLayerSet( aZone.GetLayerSet() ); m_priority = aZone.m_priority; - m_isKeepout = aZone.m_isKeepout; + m_isRuleArea = aZone.m_isRuleArea; m_doNotAllowCopperPour = aZone.m_doNotAllowCopperPour; m_doNotAllowVias = aZone.m_doNotAllowVias; @@ -241,9 +241,9 @@ void ZONE_CONTAINER::SetLayer( PCB_LAYER_ID aLayer ) void ZONE_CONTAINER::SetLayerSet( LSET aLayerSet ) { - if( GetIsKeepout() ) + if( GetIsRuleArea() ) { - // Keepouts can only exist on copper layers + // Rule areas can only exist on copper layers aLayerSet &= LSET::AllCuMask(); } @@ -459,7 +459,7 @@ bool ZONE_CONTAINER::HitTest( const EDA_RECT& aRect, bool aContained, int aAccur int ZONE_CONTAINER::GetLocalClearance( wxString* aSource ) const { - if( m_isKeepout ) + if( m_isRuleArea ) return 0; if( aSource ) @@ -472,9 +472,9 @@ int ZONE_CONTAINER::GetLocalClearance( wxString* aSource ) const bool ZONE_CONTAINER::HitTestFilledArea( PCB_LAYER_ID aLayer, const wxPoint &aRefPos, int aAccuracy ) const { - // Keepouts have no filled area, but it's generally nice to treat their interior as if it were - // filled so that people don't have to select keepouts by their outline (which is min-width) - if( GetIsKeepout() ) + // Rule areas have no filled area, but it's generally nice to treat their interior as if it were + // filled so that people don't have to select them by their outline (which is min-width) + if( GetIsRuleArea() ) return m_Poly->Contains( VECTOR2I( aRefPos.x, aRefPos.y ), -1, aAccuracy ); if( !m_FilledPolysList.count( aLayer ) ) @@ -515,8 +515,8 @@ void ZONE_CONTAINER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vectorGetUserUnits(); wxString msg, msg2; - if( GetIsKeepout() ) - msg = _( "Keepout Area" ); + if( GetIsRuleArea() ) + msg = _( "Rule Area" ); else if( IsOnCopperLayer() ) msg = _( "Copper Zone" ); else @@ -529,7 +529,7 @@ void ZONE_CONTAINER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vectorGetCopperLayerCount(); - if( GetIsKeepout() ) + if( GetIsRuleArea() ) SetLayerSet( FlipLayerMask( GetLayerSet(), copperLayerCount ) ); else SetLayer( FlipLayer( GetLayer(), copperLayerCount ) ); @@ -842,8 +843,8 @@ wxString ZONE_CONTAINER::GetSelectMenuText( EDA_UNITS aUnits ) const if( m_CornerSelection != nullptr && m_CornerSelection->m_contour > 0 ) text << wxT( " " ) << _( "(Cutout)" ); - if( GetIsKeepout() ) - text << wxT( " " ) << _( "(Keepout)" ); + if( GetIsRuleArea() ) + text << wxT( " " ) << _( "(Rule Area)" ); else text << GetNetnameMsg(); @@ -1129,7 +1130,7 @@ void ZONE_CONTAINER::GetInteractingZones( PCB_LAYER_ID aLayer, if( !candidate->GetLayerSet().test( aLayer ) ) continue; - if( candidate->GetIsKeepout() ) + if( candidate->GetIsRuleArea() ) continue; if( candidate->GetNetCode() != GetNetCode() ) diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 57377d22da..e74e36cd24 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -719,16 +719,16 @@ public: EDA_ITEM* Clone() const override; /** - * Accessors to parameters used in Keepout zones: + * Accessors to parameters used in Rule Area zones: */ - bool GetIsKeepout() const { return m_isKeepout; } + bool GetIsRuleArea() const { return m_isRuleArea; } bool GetDoNotAllowCopperPour() const { return m_doNotAllowCopperPour; } bool GetDoNotAllowVias() const { return m_doNotAllowVias; } bool GetDoNotAllowTracks() const { return m_doNotAllowTracks; } bool GetDoNotAllowPads() const { return m_doNotAllowPads; } bool GetDoNotAllowFootprints() const { return m_doNotAllowFootprints; } - void SetIsKeepout( bool aEnable ) { m_isKeepout = aEnable; } + void SetIsRuleArea( bool aEnable ) {m_isRuleArea = aEnable; } void SetDoNotAllowCopperPour( bool aEnable ) { m_doNotAllowCopperPour = aEnable; } void SetDoNotAllowVias( bool aEnable ) { m_doNotAllowVias = aEnable; } void SetDoNotAllowTracks( bool aEnable ) { m_doNotAllowTracks = aEnable; } @@ -844,7 +844,7 @@ protected: /* A zone outline can be a keepout zone. * It will be never filled, and DRC should test for pads, tracks and vias */ - bool m_isKeepout; + bool m_isRuleArea; /* For keepout zones only: * what is not allowed inside the keepout ( pads, tracks and vias ) diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index ec48ba3340..7589c8d509 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -507,7 +507,7 @@ void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event ) { // Cannot export settings from a copper zone // to a zone keepout: - if( zone->GetIsKeepout() ) + if( zone->GetIsRuleArea() ) continue; m_settings.ExportSetting( *zone, false ); // false = partial export diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_rule_area_properties.cpp similarity index 81% rename from pcbnew/dialogs/dialog_keepout_area_properties.cpp rename to pcbnew/dialogs/dialog_rule_area_properties.cpp index 4f949ca2bf..be1e44b3f6 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_rule_area_properties.cpp @@ -32,17 +32,17 @@ #include #include #include -#include +#include #define LAYER_LIST_COLUMN_CHECK 0 #define LAYER_LIST_COLUMN_ICON 1 #define LAYER_LIST_COLUMN_NAME 2 #define LAYER_LIST_ROW_ALL_INNER_LAYERS 1 -class DIALOG_KEEPOUT_AREA_PROPERTIES : public DIALOG_KEEPOUT_AREA_PROPERTIES_BASE +class DIALOG_RULE_AREA_PROPERTIES : public DIALOG_RULE_AREA_PROPERTIES_BASE { public: - DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ); + DIALOG_RULE_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ); private: PCB_BASE_FRAME* m_parent; @@ -58,17 +58,17 @@ private: }; -int InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ) +int InvokeRuleAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ) { - DIALOG_KEEPOUT_AREA_PROPERTIES dlg( aCaller, aSettings ); + DIALOG_RULE_AREA_PROPERTIES dlg( aCaller, aSettings ); return dlg.ShowModal(); } -DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, - ZONE_SETTINGS* aSettings ) : - DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( aParent ) +DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, + ZONE_SETTINGS* aSettings ) : + DIALOG_RULE_AREA_PROPERTIES_BASE( aParent ) { m_parent = aParent; @@ -86,7 +86,7 @@ DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* } -bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataToWindow() +bool DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow() { // Init keepout parameters: m_cbTracksCtrl->SetValue( m_zonesettings.GetDoNotAllowTracks() ); @@ -112,7 +112,7 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataToWindow() } -void DIALOG_KEEPOUT_AREA_PROPERTIES::OnLayerSelection( wxDataViewEvent& event ) +void DIALOG_RULE_AREA_PROPERTIES::OnLayerSelection( wxDataViewEvent& event ) { if( event.GetColumn() != 0 ) return; @@ -137,27 +137,16 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::OnLayerSelection( wxDataViewEvent& event ) } -bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataFromWindow() +bool DIALOG_RULE_AREA_PROPERTIES::TransferDataFromWindow() { // Init keepout parameters: - m_zonesettings.SetIsKeepout( true ); + m_zonesettings.SetIsRuleArea( true ); m_zonesettings.SetDoNotAllowTracks( m_cbTracksCtrl->GetValue() ); m_zonesettings.SetDoNotAllowVias( m_cbViasCtrl->GetValue() ); m_zonesettings.SetDoNotAllowCopperPour( m_cbCopperPourCtrl->GetValue() ); m_zonesettings.SetDoNotAllowPads( m_cbPadsCtrl->GetValue() ); m_zonesettings.SetDoNotAllowFootprints( m_cbFootprintsCtrl->GetValue() ); - // Test for not allowed items: should have at least one item not allowed: - if( ! m_zonesettings.GetDoNotAllowTracks() && - ! m_zonesettings.GetDoNotAllowVias() && - ! m_zonesettings.GetDoNotAllowPads() && - ! m_zonesettings.GetDoNotAllowFootprints() && - ! m_zonesettings.GetDoNotAllowCopperPour() ) - { - DisplayError( NULL, _("No items are disallowed. The keepout will have no effect." ) ); - return false; - } - if( m_zonesettings.m_Layers.count() == 0 ) { DisplayError( NULL, _( "No layers selected." ) ); diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp b/pcbnew/dialogs/dialog_rule_area_properties_base.cpp similarity index 77% rename from pcbnew/dialogs/dialog_keepout_area_properties_base.cpp rename to pcbnew/dialogs/dialog_rule_area_properties_base.cpp index cb788762bd..a55e988353 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp +++ b/pcbnew/dialogs/dialog_rule_area_properties_base.cpp @@ -5,11 +5,11 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "dialog_keepout_area_properties_base.h" +#include "dialog_rule_area_properties_base.h" /////////////////////////////////////////////////////////////////////////// -DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +DIALOG_RULE_AREA_PROPERTIES_BASE::DIALOG_RULE_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); @@ -35,6 +35,10 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind wxBoxSizer* bSizerRight; bSizerRight = new wxBoxSizer( wxVERTICAL ); + m_staticTextBasicRules = new wxStaticText( this, wxID_ANY, _("Basic Rules"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextBasicRules->Wrap( -1 ); + bSizerRight->Add( m_staticTextBasicRules, 0, wxALL, 5 ); + m_cbTracksCtrl = new wxCheckBox( this, wxID_ANY, _("Keep out tracks"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerRight->Add( m_cbTracksCtrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); @@ -81,13 +85,15 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind wxBoxSizer* bSizer6; bSizer6 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText3 = new wxStaticText( this, wxID_ANY, _("Keepout name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3 = new wxStaticText( this, wxID_ANY, _("Area name:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText3->Wrap( -1 ); - m_staticText3->SetToolTip( _("A unique name for this zone to identify it for DRC") ); + m_staticText3->SetToolTip( _("A unique name for this rule area for use in DRC rules") ); bSizer6->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_tcName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_tcName->SetToolTip( _("A unique name for this rule area for use in DRC rules") ); + bSizer6->Add( m_tcName, 1, wxALL, 5 ); @@ -119,16 +125,16 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind this->Centre( wxBOTH ); // Connect Events - m_layers->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::OnLayerSelection ), NULL, this ); - m_layers->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::onLayerListRightDown ), NULL, this ); - m_layers->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::OnSizeLayersList ), NULL, this ); + m_layers->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_RULE_AREA_PROPERTIES_BASE::OnLayerSelection ), NULL, this ); + m_layers->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_RULE_AREA_PROPERTIES_BASE::onLayerListRightDown ), NULL, this ); + m_layers->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_RULE_AREA_PROPERTIES_BASE::OnSizeLayersList ), NULL, this ); } -DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE() +DIALOG_RULE_AREA_PROPERTIES_BASE::~DIALOG_RULE_AREA_PROPERTIES_BASE() { // Disconnect Events - m_layers->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::OnLayerSelection ), NULL, this ); - m_layers->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::onLayerListRightDown ), NULL, this ); - m_layers->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::OnSizeLayersList ), NULL, this ); + m_layers->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_RULE_AREA_PROPERTIES_BASE::OnLayerSelection ), NULL, this ); + m_layers->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_RULE_AREA_PROPERTIES_BASE::onLayerListRightDown ), NULL, this ); + m_layers->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_RULE_AREA_PROPERTIES_BASE::OnSizeLayersList ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp b/pcbnew/dialogs/dialog_rule_area_properties_base.fbp similarity index 93% rename from pcbnew/dialogs/dialog_keepout_area_properties_base.fbp rename to pcbnew/dialogs/dialog_rule_area_properties_base.fbp index a1716962c2..20ff9cc9a8 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp +++ b/pcbnew/dialogs/dialog_rule_area_properties_base.fbp @@ -11,12 +11,12 @@ res UTF-8 connect - dialog_keepout_area_properties_base + dialog_rule_area_properties_base 1000 none 1 - dialog_keepout_areas_properties_base + dialog_rule_areas_properties_base . @@ -43,12 +43,12 @@ wxID_ANY -1,-1 - DIALOG_KEEPOUT_AREA_PROPERTIES_BASE + DIALOG_RULE_AREA_PROPERTIES_BASE -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h - Keepout Area Properties + Rule Area Properties @@ -178,6 +178,67 @@ bSizerRight wxVERTICAL none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Basic Rules + 0 + + 0 + + + 0 + + 1 + m_staticTextBasicRules + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + 5 wxTOP|wxRIGHT|wxLEFT|wxEXPAND @@ -769,7 +830,7 @@ 0 0 wxID_ANY - Keepout name: + Area name: 0 0 @@ -791,7 +852,7 @@ ; ; forward_declare 0 - A unique name for this zone to identify it for DRC + A unique name for this rule area for use in DRC rules @@ -851,7 +912,7 @@ ; ; forward_declare 0 - + A unique name for this rule area for use in DRC rules wxFILTER_NONE wxDefaultValidator diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.h b/pcbnew/dialogs/dialog_rule_area_properties_base.h similarity index 79% rename from pcbnew/dialogs/dialog_keepout_area_properties_base.h rename to pcbnew/dialogs/dialog_rule_area_properties_base.h index 3a24ac3558..e9fc152db3 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties_base.h +++ b/pcbnew/dialogs/dialog_rule_area_properties_base.h @@ -30,15 +30,16 @@ /////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE +/// Class DIALOG_RULE_AREA_PROPERTIES_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM +class DIALOG_RULE_AREA_PROPERTIES_BASE : public DIALOG_SHIM { private: protected: wxStaticText* m_staticTextLayerSelection; wxDataViewListCtrl* m_layers; + wxStaticText* m_staticTextBasicRules; wxCheckBox* m_cbTracksCtrl; wxCheckBox* m_cbViasCtrl; wxCheckBox* m_cbPadsCtrl; @@ -62,8 +63,8 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM public: - DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Keepout Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN ); - ~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE(); + DIALOG_RULE_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Rule Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN ); + ~DIALOG_RULE_AREA_PROPERTIES_BASE(); }; diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index 0b1c6ad679..d9e2d4018a 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -477,7 +477,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::doTrackDrc( TRACK* aRefSeg, PCB_LAYER_I if( m_drcEngine->IsErrorLimitExceeded( DRCE_CLEARANCE ) ) break; - if( !zone->GetLayerSet().test( aLayer ) || zone->GetIsKeepout() ) + if( !zone->GetLayerSet().test( aLayer ) || zone->GetIsRuleArea() ) continue; if( zone->GetNetCode() && zone->GetNetCode() == aRefSeg->GetNetCode() ) @@ -722,7 +722,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZones() continue; // test for different types - if( zoneRef->GetIsKeepout() != zoneToTest->GetIsKeepout() ) + if( zoneRef->GetIsRuleArea() != zoneToTest->GetIsRuleArea() ) continue; // Examine a candidate zone: compare zoneToTest to zoneRef @@ -736,7 +736,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZones() // Keepout areas have no clearance, so set zone2zoneClearance to 1 // ( zone2zoneClearance = 0 can create problems in test functions) - if( zoneRef->GetIsKeepout() ) // fixme: really? + if( zoneRef->GetIsRuleArea() ) // fixme: really? zone2zoneClearance = 1; // test for some corners of zoneRef inside zoneToTest diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index fe3832bad5..e268ed12c3 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -180,7 +180,7 @@ static void setKeepoutSettingsToZone( ZONE_CONTAINER* aZone, LAYER_NUM aLayer ) { if( aLayer == EAGLE_LAYER::TRESTRICT || aLayer == EAGLE_LAYER::BRESTRICT ) { - aZone->SetIsKeepout( true ); + aZone->SetIsRuleArea( true ); aZone->SetDoNotAllowVias( true ); aZone->SetDoNotAllowTracks( true ); aZone->SetDoNotAllowCopperPour( true ); @@ -194,7 +194,7 @@ static void setKeepoutSettingsToZone( ZONE_CONTAINER* aZone, LAYER_NUM aLayer ) } else if( aLayer == EAGLE_LAYER::VRESTRICT ) { - aZone->SetIsKeepout( true ); + aZone->SetIsRuleArea( true ); aZone->SetDoNotAllowVias( true ); aZone->SetDoNotAllowTracks( false ); aZone->SetDoNotAllowCopperPour( false ); @@ -1318,7 +1318,7 @@ ZONE_CONTAINER* EAGLE_PLUGIN::loadPolygon( wxXmlNode* aPolyNode ) // If the pour is a cutout it needs to be set to a keepout if( p.pour == EPOLYGON::CUTOUT ) { - zone->SetIsKeepout( true ); + zone->SetIsRuleArea( true ); zone->SetDoNotAllowVias( false ); zone->SetDoNotAllowTracks( false ); zone->SetDoNotAllowPads( false ); @@ -2422,7 +2422,7 @@ void EAGLE_PLUGIN::loadSignals( wxXmlNode* aSignals ) { zones.push_back( zone ); - if( !zone->GetIsKeepout() ) + if( !zone->GetIsRuleArea() ) zone->SetNetCode( netCode ); } diff --git a/pcbnew/exporters/gerber_jobfile_writer.cpp b/pcbnew/exporters/gerber_jobfile_writer.cpp index e2f2b962ac..49f674be06 100644 --- a/pcbnew/exporters/gerber_jobfile_writer.cpp +++ b/pcbnew/exporters/gerber_jobfile_writer.cpp @@ -518,7 +518,7 @@ void GERBER_JOBFILE_WRITER::addJSONDesignRules() for( ZONE_CONTAINER* zone : m_pcb->Zones() ) { - if( zone->GetIsKeepout() || !zone->IsOnCopperLayer() ) + if( zone->GetIsRuleArea() || !zone->IsOnCopperLayer() ) continue; for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() ) diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index ac49ee4834..969aba2cea 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -1010,7 +1010,7 @@ void FOOTPRINT_EDIT_FRAME::setupUIConditions() CURRENT_EDIT_TOOL( PCB_ACTIONS::drawCircle ); CURRENT_EDIT_TOOL( PCB_ACTIONS::drawArc ); CURRENT_EDIT_TOOL( PCB_ACTIONS::drawPolygon ); - CURRENT_EDIT_TOOL( PCB_ACTIONS::drawZoneKeepout ); + CURRENT_EDIT_TOOL( PCB_ACTIONS::drawRuleArea ); CURRENT_EDIT_TOOL( PCB_ACTIONS::placeText ); CURRENT_EDIT_TOOL( PCB_ACTIONS::setAnchor ); CURRENT_EDIT_TOOL( PCB_ACTIONS::gridSetOrigin ); diff --git a/pcbnew/footprint_editor_utils.cpp b/pcbnew/footprint_editor_utils.cpp index 092550977c..72887f162b 100644 --- a/pcbnew/footprint_editor_utils.cpp +++ b/pcbnew/footprint_editor_utils.cpp @@ -387,9 +387,9 @@ void FOOTPRINT_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem ) zoneSettings << *static_cast( aItem ); - if( zone->GetIsKeepout() ) + if( zone->GetIsRuleArea() ) { - success = InvokeKeepoutAreaEditor( this, &zoneSettings ); + success = InvokeRuleAreaEditor( this, &zoneSettings ); } else if( zone->IsOnCopperLayer() ) { diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 231c1bccf7..56f9dc3fbc 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1714,8 +1714,8 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const // so be sure a dummy value is stored, just for ZONE_CONTAINER compatibility // (perhaps netcode and netname should be not stored) m_out->Print( aNestLevel, "(zone (net %d) (net_name %s)", - aZone->GetIsKeepout() ? 0 : m_mapping->Translate( aZone->GetNetCode() ), - m_out->Quotew( aZone->GetIsKeepout() ? wxT("") : aZone->GetNetname() ).c_str() ); + aZone->GetIsRuleArea() ? 0 : m_mapping->Translate( aZone->GetNetCode() ), + m_out->Quotew( aZone->GetIsRuleArea() ? wxT("") : aZone->GetNetname() ).c_str() ); // If a zone exists on multiple layers, format accordingly if( aZone->GetLayerSet().count() > 1 ) @@ -1783,7 +1783,7 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const m_out->Print( 0, "\n" ); - if( aZone->GetIsKeepout() ) + if( aZone->GetIsRuleArea() ) { m_out->Print( aNestLevel+1, "(keepout (tracks %s) (vias %s) (pads %s ) (copperpour %s) (footprints %s))\n", aZone->GetDoNotAllowTracks() ? "not_allowed" : "allowed", diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 3432b99bbc..981ae19c00 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2544,7 +2544,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() else if( TESTLINE( "ZKeepout" ) ) { char* token; - zc->SetIsKeepout( true ); + zc->SetIsRuleArea( true ); zc->SetDoNotAllowPads( false ); // Not supported in legacy zc->SetDoNotAllowFootprints( false ); // Not supported in legacy @@ -2700,7 +2700,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() { // Ensure keepout does not have a net // (which have no sense for a keepout zone) - if( zc->GetIsKeepout() ) + if( zc->GetIsRuleArea() ) zc->SetNetCode( NETINFO_LIST::UNCONNECTED ); // should always occur, but who knows, a zone without two corners diff --git a/pcbnew/menubar_footprint_editor.cpp b/pcbnew/menubar_footprint_editor.cpp index b243b2b6a5..e740415821 100644 --- a/pcbnew/menubar_footprint_editor.cpp +++ b/pcbnew/menubar_footprint_editor.cpp @@ -192,7 +192,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar() placeMenu->Add( PCB_ACTIONS::drawCircle ); placeMenu->Add( PCB_ACTIONS::drawLine ); placeMenu->Add( PCB_ACTIONS::drawPolygon ); - placeMenu->Add( PCB_ACTIONS::drawZoneKeepout ); + placeMenu->Add( PCB_ACTIONS::drawRuleArea ); placeMenu->AppendSeparator(); placeMenu->Add( PCB_ACTIONS::setAnchor ); diff --git a/pcbnew/menubar_pcb_editor.cpp b/pcbnew/menubar_pcb_editor.cpp index b5681f560f..e0fa3b5ebd 100644 --- a/pcbnew/menubar_pcb_editor.cpp +++ b/pcbnew/menubar_pcb_editor.cpp @@ -311,7 +311,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() placeMenu->Add( PCB_ACTIONS::placeModule ); placeMenu->Add( PCB_ACTIONS::drawVia ); placeMenu->Add( PCB_ACTIONS::drawZone ); - placeMenu->Add( PCB_ACTIONS::drawZoneKeepout ); + placeMenu->Add( PCB_ACTIONS::drawRuleArea ); placeMenu->Add( PCB_ACTIONS::placeText ); placeMenu->Add( PCB_ACTIONS::drawArc ); placeMenu->Add( PCB_ACTIONS::drawRectangle ); diff --git a/pcbnew/netlist_reader/board_netlist_updater.cpp b/pcbnew/netlist_reader/board_netlist_updater.cpp index 3eee17a84e..b011c60bfa 100644 --- a/pcbnew/netlist_reader/board_netlist_updater.cpp +++ b/pcbnew/netlist_reader/board_netlist_updater.cpp @@ -484,7 +484,7 @@ void BOARD_NETLIST_UPDATER::cacheCopperZoneConnections() { for( ZONE_CONTAINER* zone : m_board->Zones() ) { - if( !zone->IsOnCopperLayer() || zone->GetIsKeepout() ) + if( !zone->IsOnCopperLayer() || zone->GetIsRuleArea() ) continue; m_zoneConnectionsCache[ zone ] = m_board->GetConnectivity()->GetConnectedPads( zone ); @@ -557,7 +557,7 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist ) // Test copper zones to detect "dead" nets (nets without any pad): for( ZONE_CONTAINER* zone : m_board->Zones() ) { - if( !zone->IsOnCopperLayer() || zone->GetIsKeepout() ) + if( !zone->IsOnCopperLayer() || zone->GetIsRuleArea() ) continue; if( netlistNetnames.count( zone->GetNetname() ) == 0 ) @@ -690,7 +690,7 @@ bool BOARD_NETLIST_UPDATER::deleteSinglePadNets() if( !zone->IsOnCopperLayer() ) continue; - if( zone->GetIsKeepout() ) + if( zone->GetIsRuleArea() ) continue; if( zone->GetNetname() == getNetname( previouspad ) ) diff --git a/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp b/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp index 4477720745..5868e5a918 100644 --- a/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp +++ b/pcbnew/pcad2kicadpcb_plugin/pcb_polygon.cpp @@ -207,7 +207,7 @@ void PCB_POLYGON::AddToBoard() if ( m_objType == wxT( 'K' ) ) { - zone->SetIsKeepout( true ); + zone->SetIsRuleArea( true ); zone->SetDoNotAllowTracks( true ); zone->SetDoNotAllowVias( true ); zone->SetDoNotAllowPads( true ); @@ -217,7 +217,7 @@ void PCB_POLYGON::AddToBoard() else if( m_objType == wxT( 'C' ) ) { // convert cutouts to keepouts because standalone cutouts are not supported in KiCad - zone->SetIsKeepout( true ); + zone->SetIsRuleArea( true ); zone->SetDoNotAllowCopperPour( true ); zone->SetDoNotAllowTracks( false ); zone->SetDoNotAllowVias( false ); diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 814e0a4063..010ecea937 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -734,7 +734,7 @@ void PCB_EDIT_FRAME::setupUIConditions() CURRENT_EDIT_TOOL( PCB_ACTIONS::routeSingleTrack); CURRENT_EDIT_TOOL( PCB_ACTIONS::drawVia ); CURRENT_EDIT_TOOL( PCB_ACTIONS::drawZone ); - CURRENT_EDIT_TOOL( PCB_ACTIONS::drawZoneKeepout ); + CURRENT_EDIT_TOOL( PCB_ACTIONS::drawRuleArea ); CURRENT_EDIT_TOOL( PCB_ACTIONS::drawLine ); CURRENT_EDIT_TOOL( PCB_ACTIONS::drawRectangle ); CURRENT_EDIT_TOOL( PCB_ACTIONS::drawCircle ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 1b30727f7a..74e95fdff0 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -4466,12 +4466,12 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent ) break; case T_chamfer: - if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones + if( !zone->GetIsRuleArea() ) // smoothing has meaning only for filled zones zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_CHAMFER ); break; case T_fillet: - if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones + if( !zone->GetIsRuleArea() ) // smoothing has meaning only for filled zones zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_FILLET ); break; @@ -4483,7 +4483,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent ) case T_radius: tmp = parseBoardUnits( "corner radius" ); - if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones + if( !zone->GetIsRuleArea() ) // smoothing has meaning only for filled zones zone->SetCornerRadius( tmp ); NeedRIGHT(); break; @@ -4517,7 +4517,8 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent ) break; case T_keepout: - zone->SetIsKeepout( true ); + // "keepout" now means rule area, but the file token stays the same + zone->SetIsRuleArea( true ); // Initialize these two because their tokens won't appear in older files: zone->SetDoNotAllowPads( false ); @@ -4734,7 +4735,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent ) // Ensure keepout and non copper zones do not have a net // (which have no sense for these zones) // the netcode 0 is used for these zones - bool zone_has_net = zone->IsOnCopperLayer() && !zone->GetIsKeepout(); + bool zone_has_net = zone->IsOnCopperLayer() && !zone->GetIsRuleArea(); if( !zone_has_net ) zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); diff --git a/pcbnew/plugins/altium/altium_pcb.cpp b/pcbnew/plugins/altium/altium_pcb.cpp index 497fac92b9..34400152e4 100644 --- a/pcbnew/plugins/altium/altium_pcb.cpp +++ b/pcbnew/plugins/altium/altium_pcb.cpp @@ -1425,7 +1425,7 @@ void ALTIUM_PCB::ParseShapeBasedRegions6Data( ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board ); m_board->Add( zone, ADD_MODE::APPEND ); - zone->SetIsKeepout( true ); + zone->SetIsRuleArea( true ); zone->SetDoNotAllowTracks( false ); zone->SetDoNotAllowVias( false ); zone->SetDoNotAllowPads( false ); @@ -1613,7 +1613,7 @@ void ALTIUM_PCB::ParseArcs6Data( m_board->Add( zone, ADD_MODE::APPEND ); zone->SetLayer( klayer ); - zone->SetIsKeepout( true ); + zone->SetIsRuleArea( true ); zone->SetDoNotAllowTracks( false ); zone->SetDoNotAllowVias( false ); zone->SetDoNotAllowPads( false ); @@ -2168,7 +2168,7 @@ void ALTIUM_PCB::ParseTracks6Data( ZONE_CONTAINER* zone = new ZONE_CONTAINER( m_board ); m_board->Add( zone, ADD_MODE::APPEND ); zone->SetLayer( klayer ); - zone->SetIsKeepout( true ); + zone->SetIsRuleArea( true ); zone->SetDoNotAllowTracks( false ); zone->SetDoNotAllowVias( false ); zone->SetDoNotAllowPads( false ); @@ -2434,7 +2434,7 @@ void ALTIUM_PCB::ParseFills6Data( if( elem.is_keepout ) { - zone->SetIsKeepout( true ); + zone->SetIsRuleArea( true ); zone->SetDoNotAllowTracks( false ); zone->SetDoNotAllowVias( false ); zone->SetDoNotAllowPads( false ); diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp index 1e225772fb..8bc67a4f00 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp @@ -514,7 +514,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryAreas( const SYMDEF& aComponent, MOD else zone->SetLayer( getKiCadLayer( area.LayerID ) ); - zone->SetIsKeepout( true ); //import all CADSTAR areas as Keepout zones + zone->SetIsRuleArea( true ); //import all CADSTAR areas as Keepout zones zone->SetDoNotAllowPads( false ); //no CADSTAR equivalent zone->SetZoneName( area.ID ); @@ -871,7 +871,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadAreas() else zone->SetLayer( getKiCadLayer( area.LayerID ) ); - zone->SetIsKeepout( true ); //import all CADSTAR areas as Keepout zones + zone->SetIsRuleArea( true ); //import all CADSTAR areas as Keepout zones zone->SetDoNotAllowPads( false ); //no CADSTAR equivalent zone->SetZoneName( area.Name ); diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 1ef98c18bc..af380ddee6 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -736,7 +736,7 @@ bool PNS_KICAD_IFACE_BASE::syncZone( PNS::NODE* aWorld, ZONE_CONTAINER* aZone ) SHAPE_POLY_SET poly; // TODO handle no-via restriction - if( !aZone->GetIsKeepout() || !aZone->GetDoNotAllowTracks() ) + if( !aZone->GetIsRuleArea() || !aZone->GetDoNotAllowTracks() ) return false; LSET layers = aZone->GetLayerSet(); diff --git a/pcbnew/specctra_import_export/specctra_export.cpp b/pcbnew/specctra_import_export/specctra_export.cpp index e9faab9215..07296bbac9 100644 --- a/pcbnew/specctra_import_export/specctra_export.cpp +++ b/pcbnew/specctra_import_export/specctra_export.cpp @@ -1077,7 +1077,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) { ZONE_CONTAINER* item = (ZONE_CONTAINER*) items[i]; - if( item->GetIsKeepout() ) + if( item->GetIsRuleArea() ) continue; // Currently, we export only copper layers @@ -1195,7 +1195,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) { ZONE_CONTAINER* item = (ZONE_CONTAINER*) items[i]; - if( ! item->GetIsKeepout() ) + if( !item->GetIsRuleArea() ) continue; // keepout areas have a type. types are diff --git a/pcbnew/toolbars_footprint_editor.cpp b/pcbnew/toolbars_footprint_editor.cpp index f15d1590c4..03cfcd8502 100644 --- a/pcbnew/toolbars_footprint_editor.cpp +++ b/pcbnew/toolbars_footprint_editor.cpp @@ -154,7 +154,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateVToolbar() m_drawToolBar->Add( PCB_ACTIONS::drawCircle, ACTION_TOOLBAR::TOGGLE ); m_drawToolBar->Add( PCB_ACTIONS::drawArc, ACTION_TOOLBAR::TOGGLE ); m_drawToolBar->Add( PCB_ACTIONS::drawPolygon, ACTION_TOOLBAR::TOGGLE ); - m_drawToolBar->Add( PCB_ACTIONS::drawZoneKeepout, ACTION_TOOLBAR::TOGGLE ); + m_drawToolBar->Add( PCB_ACTIONS::drawRuleArea, ACTION_TOOLBAR::TOGGLE ); m_drawToolBar->Add( PCB_ACTIONS::placeText, ACTION_TOOLBAR::TOGGLE ); m_drawToolBar->Add( ACTIONS::deleteTool, ACTION_TOOLBAR::TOGGLE ); diff --git a/pcbnew/toolbars_pcb_editor.cpp b/pcbnew/toolbars_pcb_editor.cpp index 3508a7021e..6aea39a62f 100644 --- a/pcbnew/toolbars_pcb_editor.cpp +++ b/pcbnew/toolbars_pcb_editor.cpp @@ -369,7 +369,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar() m_drawToolBar->Add( PCB_ACTIONS::routeSingleTrack, ACTION_TOOLBAR::TOGGLE ); m_drawToolBar->Add( PCB_ACTIONS::drawVia, ACTION_TOOLBAR::TOGGLE ); m_drawToolBar->Add( PCB_ACTIONS::drawZone, ACTION_TOOLBAR::TOGGLE ); - m_drawToolBar->Add( PCB_ACTIONS::drawZoneKeepout, ACTION_TOOLBAR::TOGGLE ); + m_drawToolBar->Add( PCB_ACTIONS::drawRuleArea, ACTION_TOOLBAR::TOGGLE ); m_drawToolBar->AddScaledSeparator( this ); m_drawToolBar->Add( PCB_ACTIONS::drawLine, ACTION_TOOLBAR::TOGGLE ); diff --git a/pcbnew/tools/convert_tool.cpp b/pcbnew/tools/convert_tool.cpp index 10efa06ffb..31541f60c7 100644 --- a/pcbnew/tools/convert_tool.cpp +++ b/pcbnew/tools/convert_tool.cpp @@ -187,7 +187,7 @@ int CONVERT_TOOL::LinesToPoly( const TOOL_EVENT& aEvent ) int ret; if( aEvent.IsAction( &PCB_ACTIONS::convertToKeepout ) ) - ret = InvokeKeepoutAreaEditor( frame, &zoneInfo ); + ret = InvokeRuleAreaEditor( frame, &zoneInfo ); else ret = InvokeCopperZonesEditor( frame, &zoneInfo ); diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 32898a1159..afc27f9662 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1638,7 +1638,7 @@ int DRAWING_TOOL::DrawZone( const TOOL_EVENT& aEvent ) ZONE_MODE zoneMode = aEvent.Parameter(); MODE drawMode = MODE::ZONE; - if( aEvent.IsAction( &PCB_ACTIONS::drawZoneKeepout ) ) + if( aEvent.IsAction( &PCB_ACTIONS::drawRuleArea ) ) drawMode = MODE::KEEPOUT; if( aEvent.IsAction( &PCB_ACTIONS::drawPolygon ) ) @@ -2179,7 +2179,7 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::DrawDimension, PCB_ACTIONS::drawCenterDimension.MakeEvent() ); Go( &DRAWING_TOOL::DrawDimension, PCB_ACTIONS::drawLeader.MakeEvent() ); Go( &DRAWING_TOOL::DrawZone, PCB_ACTIONS::drawZone.MakeEvent() ); - Go( &DRAWING_TOOL::DrawZone, PCB_ACTIONS::drawZoneKeepout.MakeEvent() ); + Go( &DRAWING_TOOL::DrawZone, PCB_ACTIONS::drawRuleArea.MakeEvent() ); Go( &DRAWING_TOOL::DrawZone, PCB_ACTIONS::drawZoneCutout.MakeEvent() ); Go( &DRAWING_TOOL::DrawZone, PCB_ACTIONS::drawSimilarZone.MakeEvent() ); Go( &DRAWING_TOOL::DrawVia, PCB_ACTIONS::drawVia.MakeEvent() ); diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index c2b2efac33..7d4dc5a512 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -63,8 +63,8 @@ TOOL_ACTION PCB_ACTIONS::convertToZone( "pcbnew.Convert.convertToZone", add_zone_xpm ); TOOL_ACTION PCB_ACTIONS::convertToKeepout( "pcbnew.Convert.convertToKeepout", - AS_GLOBAL, 0, "", _( "Convert to Keepout" ), - _( "Creates a keepout zone from the selection" ), add_keepout_area_xpm ); + AS_GLOBAL, 0, "", _( "Convert to Rule Area" ), + _( "Creates a rule area from the selection" ), add_keepout_area_xpm ); TOOL_ACTION PCB_ACTIONS::convertToLines( "pcbnew.Convert.convertToLines", AS_GLOBAL, 0, "", _( "Convert to Lines" ), _( "Creates graphic lines from the selection" ), @@ -149,10 +149,10 @@ TOOL_ACTION PCB_ACTIONS::drawVia( "pcbnew.InteractiveDrawing.via", _( "Add Vias" ), _( "Add free-standing vias" ), add_via_xpm, AF_ACTIVATE ); -TOOL_ACTION PCB_ACTIONS::drawZoneKeepout( "pcbnew.InteractiveDrawing.keepout", +TOOL_ACTION PCB_ACTIONS::drawRuleArea( "pcbnew.InteractiveDrawing.ruleArea", AS_GLOBAL, MD_SHIFT + MD_CTRL + 'K', LEGACY_HK_NAME( "Add Keepout Area" ), - _( "Add Keepout Area" ), _( "Add a keepout area" ), + _( "Add Rule Area" ), _( "Add a rule area (keepout)" ), add_keepout_area_xpm, AF_ACTIVATE, (void*) ZONE_MODE::ADD ); TOOL_ACTION PCB_ACTIONS::drawZoneCutout( "pcbnew.InteractiveDrawing.zoneCutout", diff --git a/pcbnew/tools/pcb_actions.h b/pcbnew/tools/pcb_actions.h index 36f0a27b0a..93e341395f 100644 --- a/pcbnew/tools/pcb_actions.h +++ b/pcbnew/tools/pcb_actions.h @@ -147,7 +147,7 @@ public: static TOOL_ACTION drawLeader; static TOOL_ACTION drawZone; static TOOL_ACTION drawVia; - static TOOL_ACTION drawZoneKeepout; + static TOOL_ACTION drawRuleArea; static TOOL_ACTION drawZoneCutout; static TOOL_ACTION drawSimilarZone; static TOOL_ACTION placeTarget; diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index 54975bebd2..c7b709a219 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -1435,7 +1435,7 @@ int PCB_EDITOR_CONTROL::ZoneMerge( const TOOL_EVENT& aEvent ) if( curr_area->GetPriority() != firstZone->GetPriority() ) continue; - if( curr_area->GetIsKeepout() != firstZone->GetIsKeepout() ) + if( curr_area->GetIsRuleArea() != firstZone->GetIsRuleArea() ) continue; if( curr_area->GetLayer() != firstZone->GetLayer() ) @@ -1480,8 +1480,8 @@ int PCB_EDITOR_CONTROL::ZoneDuplicate( const TOOL_EVENT& aEvent ) zoneSettings << *oldZone; int dialogResult; - if( oldZone->GetIsKeepout() ) - dialogResult = InvokeKeepoutAreaEditor( m_frame, &zoneSettings ); + if( oldZone->GetIsRuleArea() ) + dialogResult = InvokeRuleAreaEditor( m_frame, &zoneSettings ); else if( oldZone->IsOnCopperLayer() ) dialogResult = InvokeCopperZonesEditor( m_frame, &zoneSettings ); else @@ -1500,9 +1500,9 @@ int PCB_EDITOR_CONTROL::ZoneDuplicate( const TOOL_EVENT& aEvent ) // If the new zone is on the same layer(s) as the the initial zone, // offset it a bit so it can more easily be picked. - if( oldZone->GetIsKeepout() && ( oldZone->GetLayerSet() == zoneSettings.m_Layers ) ) + if( oldZone->GetIsRuleArea() && ( oldZone->GetLayerSet() == zoneSettings.m_Layers ) ) newZone->Move( wxPoint( IU_PER_MM, IU_PER_MM ) ); - else if( !oldZone->GetIsKeepout() && zoneSettings.m_Layers.test( oldZone->GetLayer() ) ) + else if( !oldZone->GetIsRuleArea() && zoneSettings.m_Layers.test( oldZone->GetLayer() ) ) newZone->Move( wxPoint( IU_PER_MM, IU_PER_MM ) ); commit.Add( newZone.release() ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 64f1112aee..ed306f85f2 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1497,8 +1497,8 @@ bool SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem ) { ZONE_CONTAINER* zone = static_cast( aItem ); - if( ( !m_filter.zones && !zone->GetIsKeepout() ) - || ( !m_filter.keepouts && zone->GetIsKeepout() ) ) + if( ( !m_filter.zones && !zone->GetIsRuleArea() ) + || ( !m_filter.keepouts && zone->GetIsRuleArea() ) ) { return false; } diff --git a/pcbnew/tools/zone_create_helper.cpp b/pcbnew/tools/zone_create_helper.cpp index e0464b4025..3eaf08fcc2 100644 --- a/pcbnew/tools/zone_create_helper.cpp +++ b/pcbnew/tools/zone_create_helper.cpp @@ -61,7 +61,7 @@ std::unique_ptr ZONE_CREATE_HELPER::createNewZone( bool aKeepout ZONE_SETTINGS zoneInfo = frame->GetZoneSettings(); zoneInfo.m_Layers.reset().set( m_params.m_layer ); // TODO(JE) multilayer defaults? zoneInfo.m_NetcodeSelection = highlightedNets.empty() ? -1 : *highlightedNets.begin(); - zoneInfo.SetIsKeepout( m_params.m_keepout ); + zoneInfo.SetIsRuleArea( m_params.m_keepout ); zoneInfo.m_Zone_45_Only = ( m_params.m_leaderMode == POLYGON_GEOM_MANAGER::LEADER_MODE::DEG45 ); // If we don't have a net from highlighing, maybe we can get one from the selection @@ -84,7 +84,7 @@ std::unique_ptr ZONE_CREATE_HELPER::createNewZone( bool aKeepout int dialogResult; if( m_params.m_keepout ) - dialogResult = InvokeKeepoutAreaEditor( frame, &zoneInfo ); + dialogResult = InvokeRuleAreaEditor( frame, &zoneInfo ); else { // TODO(JE) combine these dialogs? diff --git a/pcbnew/widgets/panel_selection_filter_base.cpp b/pcbnew/widgets/panel_selection_filter_base.cpp index 0baf98c5f5..539af7fc0f 100644 --- a/pcbnew/widgets/panel_selection_filter_base.cpp +++ b/pcbnew/widgets/panel_selection_filter_base.cpp @@ -56,7 +56,7 @@ PANEL_SELECTION_FILTER_BASE::PANEL_SELECTION_FILTER_BASE( wxWindow* parent, wxWi m_cbZones->SetValue(true); gbSizer1->Add( m_cbZones, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 ); - m_cbKeepouts = new wxCheckBox( this, wxID_ANY, wxT("Keepouts"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbKeepouts = new wxCheckBox( this, wxID_ANY, wxT("Rule Areas"), wxDefaultPosition, wxDefaultSize, 0 ); m_cbKeepouts->SetValue(true); gbSizer1->Add( m_cbKeepouts, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 ); diff --git a/pcbnew/widgets/panel_selection_filter_base.fbp b/pcbnew/widgets/panel_selection_filter_base.fbp index 5f43bee923..d5e09b1d62 100644 --- a/pcbnew/widgets/panel_selection_filter_base.fbp +++ b/pcbnew/widgets/panel_selection_filter_base.fbp @@ -709,7 +709,7 @@ 0 0 wxID_ANY - Keepouts + Rule Areas 0 diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 9143a3520f..e756d3a6bb 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -129,8 +129,8 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWin { zone->CacheBoundingBox(); - // Keepout zones are not filled - if( zone->GetIsKeepout() ) + // Rule areas are not filled + if( zone->GetIsRuleArea() ) continue; m_commit->Modify( zone ); @@ -169,7 +169,7 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWin // Even if keepouts exclude copper pours the exclusion is by outline, not by // filled area, so we're good-to-go here too. - if( aOtherZone->GetIsKeepout() ) + if( aOtherZone->GetIsRuleArea() ) return false; // If the zones share no common layers @@ -313,7 +313,7 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWin for( ZONE_CONTAINER* zone : aZones ) { // Keepout zones are not filled - if( zone->GetIsKeepout() ) + if( zone->GetIsRuleArea() ) continue; zone->SetIsFilled( true ); @@ -387,7 +387,7 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWin for( ZONE_CONTAINER* zone : aZones ) { // Keepout zones are not filled - if( zone->GetIsKeepout() ) + if( zone->GetIsRuleArea() ) continue; for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() ) @@ -829,7 +829,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE_CONTAINER* aZone, PCB_LA if( aKnockout->GetBoundingBox().Intersects( zone_boundingbox ) ) { - if( aKnockout->GetIsKeepout() + if( aKnockout->GetIsRuleArea() || aZone->GetNetCode() == aKnockout->GetNetCode() ) { // Keepouts and same-net zones use outline with no clearance @@ -860,7 +860,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE_CONTAINER* aZone, PCB_LA if( otherZone == aZone ) continue; - if( otherZone->GetIsKeepout() ) + if( otherZone->GetIsRuleArea() ) { if( otherZone->GetDoNotAllowCopperPour() ) knockoutZone( otherZone ); @@ -876,7 +876,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE_CONTAINER* aZone, PCB_LA { for( ZONE_CONTAINER* otherZone : module->Zones() ) { - if( otherZone->GetIsKeepout() ) + if( otherZone->GetIsRuleArea() ) { if( otherZone->GetDoNotAllowCopperPour() ) knockoutZone( otherZone ); diff --git a/pcbnew/zone_settings.cpp b/pcbnew/zone_settings.cpp index 36b8f2c220..d40b203a4b 100644 --- a/pcbnew/zone_settings.cpp +++ b/pcbnew/zone_settings.cpp @@ -80,7 +80,7 @@ ZONE_SETTINGS::ZONE_SETTINGS() m_removeIslands = ISLAND_REMOVAL_MODE::ALWAYS; m_minIslandArea = 0; - SetIsKeepout( false ); + SetIsRuleArea( false ); SetDoNotAllowCopperPour( false ); SetDoNotAllowVias( true ); SetDoNotAllowTracks( true ); @@ -110,7 +110,7 @@ ZONE_SETTINGS& ZONE_SETTINGS::operator << ( const ZONE_CONTAINER& aSource ) m_padConnection = aSource.GetPadConnection(); m_cornerSmoothingType = aSource.GetCornerSmoothingType(); m_cornerRadius = aSource.GetCornerRadius(); - m_isKeepout = aSource.GetIsKeepout(); + m_isRuleArea = aSource.GetIsRuleArea(); m_keepoutDoNotAllowCopperPour = aSource.GetDoNotAllowCopperPour(); m_keepoutDoNotAllowVias = aSource.GetDoNotAllowVias(); m_keepoutDoNotAllowTracks = aSource.GetDoNotAllowTracks(); @@ -143,7 +143,7 @@ void ZONE_SETTINGS::ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport ) c aTarget.SetPadConnection( m_padConnection ); aTarget.SetCornerSmoothingType( m_cornerSmoothingType ); aTarget.SetCornerRadius( m_cornerRadius ); - aTarget.SetIsKeepout( GetIsKeepout() ); + aTarget.SetIsRuleArea( GetIsRuleArea() ); aTarget.SetDoNotAllowCopperPour( GetDoNotAllowCopperPour() ); aTarget.SetDoNotAllowVias( GetDoNotAllowVias() ); aTarget.SetDoNotAllowTracks( GetDoNotAllowTracks() ); @@ -159,7 +159,7 @@ void ZONE_SETTINGS::ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport ) c aTarget.SetLayerSet( m_Layers ); aTarget.SetZoneName( m_Name ); - if( !m_isKeepout ) + if( !m_isRuleArea ) aTarget.SetNetCode( m_NetcodeSelection ); } diff --git a/pcbnew/zone_settings.h b/pcbnew/zone_settings.h index 8a1c04c4b6..d25a590a03 100644 --- a/pcbnew/zone_settings.h +++ b/pcbnew/zone_settings.h @@ -113,7 +113,7 @@ private: * Keepout zones and keepout flags. * Note that DRC rules can set keepouts on zones whether they're a keepout or not. */ - bool m_isKeepout; + bool m_isRuleArea; bool m_keepoutDoNotAllowCopperPour; bool m_keepoutDoNotAllowVias; @@ -175,16 +175,16 @@ public: } /** - * Accessors to parameters used in Keepout zones: + * Accessors to parameters used in Rule Area zones: */ - const bool GetIsKeepout() const { return m_isKeepout; } + const bool GetIsRuleArea() const { return m_isRuleArea; } const bool GetDoNotAllowCopperPour() const { return m_keepoutDoNotAllowCopperPour; } const bool GetDoNotAllowVias() const { return m_keepoutDoNotAllowVias; } const bool GetDoNotAllowTracks() const { return m_keepoutDoNotAllowTracks; } const bool GetDoNotAllowPads() const { return m_keepoutDoNotAllowPads; } const bool GetDoNotAllowFootprints() const { return m_keepoutDoNotAllowFootprints; } - void SetIsKeepout( bool aEnable ) { m_isKeepout = aEnable; } + void SetIsRuleArea( bool aEnable ) { m_isRuleArea = aEnable; } void SetDoNotAllowCopperPour( bool aEnable ) { m_keepoutDoNotAllowCopperPour = aEnable; } void SetDoNotAllowVias( bool aEnable ) { m_keepoutDoNotAllowVias = aEnable; } void SetDoNotAllowTracks( bool aEnable ) { m_keepoutDoNotAllowTracks = aEnable; } diff --git a/pcbnew/zones.h b/pcbnew/zones.h index 541ba40592..a75586f828 100644 --- a/pcbnew/zones.h +++ b/pcbnew/zones.h @@ -74,7 +74,7 @@ int InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSetting int InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ); /** - * Function InvokeKeepoutAreaEditor + * Function InvokeRuleAreaEditor * invokes up a modal dialog window for copper zone editing. * * @param aCaller is the PCB_BASE_FRAME calling parent window for the modal dialog, @@ -82,6 +82,6 @@ int InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ) * @param aSettings points to the ZONE_SETTINGS to edit. * @return int - tells if user aborted, changed only one zone, or all of them. */ -int InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ); +int InvokeRuleAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ); #endif // ZONES_H_ diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 1edf3dbce0..34693643e7 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -57,11 +57,11 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( ZONE_CONTAINER* aZone ) s_PickedList.ClearListAndDeleteItems(); SaveCopyOfZones( s_PickedList, GetBoard(), -1, UNDEFINED_LAYER ); - if( aZone->GetIsKeepout() ) + if( aZone->GetIsRuleArea() ) { - // edit a keepout area on a copper layer + // edit a rule area on a copper layer zoneInfo << *aZone; - dialogResult = InvokeKeepoutAreaEditor( this, &zoneInfo ); + dialogResult = InvokeRuleAreaEditor( this, &zoneInfo ); } else if( IsCopperLayer( aZone->GetLayer() ) ) { diff --git a/pcbnew/zones_functions_for_undo_redo.cpp b/pcbnew/zones_functions_for_undo_redo.cpp index 9187cb52db..7adcdda77f 100644 --- a/pcbnew/zones_functions_for_undo_redo.cpp +++ b/pcbnew/zones_functions_for_undo_redo.cpp @@ -72,10 +72,10 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare ) return false; // Compare zone specific parameters - if( GetIsKeepout() != aZoneToCompare.GetIsKeepout() ) + if( GetIsRuleArea() != aZoneToCompare.GetIsRuleArea() ) return false; - if( GetIsKeepout() ) + if( GetIsRuleArea() ) { if( GetDoNotAllowCopperPour() != aZoneToCompare.GetDoNotAllowCopperPour() ) return false; diff --git a/pcbnew/zones_test_and_combine_areas.cpp b/pcbnew/zones_test_and_combine_areas.cpp index 3c4062d634..639e2c4b30 100644 --- a/pcbnew/zones_test_and_combine_areas.cpp +++ b/pcbnew/zones_test_and_combine_areas.cpp @@ -90,7 +90,7 @@ bool BOARD::CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList, int aNetCode, if( curr_area->GetPriority() != area2->GetPriority() ) continue; - if( curr_area->GetIsKeepout() != area2->GetIsKeepout() ) + if( curr_area->GetIsRuleArea() != area2->GetIsRuleArea() ) continue; if( curr_area->GetLayerSet() != area2->GetLayerSet() ) @@ -145,11 +145,11 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test ) continue; // test for different types - if( area_to_test->GetIsKeepout() != area2->GetIsKeepout() ) + if( area_to_test->GetIsRuleArea() != area2->GetIsRuleArea() ) continue; // Keepout area-specific tests - if( area_to_test->GetIsKeepout() ) + if( area_to_test->GetIsRuleArea() ) { if( area_to_test->GetDoNotAllowCopperPour() != area2->GetDoNotAllowCopperPour() ) continue;