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.
This commit is contained in:
parent
6ee866ba6e
commit
18e17abd6a
|
@ -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
|
||||
|
|
|
@ -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::vector<MSG_PA
|
|||
EDA_UNITS units = aFrame->GetUserUnits();
|
||||
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::vector<MSG_PA
|
|||
|
||||
aList.emplace_back( _( "Type" ), msg, DARKCYAN );
|
||||
|
||||
if( GetIsKeepout() )
|
||||
if( GetIsRuleArea() )
|
||||
{
|
||||
msg.Empty();
|
||||
|
||||
|
@ -548,7 +548,8 @@ void ZONE_CONTAINER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
|
|||
if( GetDoNotAllowFootprints() )
|
||||
AccumulateDescription( msg, _( "No footprints" ) );
|
||||
|
||||
aList.emplace_back( MSG_PANEL_ITEM( _( "Keepout" ), msg, RED ) );
|
||||
if( !msg.IsEmpty() )
|
||||
aList.emplace_back( MSG_PANEL_ITEM( _( "Restrictions" ), msg, RED ) );
|
||||
}
|
||||
else if( IsOnCopperLayer() )
|
||||
{
|
||||
|
@ -716,7 +717,7 @@ void ZONE_CONTAINER::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
|||
Mirror( aCentre, aFlipLeftRight );
|
||||
int copperLayerCount = GetBoard()->GetCopperLayerCount();
|
||||
|
||||
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() )
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -32,17 +32,17 @@
|
|||
#include <class_zone.h>
|
||||
#include <zones.h>
|
||||
#include <zone_settings.h>
|
||||
#include <dialog_keepout_area_properties_base.h>
|
||||
#include <dialog_rule_area_properties_base.h>
|
||||
|
||||
#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,
|
||||
DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES( PCB_BASE_FRAME* aParent,
|
||||
ZONE_SETTINGS* aSettings ) :
|
||||
DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( aParent )
|
||||
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." ) );
|
|
@ -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 );
|
||||
|
||||
}
|
|
@ -11,12 +11,12 @@
|
|||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_keepout_area_properties_base</property>
|
||||
<property name="file">dialog_rule_area_properties_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_keepout_areas_properties_base</property>
|
||||
<property name="name">dialog_rule_areas_properties_base</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
|
@ -43,12 +43,12 @@
|
|||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">DIALOG_KEEPOUT_AREA_PROPERTIES_BASE</property>
|
||||
<property name="name">DIALOG_RULE_AREA_PROPERTIES_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Keepout Area Properties</property>
|
||||
<property name="title">Rule Area Properties</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
|
@ -178,6 +178,67 @@
|
|||
<property name="name">bSizerRight</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" 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="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">Basic Rules</property>
|
||||
<property name="markup">0</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_staticTextBasicRules</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"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
|
@ -769,7 +830,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Keepout name:</property>
|
||||
<property name="label">Area name:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
|
@ -791,7 +852,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">A unique name for this zone to identify it for DRC</property>
|
||||
<property name="tooltip">A unique name for this rule area for use in DRC rules</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -851,7 +912,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="tooltip">A unique name for this rule area for use in DRC rules</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
|
@ -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();
|
||||
|
||||
};
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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() )
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -387,9 +387,9 @@ void FOOTPRINT_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
|
|||
|
||||
zoneSettings << *static_cast<ZONE_CONTAINER*>( aItem );
|
||||
|
||||
if( zone->GetIsKeepout() )
|
||||
if( zone->GetIsRuleArea() )
|
||||
{
|
||||
success = InvokeKeepoutAreaEditor( this, &zoneSettings );
|
||||
success = InvokeRuleAreaEditor( this, &zoneSettings );
|
||||
}
|
||||
else if( zone->IsOnCopperLayer() )
|
||||
{
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 ) )
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -1638,7 +1638,7 @@ int DRAWING_TOOL::DrawZone( const TOOL_EVENT& aEvent )
|
|||
ZONE_MODE zoneMode = aEvent.Parameter<ZONE_MODE>();
|
||||
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() );
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -1497,8 +1497,8 @@ bool SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem )
|
|||
{
|
||||
ZONE_CONTAINER* zone = static_cast<ZONE_CONTAINER*>( 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;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ std::unique_ptr<ZONE_CONTAINER> 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_CONTAINER> 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?
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -709,7 +709,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Keepouts</property>
|
||||
<property name="label">Rule Areas</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
|
|
@ -129,8 +129,8 @@ bool ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*>& 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<ZONE_CONTAINER*>& 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<ZONE_CONTAINER*>& 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<ZONE_CONTAINER*>& 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 );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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() ) )
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue