TEARDROP_MANAGER: add option to add teardrops on pads in zones.
This commit is contained in:
parent
8393e02524
commit
3a66f33d96
|
@ -461,6 +461,7 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
|
|||
entry["td_onroundshapesonly"] = m_TeardropParamsList.m_UseRoundShapesOnly;
|
||||
entry["td_allow_use_two_tracks"] = m_TeardropParamsList.m_AllowUseTwoTracks;
|
||||
entry["td_curve_segcount"] = m_TeardropParamsList.m_CurveSegCount;
|
||||
entry["td_on_pad_in_zone"] = m_TeardropParamsList.m_TdOnPadsInZones;
|
||||
|
||||
js.push_back( entry );
|
||||
|
||||
|
@ -476,21 +477,26 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
|
|||
if( entry.empty() || !entry.is_object() )
|
||||
continue;
|
||||
|
||||
if( !entry.contains( "td_onviapad" )
|
||||
|| !entry.contains( "td_onpadsmd" )
|
||||
|| !entry.contains( "td_ontrackend" )
|
||||
|| !entry.contains( "td_onroundshapesonly" )
|
||||
|| !entry.contains( "td_allow_use_two_tracks" )
|
||||
|| !entry.contains( "td_curve_segcount" )
|
||||
)
|
||||
continue;
|
||||
if( entry.contains( "td_onviapad" ) )
|
||||
m_TeardropParamsList.m_TargetViasPads = entry["td_onviapad"].get<bool>();
|
||||
|
||||
m_TeardropParamsList.m_TargetViasPads = entry["td_onviapad"].get<bool>();
|
||||
m_TeardropParamsList.m_TargetPadsWithNoHole = entry["td_onpadsmd"].get<bool>();
|
||||
m_TeardropParamsList.m_TargetTrack2Track = entry["td_ontrackend"].get<bool>();
|
||||
m_TeardropParamsList.m_UseRoundShapesOnly = entry["td_onroundshapesonly"].get<bool>();
|
||||
m_TeardropParamsList.m_AllowUseTwoTracks = entry["td_allow_use_two_tracks"].get<bool>();
|
||||
m_TeardropParamsList.m_CurveSegCount = entry["td_curve_segcount"].get<int>();
|
||||
if( entry.contains( "td_onpadsmd" ) )
|
||||
m_TeardropParamsList.m_TargetPadsWithNoHole = entry["td_onpadsmd"].get<bool>();
|
||||
|
||||
if( entry.contains( "td_ontrackend" ) )
|
||||
m_TeardropParamsList.m_TargetTrack2Track = entry["td_ontrackend"].get<bool>();
|
||||
|
||||
if( entry.contains( "td_onroundshapesonly" ) )
|
||||
m_TeardropParamsList.m_UseRoundShapesOnly = entry["td_onroundshapesonly"].get<bool>();
|
||||
|
||||
if( entry.contains( "td_allow_use_two_tracks" ) )
|
||||
m_TeardropParamsList.m_AllowUseTwoTracks = entry["td_allow_use_two_tracks"].get<bool>();
|
||||
|
||||
if( entry.contains( "td_curve_segcount" ) )
|
||||
m_TeardropParamsList.m_CurveSegCount = entry["td_curve_segcount"].get<int>();
|
||||
|
||||
if( entry.contains( "td_on_pad_in_zone" ) )
|
||||
m_TeardropParamsList.m_TdOnPadsInZones = entry["td_on_pad_in_zone"].get<bool>();
|
||||
}
|
||||
},
|
||||
{} ) );
|
||||
|
|
|
@ -64,6 +64,7 @@ public:
|
|||
m_cbSmdSimilarPads->SetValue( prmsList->m_TargetPadsWithNoHole );
|
||||
m_cbRoundShapesOnly->SetValue( prmsList->m_UseRoundShapesOnly );
|
||||
m_cbTrack2Track->SetValue( prmsList->m_TargetTrack2Track );
|
||||
m_cbPadsInZones->SetValue( prmsList->m_TdOnPadsInZones );
|
||||
|
||||
m_cbOptUseNextTrack->SetValue( prmsList->m_AllowUseTwoTracks );
|
||||
m_spPointCount->SetValue( prmsList->m_CurveSegCount );
|
||||
|
@ -110,6 +111,7 @@ public:
|
|||
prmsList->m_TargetPadsWithNoHole = m_cbSmdSimilarPads->GetValue();
|
||||
prmsList->m_UseRoundShapesOnly = m_cbRoundShapesOnly->GetValue();
|
||||
prmsList->m_TargetTrack2Track = m_cbTrack2Track->GetValue();
|
||||
prmsList->m_TdOnPadsInZones = m_cbPadsInZones->GetValue();
|
||||
|
||||
prmsList->m_AllowUseTwoTracks = m_cbOptUseNextTrack->GetValue();
|
||||
prmsList->m_CurveSegCount = m_spPointCount->GetValue();
|
||||
|
@ -206,16 +208,11 @@ void PCB_EDIT_FRAME::OnRunTeardropTool( wxCommandEvent& event )
|
|||
dlg.TransferToParamList();
|
||||
TEARDROP_MANAGER trdm( GetBoard(), this );
|
||||
|
||||
const bool discardTeardropInSameZone = true;
|
||||
|
||||
int added_count = trdm.SetTeardrops( &committer,
|
||||
discardTeardropInSameZone,
|
||||
dlg.CanUseTwoTracks() );
|
||||
int added_count = trdm.SetTeardrops( &committer, dlg.CanUseTwoTracks() );
|
||||
|
||||
m_infoBar->RemoveAllButtons();
|
||||
m_infoBar->AddCloseButton();
|
||||
m_infoBar->ShowMessageFor( wxString::Format( _( "%d Teardrops created" ),
|
||||
added_count ),
|
||||
m_infoBar->ShowMessageFor( wxString::Format( _( "%d Teardrops created" ), added_count ),
|
||||
1000, wxICON_EXCLAMATION );
|
||||
}
|
||||
|
||||
|
|
|
@ -47,25 +47,25 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
m_stMaxLenRound = new wxStaticText( this, wxID_ANY, _("Max length"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stMaxLenRound->Wrap( -1 );
|
||||
fgSizerParmRound->Add( m_stMaxLenRound, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmRound->Add( m_stMaxLenRound, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_tcTdMaxLenRound = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerParmRound->Add( m_tcTdMaxLenRound, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_stTdMaxSizeRound = new wxStaticText( this, wxID_ANY, _("Max height"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stTdMaxSizeRound->Wrap( -1 );
|
||||
fgSizerParmRound->Add( m_stTdMaxSizeRound, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmRound->Add( m_stTdMaxSizeRound, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_tcMaxHeightRound = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerParmRound->Add( m_tcMaxHeightRound, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_stLenUnitRound = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stLenUnitRound->Wrap( -1 );
|
||||
fgSizerParmRound->Add( m_stLenUnitRound, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerParmRound->Add( m_stLenUnitRound, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_stHsettingRound = new wxStaticText( this, wxID_ANY, _("Best length"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stHsettingRound->Wrap( -1 );
|
||||
fgSizerParmRound->Add( m_stHsettingRound, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmRound->Add( m_stHsettingRound, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spTeardropLenPercentRound = new wxSpinCtrlDouble( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 20, 100, 50.000000, 10 );
|
||||
m_spTeardropLenPercentRound->SetDigits( 0 );
|
||||
|
@ -73,7 +73,7 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
m_stVsettingRound = new wxStaticText( this, wxID_ANY, _("Best height"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stVsettingRound->Wrap( -1 );
|
||||
fgSizerParmRound->Add( m_stVsettingRound, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmRound->Add( m_stVsettingRound, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spTeardropSizePercentRound = new wxSpinCtrlDouble( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 60, 100, 100.000000, 10 );
|
||||
m_spTeardropSizePercentRound->SetDigits( 0 );
|
||||
|
@ -81,7 +81,7 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
m_stLenPercentRound = new wxStaticText( this, wxID_ANY, _("percent of d"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stLenPercentRound->Wrap( -1 );
|
||||
fgSizerParmRound->Add( m_stLenPercentRound, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerParmRound->Add( m_stLenPercentRound, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizerBitmaps->Add( fgSizerParmRound, 1, wxEXPAND, 5 );
|
||||
|
@ -102,25 +102,25 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
m_stMaxLenRect = new wxStaticText( this, wxID_ANY, _("Max length"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stMaxLenRect->Wrap( -1 );
|
||||
fgSizerParmRect->Add( m_stMaxLenRect, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmRect->Add( m_stMaxLenRect, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_tcTdMaxLenRect = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerParmRect->Add( m_tcTdMaxLenRect, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_stTdMaxSizeRect = new wxStaticText( this, wxID_ANY, _("Max height"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stTdMaxSizeRect->Wrap( -1 );
|
||||
fgSizerParmRect->Add( m_stTdMaxSizeRect, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmRect->Add( m_stTdMaxSizeRect, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_tcMaxHeightRect = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerParmRect->Add( m_tcMaxHeightRect, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_stLenUnitRect = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stLenUnitRect->Wrap( -1 );
|
||||
fgSizerParmRect->Add( m_stLenUnitRect, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerParmRect->Add( m_stLenUnitRect, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_stHsettingRect = new wxStaticText( this, wxID_ANY, _("Best length"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stHsettingRect->Wrap( -1 );
|
||||
fgSizerParmRect->Add( m_stHsettingRect, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmRect->Add( m_stHsettingRect, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spTeardropLenPercentRect = new wxSpinCtrlDouble( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 20, 100, 50.000000, 10 );
|
||||
m_spTeardropLenPercentRect->SetDigits( 0 );
|
||||
|
@ -128,7 +128,7 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
m_stVsettingRect = new wxStaticText( this, wxID_ANY, _("Best height"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stVsettingRect->Wrap( -1 );
|
||||
fgSizerParmRect->Add( m_stVsettingRect, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmRect->Add( m_stVsettingRect, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spTeardropSizePercentRect = new wxSpinCtrlDouble( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 60, 100, 100.000000, 10 );
|
||||
m_spTeardropSizePercentRect->SetDigits( 0 );
|
||||
|
@ -136,7 +136,7 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
m_stLenPercentRect = new wxStaticText( this, wxID_ANY, _("percent of d"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stLenPercentRect->Wrap( -1 );
|
||||
fgSizerParmRect->Add( m_stLenPercentRect, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerParmRect->Add( m_stLenPercentRect, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizerBitmaps->Add( fgSizerParmRect, 1, wxEXPAND, 5 );
|
||||
|
@ -157,25 +157,25 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
m_stMaxLenTrack = new wxStaticText( this, wxID_ANY, _("Max length"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stMaxLenTrack->Wrap( -1 );
|
||||
fgSizerParmTrack->Add( m_stMaxLenTrack, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmTrack->Add( m_stMaxLenTrack, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_tcTdMaxLenTrack = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerParmTrack->Add( m_tcTdMaxLenTrack, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_stTdMaxSizeTrack = new wxStaticText( this, wxID_ANY, _("Max height"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stTdMaxSizeTrack->Wrap( -1 );
|
||||
fgSizerParmTrack->Add( m_stTdMaxSizeTrack, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmTrack->Add( m_stTdMaxSizeTrack, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_tcMaxHeightTrack = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerParmTrack->Add( m_tcMaxHeightTrack, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_stLenUnitTrack = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stLenUnitTrack->Wrap( -1 );
|
||||
fgSizerParmTrack->Add( m_stLenUnitTrack, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerParmTrack->Add( m_stLenUnitTrack, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_stHsettingtrack = new wxStaticText( this, wxID_ANY, _("Best length"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stHsettingtrack->Wrap( -1 );
|
||||
fgSizerParmTrack->Add( m_stHsettingtrack, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmTrack->Add( m_stHsettingtrack, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spTeardropLenPercentTrack = new wxSpinCtrlDouble( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 20, 100, 100.000000, 10 );
|
||||
m_spTeardropLenPercentTrack->SetDigits( 0 );
|
||||
|
@ -183,7 +183,7 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
m_stVsettingtrack = new wxStaticText( this, wxID_ANY, _("Best height"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stVsettingtrack->Wrap( -1 );
|
||||
fgSizerParmTrack->Add( m_stVsettingtrack, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
fgSizerParmTrack->Add( m_stVsettingtrack, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spTeardropSizePercentTrack = new wxSpinCtrlDouble( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 60, 100, 100.000000, 10 );
|
||||
m_spTeardropSizePercentTrack->SetDigits( 0 );
|
||||
|
@ -191,7 +191,7 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
m_stLenPercentTrack = new wxStaticText( this, wxID_ANY, _("percent of d"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stLenPercentTrack->Wrap( -1 );
|
||||
fgSizerParmTrack->Add( m_stLenPercentTrack, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
fgSizerParmTrack->Add( m_stLenPercentTrack, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizerBitmaps->Add( fgSizerParmTrack, 1, wxEXPAND, 5 );
|
||||
|
@ -273,6 +273,11 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
sbSizerOptions->Add( m_cbOptUseNextTrack, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_cbPadsInZones = new wxCheckBox( sbSizerOptions->GetStaticBox(), wxID_ANY, _("Teardrop on pads in zones"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbPadsInZones->SetToolTip( _("Pads inside a copper zone outline of same net have no teardrop.\nCheck this option to allow teardrop for these pads.") );
|
||||
|
||||
sbSizerOptions->Add( m_cbPadsInZones, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
sbSizerOptions->Add( 30, 0, 0, 0, 5 );
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@
|
|||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -366,7 +366,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -491,7 +491,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -552,7 +552,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -677,7 +677,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -802,7 +802,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1000,7 +1000,7 @@
|
|||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1125,7 +1125,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1250,7 +1250,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1311,7 +1311,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1436,7 +1436,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1561,7 +1561,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1759,7 +1759,7 @@
|
|||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1884,7 +1884,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2009,7 +2009,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2070,7 +2070,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2195,7 +2195,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2320,7 +2320,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2962,6 +2962,70 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Teardrop on pads in zones</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_cbPadsInZones</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">Pads inside a copper zone outline of same net have no teardrop.
Check this option to allow teardrop for these pads.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag"></property>
|
||||
|
|
|
@ -86,6 +86,7 @@ class TEARDROP_DIALOG_BASE : public DIALOG_SHIM
|
|||
wxRadioBox* m_rbShapeRect;
|
||||
wxRadioBox* m_rbShapeTrack;
|
||||
wxCheckBox* m_cbOptUseNextTrack;
|
||||
wxCheckBox* m_cbPadsInZones;
|
||||
wxStaticText* m_stPointCount;
|
||||
wxSpinCtrl* m_spPointCount;
|
||||
wxStaticLine* m_staticline1;
|
||||
|
|
|
@ -84,8 +84,7 @@ ZONE* TEARDROP_MANAGER::createTeardrop( TEARDROP_VARIANT aTeardropVariant,
|
|||
}
|
||||
|
||||
|
||||
int TEARDROP_MANAGER::SetTeardrops( BOARD_COMMIT* aCommitter,
|
||||
bool aDiscardInSameZone, bool aFollowTracks )
|
||||
int TEARDROP_MANAGER::SetTeardrops( BOARD_COMMIT* aCommitter, bool aFollowTracks )
|
||||
{
|
||||
// Init parameters:
|
||||
m_tolerance = Millimeter2iu( 0.01 );
|
||||
|
@ -161,7 +160,7 @@ int TEARDROP_MANAGER::SetTeardrops( BOARD_COMMIT* aCommitter,
|
|||
|
||||
// Skip case where pad/via and the track is within a copper zone with the same net
|
||||
// (and the pad can be connected by the zone thermal relief )
|
||||
if( aDiscardInSameZone && isViaAndTrackInSameZone( viapad, track ) )
|
||||
if( !m_prmsList->m_TdOnPadsInZones && isViaAndTrackInSameZone( viapad, track ) )
|
||||
continue;
|
||||
|
||||
std::vector<VECTOR2I> points;
|
||||
|
|
|
@ -93,12 +93,10 @@ public:
|
|||
* Set teardrops on a teardrop free board
|
||||
* @return the number of teardrop created
|
||||
* @param aCommitter is a BOARD_COMMIT reference (can be null)
|
||||
* @param aDiscardInSameZone = to do not create teardrops for pads in a zone of the same net
|
||||
* @param aFollowTracks = true to use a track connected to the initial track connected
|
||||
* to a pad / via if this initial track is too short to build the teardrop
|
||||
*/
|
||||
int SetTeardrops( BOARD_COMMIT* aCommitter,
|
||||
bool aDiscardInSameZone = true,
|
||||
bool aFollowTracks = true );
|
||||
|
||||
|
||||
|
|
|
@ -129,6 +129,9 @@ public:
|
|||
/// the number of segments to apprximate a curve (Bezier curve) in a teardrop
|
||||
/// Must be > 2, otherwise a line is used
|
||||
int m_CurveSegCount;
|
||||
/// Pads inside a zone of the same net do not have teardrop added.
|
||||
/// if this option is true, these pads will have teardrop added.
|
||||
bool m_TdOnPadsInZones;
|
||||
|
||||
public:
|
||||
TEARDROP_PARAMETERS_LIST() :
|
||||
|
@ -137,7 +140,8 @@ public:
|
|||
m_TargetTrack2Track( false ),
|
||||
m_UseRoundShapesOnly( false ),
|
||||
m_AllowUseTwoTracks( true ),
|
||||
m_CurveSegCount( 5 )
|
||||
m_CurveSegCount( 5 ),
|
||||
m_TdOnPadsInZones( false )
|
||||
{
|
||||
m_params_list.emplace_back( TARGET_ROUND ); // parameters for TARGET_ROUND
|
||||
m_params_list.emplace_back( TARGET_RECT ); // parameters for TARGET_RECT
|
||||
|
|
Loading…
Reference in New Issue