Teardrops: better dialog, and better code
This commit is contained in:
parent
5644f236d8
commit
ac78d51b14
|
@ -5572,9 +5572,11 @@ ZONE* PCB_PARSER::parseZONE( BOARD_ITEM_CONTAINER* aParent )
|
||||||
zone->SetZoneName( FromUTF8() );
|
zone->SetZoneName( FromUTF8() );
|
||||||
|
|
||||||
// TODO: remove this hack and replace it when a suitable token is added
|
// TODO: remove this hack and replace it when a suitable token is added
|
||||||
// If a zone name is $teardrop$, set its teardrop property flag
|
// If a zone name starts by "$teardrop_", set its teardrop property flag
|
||||||
if( zone->GetZoneName() == "$teardrop$" )
|
if( zone->GetZoneName().StartsWith( "$teardrop_p" ) )
|
||||||
zone->SetIsTeardropArea( true );
|
zone->SetTeardropAreaType( TEARDROP_TYPE::TD_VIAPAD );
|
||||||
|
else if( zone->GetZoneName().StartsWith( "$teardrop_t" ) )
|
||||||
|
zone->SetTeardropAreaType( TEARDROP_TYPE::TD_TRACKEND );
|
||||||
|
|
||||||
NeedRIGHT();
|
NeedRIGHT();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -50,7 +50,8 @@ public:
|
||||||
m_spTeardropSizePercent->SetValue( m_teardropSizePrm );
|
m_spTeardropSizePercent->SetValue( m_teardropSizePrm );
|
||||||
m_cbSmdSimilarPads->SetValue( m_includeNotPTH );
|
m_cbSmdSimilarPads->SetValue( m_includeNotPTH );
|
||||||
m_cbRoundShapesOnly->SetValue( m_roundShapesOnly );
|
m_cbRoundShapesOnly->SetValue( m_roundShapesOnly );
|
||||||
m_rbShape->SetSelection( m_curveOption );
|
m_rbShapeRound->SetSelection( m_curveOptionRoundShapes );
|
||||||
|
m_rbShapeRect->SetSelection( m_curveOptionRectShapes );
|
||||||
m_cbOptUseNextTrack->SetValue( m_canUseTwoTracks );
|
m_cbOptUseNextTrack->SetValue( m_canUseTwoTracks );
|
||||||
m_spPointCount->SetValue( m_curveSegCount );
|
m_spPointCount->SetValue( m_curveSegCount );
|
||||||
m_cbTrack2Track->SetValue( m_track2Track );
|
m_cbTrack2Track->SetValue( m_track2Track );
|
||||||
|
@ -71,16 +72,25 @@ public:
|
||||||
m_teardropMaxSizePrm = m_teardropMaxHeightSetting.GetValue();
|
m_teardropMaxSizePrm = m_teardropMaxHeightSetting.GetValue();
|
||||||
m_roundShapesOnly = m_cbRoundShapesOnly->GetValue();
|
m_roundShapesOnly = m_cbRoundShapesOnly->GetValue();
|
||||||
m_includeNotPTH = m_cbSmdSimilarPads->GetValue();
|
m_includeNotPTH = m_cbSmdSimilarPads->GetValue();
|
||||||
m_curveOption = m_rbShape->GetSelection();
|
m_curveOptionRoundShapes = m_rbShapeRound->GetSelection();
|
||||||
|
m_curveOptionRectShapes = m_rbShapeRect->GetSelection();
|
||||||
m_canUseTwoTracks = m_cbOptUseNextTrack->GetValue();
|
m_canUseTwoTracks = m_cbOptUseNextTrack->GetValue();
|
||||||
m_curveSegCount = m_spPointCount->GetValue();
|
m_curveSegCount = m_spPointCount->GetValue();
|
||||||
m_track2Track = m_cbTrack2Track->GetValue();
|
m_track2Track = m_cbTrack2Track->GetValue();
|
||||||
m_includeViasAndPTH = m_cbPadVia->GetValue();
|
m_includeViasAndPTH = m_cbPadVia->GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
CURVED_OPTION CurvedShapeOption()
|
int CurvedShapeOption()
|
||||||
{
|
{
|
||||||
return (CURVED_OPTION) m_rbShape->GetSelection();
|
int opt = 0;
|
||||||
|
|
||||||
|
if( m_rbShapeRound->GetSelection() )
|
||||||
|
opt |= CURVED_OPTION_ROUND;
|
||||||
|
|
||||||
|
if( m_rbShapeRect->GetSelection() )
|
||||||
|
opt |= CURVED_OPTION_RECT;
|
||||||
|
|
||||||
|
return opt;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Options for curved shapes
|
// Options for curved shapes
|
||||||
|
@ -111,7 +121,8 @@ private:
|
||||||
static int m_teardropMaxSizePrm;
|
static int m_teardropMaxSizePrm;
|
||||||
static bool m_includeNotPTH;
|
static bool m_includeNotPTH;
|
||||||
static bool m_roundShapesOnly;
|
static bool m_roundShapesOnly;
|
||||||
static int m_curveOption;
|
static int m_curveOptionRoundShapes;
|
||||||
|
static int m_curveOptionRectShapes;
|
||||||
static bool m_canUseTwoTracks;
|
static bool m_canUseTwoTracks;
|
||||||
static int m_curveSegCount;
|
static int m_curveSegCount;
|
||||||
static bool m_track2Track;
|
static bool m_track2Track;
|
||||||
|
@ -126,7 +137,8 @@ int TEARDROP_DIALOG::m_teardropMaxLenPrm = Millimeter2iu( 1.0 );
|
||||||
int TEARDROP_DIALOG::m_teardropMaxSizePrm = Millimeter2iu( 2.0 );
|
int TEARDROP_DIALOG::m_teardropMaxSizePrm = Millimeter2iu( 2.0 );
|
||||||
bool TEARDROP_DIALOG::m_includeNotPTH = true;
|
bool TEARDROP_DIALOG::m_includeNotPTH = true;
|
||||||
bool TEARDROP_DIALOG::m_roundShapesOnly = false;
|
bool TEARDROP_DIALOG::m_roundShapesOnly = false;
|
||||||
int TEARDROP_DIALOG::m_curveOption = 0;
|
int TEARDROP_DIALOG::m_curveOptionRoundShapes = 0;
|
||||||
|
int TEARDROP_DIALOG::m_curveOptionRectShapes = 0;
|
||||||
bool TEARDROP_DIALOG::m_canUseTwoTracks = true;
|
bool TEARDROP_DIALOG::m_canUseTwoTracks = true;
|
||||||
int TEARDROP_DIALOG::m_curveSegCount = 5;
|
int TEARDROP_DIALOG::m_curveSegCount = 5;
|
||||||
bool TEARDROP_DIALOG::m_track2Track = true;
|
bool TEARDROP_DIALOG::m_track2Track = true;
|
||||||
|
@ -146,12 +158,7 @@ void PCB_EDIT_FRAME::OnRunTeardropTool( wxCommandEvent& event )
|
||||||
|
|
||||||
TEARDROP_MANAGER trdm( GetBoard(), this );
|
TEARDROP_MANAGER trdm( GetBoard(), this );
|
||||||
|
|
||||||
int shape_seg_count;
|
int shape_seg_count = dlg.GetCurvePointCount();
|
||||||
|
|
||||||
if( dlg.CurvedShapeOption() != CURVED_OPTION::OPTION_NONE )
|
|
||||||
shape_seg_count = dlg.GetCurvePointCount();
|
|
||||||
else
|
|
||||||
shape_seg_count = 1;
|
|
||||||
|
|
||||||
trdm.SetTeardropMaxSize( dlg.GetTeardropMaxLen(), dlg.GetTeardropMaxHeight() );
|
trdm.SetTeardropMaxSize( dlg.GetTeardropMaxLen(), dlg.GetTeardropMaxHeight() );
|
||||||
trdm.SetTeardropSizeRatio( dlg.GetTeardropLenPercent(), dlg.GetTeardropSizePercent() );
|
trdm.SetTeardropSizeRatio( dlg.GetTeardropLenPercent(), dlg.GetTeardropSizePercent() );
|
||||||
|
|
|
@ -25,23 +25,37 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
||||||
wxBoxSizer* bSizeScopeSize;
|
wxBoxSizer* bSizeScopeSize;
|
||||||
bSizeScopeSize = new wxBoxSizer( wxHORIZONTAL );
|
bSizeScopeSize = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxBoxSizer* bSizerBitmaps;
|
wxFlexGridSizer* fgSizerBitmaps;
|
||||||
bSizerBitmaps = new wxBoxSizer( wxVERTICAL );
|
fgSizerBitmaps = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||||
|
fgSizerBitmaps->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizerBitmaps->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
m_staticText10 = new wxStaticText( this, wxID_ANY, wxT("Round shapes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText10->Wrap( -1 );
|
||||||
|
fgSizerBitmaps->Add( m_staticText10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
m_bitmapTdCircularInfo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
m_bitmapTdCircularInfo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerBitmaps->Add( m_bitmapTdCircularInfo, 0, wxALL, 5 );
|
fgSizerBitmaps->Add( m_bitmapTdCircularInfo, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText11 = new wxStaticText( this, wxID_ANY, wxT("Rect shapes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText11->Wrap( -1 );
|
||||||
|
fgSizerBitmaps->Add( m_staticText11, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
m_bitmapTdRectangularInfo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
m_bitmapTdRectangularInfo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerBitmaps->Add( m_bitmapTdRectangularInfo, 0, wxALL, 5 );
|
fgSizerBitmaps->Add( m_bitmapTdRectangularInfo, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText12 = new wxStaticText( this, wxID_ANY, wxT("Tracks"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText12->Wrap( -1 );
|
||||||
|
fgSizerBitmaps->Add( m_staticText12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
m_bitmapTdTrackInfo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
m_bitmapTdTrackInfo = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerBitmaps->Add( m_bitmapTdTrackInfo, 0, wxALL, 5 );
|
fgSizerBitmaps->Add( m_bitmapTdTrackInfo, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizeScopeSize->Add( bSizerBitmaps, 0, wxEXPAND, 5 );
|
bSizeScopeSize->Add( fgSizerBitmaps, 1, wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizeScopeSize->Add( 0, 0, 1, wxEXPAND, 5 );
|
bSizeScopeSize->Add( 30, 0, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxFlexGridSizer* fgSizerSizes;
|
wxFlexGridSizer* fgSizerSizes;
|
||||||
fgSizerSizes = new wxFlexGridSizer( 0, 3, 0, 0 );
|
fgSizerSizes = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||||
|
@ -103,6 +117,25 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
||||||
m_stTdSizePercent->Wrap( -1 );
|
m_stTdSizePercent->Wrap( -1 );
|
||||||
fgSizerSizes->Add( m_stTdSizePercent, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
fgSizerSizes->Add( m_stTdSizePercent, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticline51 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgSizerSizes->Add( m_staticline51, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticline61 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgSizerSizes->Add( m_staticline61, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticline71 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgSizerSizes->Add( m_staticline71, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_stPoinCount = new wxStaticText( this, wxID_ANY, wxT("Curve points"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_stPoinCount->Wrap( -1 );
|
||||||
|
fgSizerSizes->Add( m_stPoinCount, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_spPointCount = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 10, 5 );
|
||||||
|
fgSizerSizes->Add( m_spPointCount, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
fgSizerSizes->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizeScopeSize->Add( fgSizerSizes, 0, wxEXPAND|wxALL, 5 );
|
bSizeScopeSize->Add( fgSizerSizes, 0, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
|
@ -130,30 +163,30 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
||||||
sbSizerScope->Add( m_cbSmdSimilarPads, 0, wxALL, 5 );
|
sbSizerScope->Add( m_cbSmdSimilarPads, 0, wxALL, 5 );
|
||||||
|
|
||||||
m_cbTrack2Track = new wxCheckBox( sbSizerScope->GetStaticBox(), wxID_ANY, wxT("Track to track"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbTrack2Track = new wxCheckBox( sbSizerScope->GetStaticBox(), wxID_ANY, wxT("Track to track"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_cbTrack2Track->SetValue(true);
|
||||||
sbSizerScope->Add( m_cbTrack2Track, 0, wxALL, 5 );
|
sbSizerScope->Add( m_cbTrack2Track, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerShape->Add( sbSizerScope, 0, 0, 5 );
|
bSizerShape->Add( sbSizerScope, 0, wxTOP|wxBOTTOM, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerShape->Add( 30, 10, 1, wxEXPAND, 5 );
|
bSizerShape->Add( 30, 10, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxString m_rbShapeChoices[] = { wxT("Straight lines"), wxT("Curved for round pads"), wxT("Curved for all pad shapes") };
|
wxString m_rbShapeRoundChoices[] = { wxT("Straight lines"), wxT("Curved") };
|
||||||
int m_rbShapeNChoices = sizeof( m_rbShapeChoices ) / sizeof( wxString );
|
int m_rbShapeRoundNChoices = sizeof( m_rbShapeRoundChoices ) / sizeof( wxString );
|
||||||
m_rbShape = new wxRadioBox( this, wxID_ANY, wxT("Teardrop style"), wxDefaultPosition, wxDefaultSize, m_rbShapeNChoices, m_rbShapeChoices, 1, wxRA_SPECIFY_COLS );
|
m_rbShapeRound = new wxRadioBox( this, wxID_ANY, wxT("Round shapes teardrop style"), wxDefaultPosition, wxDefaultSize, m_rbShapeRoundNChoices, m_rbShapeRoundChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_rbShape->SetSelection( 0 );
|
m_rbShapeRound->SetSelection( 0 );
|
||||||
bSizerShape->Add( m_rbShape, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
bSizerShape->Add( m_rbShapeRound, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
wxString m_rbShapeRectChoices[] = { wxT("Straight lines"), wxT("Curved") };
|
||||||
|
int m_rbShapeRectNChoices = sizeof( m_rbShapeRectChoices ) / sizeof( wxString );
|
||||||
|
m_rbShapeRect = new wxRadioBox( this, wxID_ANY, wxT("Rect shapes teardrop style"), wxDefaultPosition, wxDefaultSize, m_rbShapeRectNChoices, m_rbShapeRectChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
|
m_rbShapeRect->SetSelection( 0 );
|
||||||
|
bSizerShape->Add( m_rbShapeRect, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerShape->Add( 30, 0, 0, 0, 5 );
|
bSizerShape->Add( 30, 0, 0, 0, 5 );
|
||||||
|
|
||||||
m_stPoinCount = new wxStaticText( this, wxID_ANY, wxT("Curve points"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_stPoinCount->Wrap( -1 );
|
|
||||||
bSizerShape->Add( m_stPoinCount, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
||||||
|
|
||||||
m_spPointCount = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 10, 5 );
|
|
||||||
bSizerShape->Add( m_spPointCount, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
bSizerUpper->Add( bSizerShape, 0, wxEXPAND, 5 );
|
bSizerUpper->Add( bSizerShape, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
@ -167,7 +200,7 @@ TEARDROP_DIALOG_BASE::TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
||||||
sbSizerOptions->Add( m_cbOptUseNextTrack, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
sbSizerOptions->Add( m_cbOptUseNextTrack, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerUpper->Add( sbSizerOptions, 1, wxEXPAND, 5 );
|
bSizerUpper->Add( sbSizerOptions, 1, wxEXPAND|wxTOP, 5 );
|
||||||
|
|
||||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
bSizerUpper->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
bSizerUpper->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">TEARDROP_DIALOG_BASE</property>
|
<property name="name">TEARDROP_DIALOG_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">477,427</property>
|
<property name="size">532,470</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
|
<property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
|
||||||
<property name="title">Teardrop Settings</property>
|
<property name="title">Teardrop Settings</property>
|
||||||
|
@ -90,13 +90,81 @@
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxLEFT|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxFlexGridSizer" expanded="1">
|
||||||
|
<property name="cols">2</property>
|
||||||
|
<property name="flexible_direction">wxBOTH</property>
|
||||||
|
<property name="growablecols"></property>
|
||||||
|
<property name="growablerows"></property>
|
||||||
|
<property name="hgap">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizerBitmaps</property>
|
<property name="name">fgSizerBitmaps</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
|
<property name="rows">0</property>
|
||||||
|
<property name="vgap">0</property>
|
||||||
|
<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="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">Round shapes</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_staticText10</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="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
|
@ -155,6 +223,67 @@
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</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="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">Rect shapes</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_staticText11</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="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
|
@ -213,6 +342,67 @@
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</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="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">Tracks</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_staticText12</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="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
|
@ -276,11 +466,11 @@
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">0</property>
|
||||||
<object class="spacer" expanded="1">
|
<object class="spacer" expanded="1">
|
||||||
<property name="height">0</property>
|
<property name="height">0</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="width">0</property>
|
<property name="width">30</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
|
@ -1217,6 +1407,313 @@
|
||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND | wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticLine" 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="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_staticline51</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">wxLI_HORIZONTAL</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>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND | wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticLine" 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="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_staticline61</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">wxLI_HORIZONTAL</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>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND | wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticLine" 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="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_staticline71</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">wxLI_HORIZONTAL</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>
|
||||||
|
</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="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">Curve points</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_stPoinCount</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="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxSpinCtrl" 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="initial">5</property>
|
||||||
|
<property name="max">10</property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min">3</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_spPointCount</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">wxSP_ARROW_KEYS</property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="value"></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">wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="spacer" expanded="1">
|
||||||
|
<property name="height">0</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="width">0</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
@ -1234,7 +1731,7 @@
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag"></property>
|
<property name="flag">wxTOP|wxBOTTOM</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticBoxSizer" expanded="1">
|
<object class="wxStaticBoxSizer" expanded="1">
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
|
@ -1454,7 +1951,7 @@
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="checked">0</property>
|
<property name="checked">1</property>
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
|
@ -1505,7 +2002,7 @@
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">0</property>
|
||||||
<object class="spacer" expanded="1">
|
<object class="spacer" expanded="1">
|
||||||
<property name="height">10</property>
|
<property name="height">10</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
|
@ -1530,7 +2027,7 @@
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="choices">"Straight lines" "Curved for round pads" "Curved for all pad shapes"</property>
|
<property name="choices">"Straight lines" "Curved"</property>
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
|
@ -1545,7 +2042,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Teardrop style</property>
|
<property name="label">Round shapes teardrop style</property>
|
||||||
<property name="majorDimension">1</property>
|
<property name="majorDimension">1</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
|
@ -1554,7 +2051,73 @@
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_rbShape</property>
|
<property name="name">m_rbShapeRound</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="selection">0</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></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">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxRadioBox" 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="choices">"Straight lines" "Curved"</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">Rect shapes teardrop style</property>
|
||||||
|
<property name="majorDimension">1</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_rbShapeRect</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -1588,134 +2151,11 @@
|
||||||
<property name="width">30</property>
|
<property name="width">30</property>
|
||||||
</object>
|
</object>
|
||||||
</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="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">Curve points</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_stPoinCount</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>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxEXPAND|wxTOP</property>
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxSpinCtrl" 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="initial">5</property>
|
|
||||||
<property name="max">10</property>
|
|
||||||
<property name="max_size"></property>
|
|
||||||
<property name="maximize_button">0</property>
|
|
||||||
<property name="maximum_size"></property>
|
|
||||||
<property name="min">3</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_spPointCount</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">wxSP_ARROW_KEYS</property>
|
|
||||||
<property name="subclass">; ; forward_declare</property>
|
|
||||||
<property name="toolbar_pane">0</property>
|
|
||||||
<property name="tooltip"></property>
|
|
||||||
<property name="value"></property>
|
|
||||||
<property name="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="1">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND</property>
|
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxStaticBoxSizer" expanded="1">
|
<object class="wxStaticBoxSizer" expanded="1">
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
|
|
|
@ -10,17 +10,17 @@
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
#include <wx/bitmap.h>
|
#include <wx/string.h>
|
||||||
#include <wx/image.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/icon.h>
|
|
||||||
#include <wx/statbmp.h>
|
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/string.h>
|
#include <wx/bitmap.h>
|
||||||
|
#include <wx/image.h>
|
||||||
|
#include <wx/icon.h>
|
||||||
|
#include <wx/statbmp.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/spinctrl.h>
|
#include <wx/spinctrl.h>
|
||||||
#include <wx/statline.h>
|
#include <wx/statline.h>
|
||||||
|
@ -41,8 +41,11 @@ class TEARDROP_DIALOG_BASE : public DIALOG_SHIM
|
||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
wxStaticText* m_staticText10;
|
||||||
wxStaticBitmap* m_bitmapTdCircularInfo;
|
wxStaticBitmap* m_bitmapTdCircularInfo;
|
||||||
|
wxStaticText* m_staticText11;
|
||||||
wxStaticBitmap* m_bitmapTdRectangularInfo;
|
wxStaticBitmap* m_bitmapTdRectangularInfo;
|
||||||
|
wxStaticText* m_staticText12;
|
||||||
wxStaticBitmap* m_bitmapTdTrackInfo;
|
wxStaticBitmap* m_bitmapTdTrackInfo;
|
||||||
wxStaticText* m_stMaxLen;
|
wxStaticText* m_stMaxLen;
|
||||||
wxTextCtrl* m_tcTdMaxLen;
|
wxTextCtrl* m_tcTdMaxLen;
|
||||||
|
@ -59,13 +62,17 @@ class TEARDROP_DIALOG_BASE : public DIALOG_SHIM
|
||||||
wxStaticText* m_stVsetting;
|
wxStaticText* m_stVsetting;
|
||||||
wxSpinCtrlDouble* m_spTeardropSizePercent;
|
wxSpinCtrlDouble* m_spTeardropSizePercent;
|
||||||
wxStaticText* m_stTdSizePercent;
|
wxStaticText* m_stTdSizePercent;
|
||||||
|
wxStaticLine* m_staticline51;
|
||||||
|
wxStaticLine* m_staticline61;
|
||||||
|
wxStaticLine* m_staticline71;
|
||||||
|
wxStaticText* m_stPoinCount;
|
||||||
|
wxSpinCtrl* m_spPointCount;
|
||||||
wxCheckBox* m_cbPadVia;
|
wxCheckBox* m_cbPadVia;
|
||||||
wxCheckBox* m_cbRoundShapesOnly;
|
wxCheckBox* m_cbRoundShapesOnly;
|
||||||
wxCheckBox* m_cbSmdSimilarPads;
|
wxCheckBox* m_cbSmdSimilarPads;
|
||||||
wxCheckBox* m_cbTrack2Track;
|
wxCheckBox* m_cbTrack2Track;
|
||||||
wxRadioBox* m_rbShape;
|
wxRadioBox* m_rbShapeRound;
|
||||||
wxStaticText* m_stPoinCount;
|
wxRadioBox* m_rbShapeRect;
|
||||||
wxSpinCtrl* m_spPointCount;
|
|
||||||
wxCheckBox* m_cbOptUseNextTrack;
|
wxCheckBox* m_cbOptUseNextTrack;
|
||||||
wxStaticLine* m_staticline1;
|
wxStaticLine* m_staticline1;
|
||||||
wxStdDialogButtonSizer* m_sdbSizer;
|
wxStdDialogButtonSizer* m_sdbSizer;
|
||||||
|
@ -74,7 +81,7 @@ class TEARDROP_DIALOG_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Teardrop Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 477,427 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
TEARDROP_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Teardrop Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 532,470 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
|
||||||
~TEARDROP_DIALOG_BASE();
|
~TEARDROP_DIALOG_BASE();
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
|
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
|
|
||||||
|
// The first priority level of a teardrop area (arbitrary value)
|
||||||
|
#define MAGIC_TEARDROP_ZONE_ID 30000
|
||||||
|
|
||||||
|
|
||||||
void TEARDROP_MANAGER::SetTargets( bool aApplyToPadVias, bool aApplyToRoundShapesOnly,
|
void TEARDROP_MANAGER::SetTargets( bool aApplyToPadVias, bool aApplyToRoundShapesOnly,
|
||||||
bool aApplyToSurfacePads, bool aApplyToTracks )
|
bool aApplyToSurfacePads, bool aApplyToTracks )
|
||||||
|
@ -52,12 +55,14 @@ void TEARDROP_MANAGER::SetTargets( bool aApplyToPadVias, bool aApplyToRoundShape
|
||||||
|
|
||||||
// Build a zone teardrop
|
// Build a zone teardrop
|
||||||
ZONE* TEARDROP_MANAGER::createTeardrop( TEARDROP_VARIANT aTeardropVariant,
|
ZONE* TEARDROP_MANAGER::createTeardrop( TEARDROP_VARIANT aTeardropVariant,
|
||||||
std::vector<wxPoint>& aPoints, PCB_TRACK* aTrack)
|
std::vector<VECTOR2I>& aPoints, PCB_TRACK* aTrack)
|
||||||
{
|
{
|
||||||
ZONE* teardrop = new ZONE( m_board );
|
ZONE* teardrop = new ZONE( m_board );
|
||||||
|
|
||||||
// Add zone properties (priority will be fixed later)
|
// Add zone properties (priority will be fixed later)
|
||||||
teardrop->SetIsTeardropArea( true );
|
teardrop->SetTeardropAreaType( aTeardropVariant == TD_TYPE_PADVIA ?
|
||||||
|
TEARDROP_TYPE::TD_VIAPAD :
|
||||||
|
TEARDROP_TYPE::TD_TRACKEND );
|
||||||
teardrop->SetLayer( aTrack->GetLayer() );
|
teardrop->SetLayer( aTrack->GetLayer() );
|
||||||
teardrop->SetNetCode( aTrack->GetNetCode() );
|
teardrop->SetNetCode( aTrack->GetNetCode() );
|
||||||
teardrop->SetLocalClearance( 0 );
|
teardrop->SetLocalClearance( 0 );
|
||||||
|
@ -71,7 +76,7 @@ ZONE* TEARDROP_MANAGER::createTeardrop( TEARDROP_VARIANT aTeardropVariant,
|
||||||
SHAPE_POLY_SET* outline = teardrop->Outline();
|
SHAPE_POLY_SET* outline = teardrop->Outline();
|
||||||
outline->NewOutline();
|
outline->NewOutline();
|
||||||
|
|
||||||
for( wxPoint pt: aPoints )
|
for( VECTOR2I pt: aPoints )
|
||||||
outline->Append(pt.x, pt.y);
|
outline->Append(pt.x, pt.y);
|
||||||
|
|
||||||
// Can be usefull:
|
// Can be usefull:
|
||||||
|
@ -149,7 +154,7 @@ int TEARDROP_MANAGER::SetTeardrops( BOARD_COMMIT* aCommitter,
|
||||||
if( aDiscardInSameZone && isViaAndTrackInSameZone( viapad, track ) )
|
if( aDiscardInSameZone && isViaAndTrackInSameZone( viapad, track ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::vector<wxPoint> points;
|
std::vector<VECTOR2I> points;
|
||||||
bool success = computeTeardropPolygonPoints( points, track, viapad,
|
bool success = computeTeardropPolygonPoints( points, track, viapad,
|
||||||
aFollowTracks, trackLookupList );
|
aFollowTracks, trackLookupList );
|
||||||
|
|
||||||
|
@ -301,7 +306,7 @@ int TEARDROP_MANAGER::addTeardropsOnTracks( BOARD_COMMIT* aCommitter )
|
||||||
EDA_ITEM_FLAGS match_points; // to return the end point EDA_ITEM_FLAGS:
|
EDA_ITEM_FLAGS match_points; // to return the end point EDA_ITEM_FLAGS:
|
||||||
// 0, STARTPOINT, ENDPOINT
|
// 0, STARTPOINT, ENDPOINT
|
||||||
|
|
||||||
wxPoint roundshape_pos = candidate->GetStart();
|
VECTOR2I roundshape_pos = candidate->GetStart();
|
||||||
ENDPOINT_T endPointCandidate = ENDPOINT_START;
|
ENDPOINT_T endPointCandidate = ENDPOINT_START;
|
||||||
match_points = track->IsPointOnEnds( roundshape_pos, m_Parameters.m_tolerance);
|
match_points = track->IsPointOnEnds( roundshape_pos, m_Parameters.m_tolerance);
|
||||||
|
|
||||||
|
@ -327,7 +332,7 @@ int TEARDROP_MANAGER::addTeardropsOnTracks( BOARD_COMMIT* aCommitter )
|
||||||
if( match_points )
|
if( match_points )
|
||||||
{
|
{
|
||||||
VIAPAD viatrack( candidate, endPointCandidate );
|
VIAPAD viatrack( candidate, endPointCandidate );
|
||||||
std::vector<wxPoint> points;
|
std::vector<VECTOR2I> points;
|
||||||
bool success = computeTeardropPolygonPoints( points, track, viatrack,
|
bool success = computeTeardropPolygonPoints( points, track, viatrack,
|
||||||
false, trackLookupList );
|
false, trackLookupList );
|
||||||
|
|
||||||
|
|
|
@ -30,12 +30,8 @@
|
||||||
#include <pcb_track.h>
|
#include <pcb_track.h>
|
||||||
#include <zone.h>
|
#include <zone.h>
|
||||||
|
|
||||||
// TODO: remove MAGIC_TEARDROP_ZONE_ID use to identifay teardrops
|
|
||||||
// Use only MAGIC_TEARDROP_NAME, and later a specific property
|
|
||||||
#define MAGIC_TEARDROP_ZONE_ID 0x4242
|
|
||||||
#define MAGIC_TEARDROP_PADVIA_NAME "$teardrop_padvia$"
|
#define MAGIC_TEARDROP_PADVIA_NAME "$teardrop_padvia$"
|
||||||
#define MAGIC_TEARDROP_TRACK_NAME "$teardrop_track$"
|
#define MAGIC_TEARDROP_TRACK_NAME "$teardrop_track$"
|
||||||
#define MAGIC_TEARDROP_BASE_NAME "$teardrop_"
|
|
||||||
|
|
||||||
class TRACK_BUFFER;
|
class TRACK_BUFFER;
|
||||||
|
|
||||||
|
@ -53,7 +49,7 @@ struct VIAPAD
|
||||||
return m_Parent->IsOnLayer( aLayer );
|
return m_Parent->IsOnLayer( aLayer );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPoint m_Pos;
|
VECTOR2I m_Pos;
|
||||||
int m_Width; // The diameter of a round shape, or the min size for others
|
int m_Width; // The diameter of a round shape, or the min size for others
|
||||||
int m_Drill;
|
int m_Drill;
|
||||||
int m_NetCode;
|
int m_NetCode;
|
||||||
|
@ -63,12 +59,11 @@ struct VIAPAD
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum class CURVED_OPTION
|
// Curved shapes options
|
||||||
{
|
// The actual value is the ORed of options
|
||||||
OPTION_NONE, // No curved teardrop shape
|
#define CURVED_OPTION_NONE 0 /* No curved teardrop shape */
|
||||||
OPTION_ROUND, // Curved teardrop shape for vias and round pads
|
#define CURVED_OPTION_ROUND 1 /* Curved teardrop shape for vias and round pad shapes */
|
||||||
OPTION_ALL_PADS, // Curved teardrop shape for all pads but custom
|
#define CURVED_OPTION_RECT 2 /* Curved teardrop shape for rect pad shapes */
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,7 +83,7 @@ public:
|
||||||
m_heightRatio( 1.0 ),
|
m_heightRatio( 1.0 ),
|
||||||
m_curveSegCount( 0 ),
|
m_curveSegCount( 0 ),
|
||||||
m_tolerance( Millimeter2iu( 0.01 ) ),
|
m_tolerance( Millimeter2iu( 0.01 ) ),
|
||||||
m_curveOpt( CURVED_OPTION::OPTION_NONE )
|
m_curveShapeOpt( CURVED_OPTION_NONE )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,23 +112,32 @@ public:
|
||||||
* Set the params for teardrop using curved shape
|
* Set the params for teardrop using curved shape
|
||||||
* note: if aCurveSegCount is < 3, the shape uses a straight line
|
* note: if aCurveSegCount is < 3, the shape uses a straight line
|
||||||
*/
|
*/
|
||||||
void SetTeardropCurvedPrms( CURVED_OPTION aCurveOpt = CURVED_OPTION::OPTION_NONE,
|
void SetTeardropCurvedPrms( int aCurveShapeOpt = CURVED_OPTION_NONE,
|
||||||
int aCurveSegCount = 5 )
|
int aCurveSegCount = 5 )
|
||||||
{
|
{
|
||||||
m_curveOpt = aCurveOpt;
|
m_curveShapeOpt = aCurveShapeOpt;
|
||||||
m_curveSegCount = aCurveSegCount;
|
m_curveSegCount = aCurveSegCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_tdMaxLen; /// max allowed lenght for teardrops in IU. <= 0 to disable
|
/// max allowed lenght for teardrops in IU. <= 0 to disable
|
||||||
int m_tdMaxHeight; /// max allowed height for teardrops in IU. <= 0 to disable
|
int m_tdMaxLen;
|
||||||
double m_lenghtRatio; /// The lenght of a teardrop as ratio between lenght and size of pad/via
|
/// max allowed height for teardrops in IU. <= 0 to disable
|
||||||
double m_heightRatio; /// The height of a teardrop as ratio between height and size of pad/via
|
int m_tdMaxHeight;
|
||||||
int m_curveSegCount; /// number of segments to build the curved sides of a teardrop area
|
/// The lenght of a teardrop as ratio between lenght and size of pad/via
|
||||||
|
double m_lenghtRatio;
|
||||||
|
/// The height of a teardrop as ratio between height and size of pad/via
|
||||||
|
double m_heightRatio;
|
||||||
|
/// number of segments to build the curved sides of a teardrop area
|
||||||
/// must be > 2. for values <= 2 a straight line is used
|
/// must be > 2. for values <= 2 a straight line is used
|
||||||
int m_tolerance; /// the max distance between a track end and a padvia position to see
|
int m_curveSegCount;
|
||||||
/// them connected
|
/// the max distance between a track end and a padvia position to see them connected
|
||||||
CURVED_OPTION m_curveOpt;
|
int m_tolerance;
|
||||||
|
/// Shape of teardrops for round and rect pad shapes
|
||||||
|
/// 0 = straight lines
|
||||||
|
/// m_curveShapeOpt & CURVED_OPTION_ROUND != 0 curved for round shapes
|
||||||
|
/// m_curveShapeOpt & CURVED_OPTION_RECT != 0 curved for rect shapes
|
||||||
|
int m_curveShapeOpt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -217,10 +221,10 @@ public:
|
||||||
* Set the params for teardrop using curved shape
|
* Set the params for teardrop using curved shape
|
||||||
* note: if aSegCount is < 3, the shape uses a straight line
|
* note: if aSegCount is < 3, the shape uses a straight line
|
||||||
*/
|
*/
|
||||||
void SetTeardropCurvedPrms( CURVED_OPTION aCurveOpt = CURVED_OPTION::OPTION_NONE,
|
void SetTeardropCurvedPrms( int aCurveShapeOpt = CURVED_OPTION_NONE,
|
||||||
int aCurveSegCount = 5 )
|
int aCurveSegCount = 5 )
|
||||||
{
|
{
|
||||||
m_Parameters.SetTeardropCurvedPrms( aCurveOpt, aCurveSegCount );
|
m_Parameters.SetTeardropCurvedPrms( aCurveShapeOpt, aCurveSegCount );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -276,10 +280,10 @@ private:
|
||||||
* and do not give a good curve shape for other pad shapes
|
* and do not give a good curve shape for other pad shapes
|
||||||
* use m_m_heightRatio
|
* use m_m_heightRatio
|
||||||
*/
|
*/
|
||||||
void computeCurvedForRoundShape( std::vector<wxPoint>& aPoly,
|
void computeCurvedForRoundShape( std::vector<VECTOR2I>& aPoly,
|
||||||
int aTrackHalfWidth,
|
int aTrackHalfWidth,
|
||||||
VECTOR2D aTrackDir, VIAPAD& aViaPad,
|
VECTOR2D aTrackDir, VIAPAD& aViaPad,
|
||||||
std::vector<wxPoint>& aPts ) const;
|
std::vector<VECTOR2I>& aPts ) const;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -287,16 +291,16 @@ private:
|
||||||
* The Bezier curve control points are not optimized for a special shape,
|
* The Bezier curve control points are not optimized for a special shape,
|
||||||
* so use computeCurvedForRoundShape() for round shapes for better result
|
* so use computeCurvedForRoundShape() for round shapes for better result
|
||||||
*/
|
*/
|
||||||
void computeCurvedForRectShape( std::vector<wxPoint>& aPoly, int aTdHeight,
|
void computeCurvedForRectShape( std::vector<VECTOR2I>& aPoly, int aTdHeight,
|
||||||
int aTrackHalfWidth, VIAPAD& aViaPad,
|
int aTrackHalfWidth, VIAPAD& aViaPad,
|
||||||
std::vector<wxPoint>& aPts ) const;
|
std::vector<VECTOR2I>& aPts ) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compute all teardrop points of the polygon shape
|
* Compute all teardrop points of the polygon shape
|
||||||
* @return true if the polygonal shape was calculated, false if not buildable
|
* @return true if the polygonal shape was calculated, false if not buildable
|
||||||
* use m_lenghtRatio and m_heightRatio
|
* use m_lenghtRatio and m_heightRatio
|
||||||
*/
|
*/
|
||||||
bool computeTeardropPolygonPoints( std::vector<wxPoint>& aCorners,
|
bool computeTeardropPolygonPoints( std::vector<VECTOR2I>& aCorners,
|
||||||
PCB_TRACK* aTrack, VIAPAD& aVia,
|
PCB_TRACK* aTrack, VIAPAD& aVia,
|
||||||
bool aFollowTracks,
|
bool aFollowTracks,
|
||||||
TRACK_BUFFER& aTrackLookupList) const;
|
TRACK_BUFFER& aTrackLookupList) const;
|
||||||
|
@ -314,7 +318,7 @@ private:
|
||||||
* m_heightRatio is the factor to calculate the aViaPad teardrop size
|
* m_heightRatio is the factor to calculate the aViaPad teardrop size
|
||||||
*/
|
*/
|
||||||
bool ComputePointsOnPadVia( PCB_TRACK* aTrack, VIAPAD& aViaPad,
|
bool ComputePointsOnPadVia( PCB_TRACK* aTrack, VIAPAD& aViaPad,
|
||||||
std::vector<wxPoint>& aPts ) const;
|
std::vector<VECTOR2I>& aPts ) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a track connected to the end of another track
|
* Find a track connected to the end of another track
|
||||||
|
@ -325,7 +329,7 @@ private:
|
||||||
* @param aTrackLookupList is the buffer of available tracks
|
* @param aTrackLookupList is the buffer of available tracks
|
||||||
*/
|
*/
|
||||||
PCB_TRACK* findTouchingTrack( EDA_ITEM_FLAGS& aMatchType, PCB_TRACK* aTrackRef,
|
PCB_TRACK* findTouchingTrack( EDA_ITEM_FLAGS& aMatchType, PCB_TRACK* aTrackRef,
|
||||||
const wxPoint& aEndPoint,
|
const VECTOR2I& aEndPoint,
|
||||||
TRACK_BUFFER& aTrackLookupList ) const;
|
TRACK_BUFFER& aTrackLookupList ) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -336,7 +340,7 @@ private:
|
||||||
* (mainly for net info)
|
* (mainly for net info)
|
||||||
*/
|
*/
|
||||||
ZONE* createTeardrop( TEARDROP_VARIANT aTeardropVariant,
|
ZONE* createTeardrop( TEARDROP_VARIANT aTeardropVariant,
|
||||||
std::vector<wxPoint>& aPoints, PCB_TRACK* aTrack);
|
std::vector<VECTOR2I>& aPoints, PCB_TRACK* aTrack);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set priority of created teardrops. smaller have bigger priority
|
* Set priority of created teardrops. smaller have bigger priority
|
||||||
|
@ -356,7 +360,7 @@ private:
|
||||||
* @param aTrackLookupList is the list of tracks to explore if aFollowTracks = true
|
* @param aTrackLookupList is the list of tracks to explore if aFollowTracks = true
|
||||||
* m_lenghtRatio is the lenght of teardrop (ratio pad/via size/teardrop len)
|
* m_lenghtRatio is the lenght of teardrop (ratio pad/via size/teardrop len)
|
||||||
*/
|
*/
|
||||||
bool findAnchorPointsOnTrack( wxPoint& aStartPoint, wxPoint& aEndPoint,
|
bool findAnchorPointsOnTrack( VECTOR2I& aStartPoint, VECTOR2I& aEndPoint,
|
||||||
PCB_TRACK*& aTrack, VIAPAD& aViaPad,
|
PCB_TRACK*& aTrack, VIAPAD& aViaPad,
|
||||||
int* aEffectiveTeardropLen,
|
int* aEffectiveTeardropLen,
|
||||||
bool aFollowTracks, TRACK_BUFFER& aTrackLookupList ) const;
|
bool aFollowTracks, TRACK_BUFFER& aTrackLookupList ) const;
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some calculations (mainly computeCurvedForRoundShape) are derived from
|
||||||
|
* https://github.com/NilujePerchut/kicad_scripts/tree/master/teardrops
|
||||||
|
*/
|
||||||
|
|
||||||
#include <board_design_settings.h>
|
#include <board_design_settings.h>
|
||||||
#include <pcb_track.h>
|
#include <pcb_track.h>
|
||||||
|
@ -144,8 +148,7 @@ void TEARDROP_MANAGER::collectTeardrops( std::vector< ZONE* >& aList )
|
||||||
{
|
{
|
||||||
for( ZONE* zone : m_board->Zones() )
|
for( ZONE* zone : m_board->Zones() )
|
||||||
{
|
{
|
||||||
if( zone->GetZoneName().StartsWith( MAGIC_TEARDROP_BASE_NAME )
|
if( zone->IsTeardropArea() )
|
||||||
|| zone->GetPriority() >= MAGIC_TEARDROP_ZONE_ID )
|
|
||||||
{
|
{
|
||||||
aList.push_back( zone );
|
aList.push_back( zone );
|
||||||
}
|
}
|
||||||
|
@ -158,8 +161,7 @@ bool TEARDROP_MANAGER::isViaAndTrackInSameZone( VIAPAD& aViapad, PCB_TRACK* aTra
|
||||||
for( ZONE* zone: m_board->Zones() )
|
for( ZONE* zone: m_board->Zones() )
|
||||||
{
|
{
|
||||||
// Skip teardrops
|
// Skip teardrops
|
||||||
if( zone->GetZoneName().StartsWith( MAGIC_TEARDROP_BASE_NAME )
|
if( zone->IsTeardropArea() )
|
||||||
|| zone->GetPriority() >= MAGIC_TEARDROP_ZONE_ID )
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Only consider zones on the same layer
|
// Only consider zones on the same layer
|
||||||
|
@ -175,7 +177,8 @@ bool TEARDROP_MANAGER::isViaAndTrackInSameZone( VIAPAD& aViapad, PCB_TRACK* aTra
|
||||||
{
|
{
|
||||||
PAD *pad = static_cast< PAD* >( aViapad.m_Parent );
|
PAD *pad = static_cast< PAD* >( aViapad.m_Parent );
|
||||||
|
|
||||||
if( zone->GetPadConnection( pad ) == ZONE_CONNECTION::NONE )
|
if( zone->GetPadConnection() == ZONE_CONNECTION::NONE
|
||||||
|
|| pad->GetZoneConnection() == ZONE_CONNECTION::NONE )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +192,7 @@ bool TEARDROP_MANAGER::isViaAndTrackInSameZone( VIAPAD& aViapad, PCB_TRACK* aTra
|
||||||
|
|
||||||
|
|
||||||
PCB_TRACK* TEARDROP_MANAGER::findTouchingTrack( EDA_ITEM_FLAGS& aMatchType, PCB_TRACK* aTrackRef,
|
PCB_TRACK* TEARDROP_MANAGER::findTouchingTrack( EDA_ITEM_FLAGS& aMatchType, PCB_TRACK* aTrackRef,
|
||||||
const wxPoint& aEndPoint,
|
const VECTOR2I& aEndPoint,
|
||||||
TRACK_BUFFER& aTrackLookupList ) const
|
TRACK_BUFFER& aTrackLookupList ) const
|
||||||
{
|
{
|
||||||
EDA_ITEM_FLAGS match = 0; // to return the end point EDA_ITEM_FLAGS:
|
EDA_ITEM_FLAGS match = 0; // to return the end point EDA_ITEM_FLAGS:
|
||||||
|
@ -231,7 +234,7 @@ PCB_TRACK* TEARDROP_MANAGER::findTouchingTrack( EDA_ITEM_FLAGS& aMatchType, PCB_
|
||||||
/**
|
/**
|
||||||
* @return a vector unit length from aVector
|
* @return a vector unit length from aVector
|
||||||
*/
|
*/
|
||||||
static VECTOR2D NormalizeVector( wxPoint aVector )
|
static VECTOR2D NormalizeVector( VECTOR2I aVector )
|
||||||
{
|
{
|
||||||
VECTOR2D vect( aVector );
|
VECTOR2D vect( aVector );
|
||||||
double norm = vect.EuclideanNorm();
|
double norm = vect.EuclideanNorm();
|
||||||
|
@ -244,10 +247,10 @@ static VECTOR2D NormalizeVector( wxPoint aVector )
|
||||||
* The Bezier curve control points are optimized for a round pad/via shape,
|
* The Bezier curve control points are optimized for a round pad/via shape,
|
||||||
* and do not give a good curve shape for other pad shapes
|
* and do not give a good curve shape for other pad shapes
|
||||||
*/
|
*/
|
||||||
void TEARDROP_MANAGER::computeCurvedForRoundShape( std::vector<wxPoint>& aPoly,
|
void TEARDROP_MANAGER::computeCurvedForRoundShape( std::vector<VECTOR2I>& aPoly,
|
||||||
int aTrackHalfWidth,
|
int aTrackHalfWidth,
|
||||||
VECTOR2D aTrackDir, VIAPAD& aViaPad,
|
VECTOR2D aTrackDir, VIAPAD& aViaPad,
|
||||||
std::vector<wxPoint>& pts ) const
|
std::vector<VECTOR2I>& pts ) const
|
||||||
{
|
{
|
||||||
// in pts:
|
// in pts:
|
||||||
// A and B are points on the track ( pts[0] and pts[1] )
|
// A and B are points on the track ( pts[0] and pts[1] )
|
||||||
|
@ -269,22 +272,22 @@ void TEARDROP_MANAGER::computeCurvedForRoundShape( std::vector<wxPoint>& aPoly,
|
||||||
double biasBC = 0.5 * SEG( pts[1], pts[2] ).Length();
|
double biasBC = 0.5 * SEG( pts[1], pts[2] ).Length();
|
||||||
double biasAE = 0.5 * SEG( pts[4], pts[0] ).Length();
|
double biasAE = 0.5 * SEG( pts[4], pts[0] ).Length();
|
||||||
|
|
||||||
wxPoint vecC = pts[2] - aViaPad.m_Pos;
|
VECTOR2I vecC = (VECTOR2I)pts[2] - aViaPad.m_Pos;
|
||||||
wxPoint tangentC = wxPoint( pts[2].x - vecC.y * biasBC * weaken,
|
VECTOR2I tangentC = VECTOR2I( pts[2].x - vecC.y * biasBC * weaken,
|
||||||
pts[2].y + vecC.x * biasBC * weaken );
|
pts[2].y + vecC.x * biasBC * weaken );
|
||||||
wxPoint vecE = pts[4] - aViaPad.m_Pos;
|
VECTOR2I vecE = (VECTOR2I)pts[4] - aViaPad.m_Pos;
|
||||||
wxPoint tangentE = wxPoint( pts[4].x + vecE.y * biasAE * weaken,
|
VECTOR2I tangentE = VECTOR2I( pts[4].x + vecE.y * biasAE * weaken,
|
||||||
pts[4].y - vecE.x * biasAE * weaken );
|
pts[4].y - vecE.x * biasAE * weaken );
|
||||||
|
|
||||||
wxPoint tangentB = wxPoint( pts[1].x - aTrackDir.x * biasBC, pts[1].y - aTrackDir.y * biasBC );
|
VECTOR2I tangentB = VECTOR2I( pts[1].x - aTrackDir.x * biasBC, pts[1].y - aTrackDir.y * biasBC );
|
||||||
wxPoint tangentA = wxPoint( pts[0].x - aTrackDir.x * biasAE, pts[0].y - aTrackDir.y * biasAE );
|
VECTOR2I tangentA = VECTOR2I( pts[0].x - aTrackDir.x * biasAE, pts[0].y - aTrackDir.y * biasAE );
|
||||||
|
|
||||||
std::vector<wxPoint> curve_pts;
|
std::vector<VECTOR2I> curve_pts;
|
||||||
curve_pts.reserve( m_Parameters.m_curveSegCount );
|
curve_pts.reserve( m_Parameters.m_curveSegCount );
|
||||||
BEZIER_POLY( pts[1], tangentB, tangentC, pts[2] ).GetPoly( curve_pts, 0,
|
BEZIER_POLY( pts[1], tangentB, tangentC, pts[2] ).GetPoly( curve_pts, 0,
|
||||||
m_Parameters.m_curveSegCount );
|
m_Parameters.m_curveSegCount );
|
||||||
|
|
||||||
for( wxPoint& corner: curve_pts )
|
for( VECTOR2I& corner: curve_pts )
|
||||||
aPoly.push_back( corner );
|
aPoly.push_back( corner );
|
||||||
|
|
||||||
aPoly.push_back( pts[3] );
|
aPoly.push_back( pts[3] );
|
||||||
|
@ -293,7 +296,7 @@ void TEARDROP_MANAGER::computeCurvedForRoundShape( std::vector<wxPoint>& aPoly,
|
||||||
BEZIER_POLY( pts[4], tangentE, tangentA, pts[0] ).GetPoly( curve_pts, 0,
|
BEZIER_POLY( pts[4], tangentE, tangentA, pts[0] ).GetPoly( curve_pts, 0,
|
||||||
m_Parameters.m_curveSegCount );
|
m_Parameters.m_curveSegCount );
|
||||||
|
|
||||||
for( wxPoint& corner: curve_pts )
|
for( VECTOR2I& corner: curve_pts )
|
||||||
aPoly.push_back( corner );
|
aPoly.push_back( corner );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,9 +305,9 @@ void TEARDROP_MANAGER::computeCurvedForRoundShape( std::vector<wxPoint>& aPoly,
|
||||||
* Compute the curve part points for teardrops connected to a rectangular/polygonal shape
|
* Compute the curve part points for teardrops connected to a rectangular/polygonal shape
|
||||||
* The Bezier curve control points are not optimized for a special shape
|
* The Bezier curve control points are not optimized for a special shape
|
||||||
*/
|
*/
|
||||||
void TEARDROP_MANAGER::computeCurvedForRectShape( std::vector<wxPoint>& aPoly, int aTdHeight,
|
void TEARDROP_MANAGER::computeCurvedForRectShape( std::vector<VECTOR2I>& aPoly, int aTdHeight,
|
||||||
int aTrackHalfWidth, VIAPAD& aViaPad,
|
int aTrackHalfWidth, VIAPAD& aViaPad,
|
||||||
std::vector<wxPoint>& aPts ) const
|
std::vector<VECTOR2I>& aPts ) const
|
||||||
{
|
{
|
||||||
// in aPts:
|
// in aPts:
|
||||||
// A and B are points on the track ( pts[0] and pts[1] )
|
// A and B are points on the track ( pts[0] and pts[1] )
|
||||||
|
@ -316,12 +319,12 @@ void TEARDROP_MANAGER::computeCurvedForRectShape( std::vector<wxPoint>& aPoly, i
|
||||||
// side2 is ( aPts[4], aPts[0] ); from via to track
|
// side2 is ( aPts[4], aPts[0] ); from via to track
|
||||||
VECTOR2I side2( aPts[4] - aPts[0] ); // vector from track to via
|
VECTOR2I side2( aPts[4] - aPts[0] ); // vector from track to via
|
||||||
|
|
||||||
std::vector<wxPoint> curve_pts;
|
std::vector<VECTOR2I> curve_pts;
|
||||||
curve_pts.reserve( m_Parameters.m_curveSegCount );
|
curve_pts.reserve( m_Parameters.m_curveSegCount );
|
||||||
|
|
||||||
// Note: This side is from track to via
|
// Note: This side is from track to via
|
||||||
wxPoint ctrl1 = ( aPts[1] + aPts[1] + aPts[2] ) / 3;
|
VECTOR2I ctrl1 = ( aPts[1] + aPts[1] + aPts[2] ) / 3;
|
||||||
wxPoint ctrl2 = ( aPts[1] + aPts[2] + aPts[2] ) / 3;
|
VECTOR2I ctrl2 = ( aPts[1] + aPts[2] + aPts[2] ) / 3;
|
||||||
|
|
||||||
// The control points must be moved toward the polygon inside, in order to give a curved shape
|
// The control points must be moved toward the polygon inside, in order to give a curved shape
|
||||||
// The move vector is perpendicular to the vertex (side 1 or side 2), and its
|
// The move vector is perpendicular to the vertex (side 1 or side 2), and its
|
||||||
|
@ -351,7 +354,7 @@ void TEARDROP_MANAGER::computeCurvedForRectShape( std::vector<wxPoint>& aPoly, i
|
||||||
BEZIER_POLY( aPts[1], ctrl1, ctrl2, aPts[2] ).GetPoly( curve_pts, 0,
|
BEZIER_POLY( aPts[1], ctrl1, ctrl2, aPts[2] ).GetPoly( curve_pts, 0,
|
||||||
m_Parameters.m_curveSegCount );
|
m_Parameters.m_curveSegCount );
|
||||||
|
|
||||||
for( wxPoint& corner: curve_pts )
|
for( VECTOR2I& corner: curve_pts )
|
||||||
aPoly.push_back( corner );
|
aPoly.push_back( corner );
|
||||||
|
|
||||||
aPoly.push_back( aPts[3] );
|
aPoly.push_back( aPts[3] );
|
||||||
|
@ -379,14 +382,14 @@ void TEARDROP_MANAGER::computeCurvedForRectShape( std::vector<wxPoint>& aPoly, i
|
||||||
BEZIER_POLY( aPts[4], ctrl1, ctrl2, aPts[0] ).GetPoly( curve_pts, 0,
|
BEZIER_POLY( aPts[4], ctrl1, ctrl2, aPts[0] ).GetPoly( curve_pts, 0,
|
||||||
m_Parameters.m_curveSegCount );
|
m_Parameters.m_curveSegCount );
|
||||||
|
|
||||||
for( wxPoint& corner: curve_pts )
|
for( VECTOR2I& corner: curve_pts )
|
||||||
aPoly.push_back( corner );
|
aPoly.push_back( corner );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool TEARDROP_MANAGER::ComputePointsOnPadVia( PCB_TRACK* aTrack,
|
bool TEARDROP_MANAGER::ComputePointsOnPadVia( PCB_TRACK* aTrack,
|
||||||
VIAPAD& aViaPad,
|
VIAPAD& aViaPad,
|
||||||
std::vector<wxPoint>& aPts ) const
|
std::vector<VECTOR2I>& aPts ) const
|
||||||
{
|
{
|
||||||
// Compute the 2 anchor points on pad/via of the teardrop shape
|
// Compute the 2 anchor points on pad/via of the teardrop shape
|
||||||
|
|
||||||
|
@ -437,7 +440,7 @@ bool TEARDROP_MANAGER::ComputePointsOnPadVia( PCB_TRACK* aTrack,
|
||||||
// teardrop_axis is the line from anchor point on the track and the end point
|
// teardrop_axis is the line from anchor point on the track and the end point
|
||||||
// of the teardrop in the pad/via
|
// of the teardrop in the pad/via
|
||||||
// this is the teardrop_axis of the teardrop shape to build
|
// this is the teardrop_axis of the teardrop shape to build
|
||||||
wxPoint ref_on_track = ( aPts[0] + aPts[1] ) / 2;
|
VECTOR2I ref_on_track = ( aPts[0] + aPts[1] ) / 2;
|
||||||
VECTOR2I teardrop_axis( aPts[3] - ref_on_track );
|
VECTOR2I teardrop_axis( aPts[3] - ref_on_track );
|
||||||
|
|
||||||
double orient = teardrop_axis.Angle();
|
double orient = teardrop_axis.Angle();
|
||||||
|
@ -472,25 +475,25 @@ bool TEARDROP_MANAGER::ComputePointsOnPadVia( PCB_TRACK* aTrack,
|
||||||
SHAPE_LINE_CHAIN& padpoly = c_buffer.Outline(0);
|
SHAPE_LINE_CHAIN& padpoly = c_buffer.Outline(0);
|
||||||
std::vector<VECTOR2I> points = padpoly.CPoints();
|
std::vector<VECTOR2I> points = padpoly.CPoints();
|
||||||
|
|
||||||
std::vector<wxPoint> initialPoints;
|
std::vector<VECTOR2I> initialPoints;
|
||||||
initialPoints.push_back( aPts[0] );
|
initialPoints.push_back( aPts[0] );
|
||||||
initialPoints.push_back( aPts[1] );
|
initialPoints.push_back( aPts[1] );
|
||||||
|
|
||||||
for( const VECTOR2I& pt: points )
|
for( const VECTOR2I& pt: points )
|
||||||
initialPoints.emplace_back( pt.x, pt.y );
|
initialPoints.emplace_back( pt.x, pt.y );
|
||||||
|
|
||||||
std::vector<wxPoint> hull;
|
std::vector<VECTOR2I> hull;
|
||||||
BuildConvexHull( hull, initialPoints );
|
BuildConvexHull( hull, initialPoints );
|
||||||
|
|
||||||
// Search for end points of segments starting at aPts[0] or aPts[1]
|
// Search for end points of segments starting at aPts[0] or aPts[1]
|
||||||
// In some cases, in convex hull, only one point (aPts[0] or aPts[1]) is still in list
|
// In some cases, in convex hull, only one point (aPts[0] or aPts[1]) is still in list
|
||||||
wxPoint PointC;
|
VECTOR2I PointC;
|
||||||
wxPoint PointE;
|
VECTOR2I PointE;
|
||||||
int found_start = -1; // 2 points (one start and one end) should be found
|
int found_start = -1; // 2 points (one start and one end) should be found
|
||||||
int found_end = -1;
|
int found_end = -1;
|
||||||
|
|
||||||
wxPoint start = aPts[0];
|
VECTOR2I start = aPts[0];
|
||||||
wxPoint pend = aPts[1];
|
VECTOR2I pend = aPts[1];
|
||||||
|
|
||||||
for( unsigned ii = 0, jj = 0; jj < hull.size(); ii++, jj++ )
|
for( unsigned ii = 0, jj = 0; jj < hull.size(); ii++, jj++ )
|
||||||
{
|
{
|
||||||
|
@ -536,7 +539,7 @@ bool TEARDROP_MANAGER::ComputePointsOnPadVia( PCB_TRACK* aTrack,
|
||||||
PointE = hull[ii];
|
PointE = hull[ii];
|
||||||
}
|
}
|
||||||
|
|
||||||
if( found_end < 0 ) // PointC was not initalized, because pend point does not exit
|
if( found_end < 0 ) // PointC was not initalized, because end point does not exit
|
||||||
{
|
{
|
||||||
int ii = found_start-1;
|
int ii = found_start-1;
|
||||||
|
|
||||||
|
@ -568,15 +571,15 @@ bool TEARDROP_MANAGER::ComputePointsOnPadVia( PCB_TRACK* aTrack,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool TEARDROP_MANAGER::findAnchorPointsOnTrack( wxPoint& aStartPoint, wxPoint& aEndPoint,
|
bool TEARDROP_MANAGER::findAnchorPointsOnTrack( VECTOR2I& aStartPoint, VECTOR2I& aEndPoint,
|
||||||
PCB_TRACK*& aTrack, VIAPAD& aViaPad,
|
PCB_TRACK*& aTrack, VIAPAD& aViaPad,
|
||||||
int* aEffectiveTeardropLen,
|
int* aEffectiveTeardropLen,
|
||||||
bool aFollowTracks,
|
bool aFollowTracks,
|
||||||
TRACK_BUFFER& aTrackLookupList ) const
|
TRACK_BUFFER& aTrackLookupList ) const
|
||||||
{
|
{
|
||||||
bool found = true;
|
bool found = true;
|
||||||
wxPoint start = aTrack->GetStart();
|
VECTOR2I start = aTrack->GetStart();
|
||||||
wxPoint end = aTrack->GetEnd();
|
VECTOR2I end = aTrack->GetEnd();
|
||||||
int radius = aViaPad.m_Width / 2;
|
int radius = aViaPad.m_Width / 2;
|
||||||
// Requested length of the teardrop:
|
// Requested length of the teardrop:
|
||||||
int targetLength = aViaPad.m_Width * m_Parameters.m_lenghtRatio;
|
int targetLength = aViaPad.m_Width * m_Parameters.m_lenghtRatio;
|
||||||
|
@ -661,12 +664,12 @@ bool TEARDROP_MANAGER::findAnchorPointsOnTrack( wxPoint& aStartPoint, wxPoint& a
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool TEARDROP_MANAGER::computeTeardropPolygonPoints( std::vector<wxPoint>& aCorners,
|
bool TEARDROP_MANAGER::computeTeardropPolygonPoints( std::vector<VECTOR2I>& aCorners,
|
||||||
PCB_TRACK* aTrack, VIAPAD& aViaPad,
|
PCB_TRACK* aTrack, VIAPAD& aViaPad,
|
||||||
bool aFollowTracks,
|
bool aFollowTracks,
|
||||||
TRACK_BUFFER& aTrackLookupList ) const
|
TRACK_BUFFER& aTrackLookupList ) const
|
||||||
{
|
{
|
||||||
wxPoint start, end; // Start and end points of the track anchor of the teardrop
|
VECTOR2I start, end; // Start and end points of the track anchor of the teardrop
|
||||||
// the start point is inside the teardrop shape
|
// the start point is inside the teardrop shape
|
||||||
// the end point is outside.
|
// the end point is outside.
|
||||||
int track_stub_len; // the dist between the start point and the anchor point
|
int track_stub_len; // the dist between the start point and the anchor point
|
||||||
|
@ -681,9 +684,9 @@ bool TEARDROP_MANAGER::computeTeardropPolygonPoints( std::vector<wxPoint>& aCorn
|
||||||
|
|
||||||
// find the 2 points on the track, sharp end of the teardrop
|
// find the 2 points on the track, sharp end of the teardrop
|
||||||
int track_halfwidth = aTrack->GetWidth() / 2;
|
int track_halfwidth = aTrack->GetWidth() / 2;
|
||||||
wxPoint pointB = start + wxPoint( vecT.x * track_stub_len + vecT.y * track_halfwidth,
|
VECTOR2I pointB = start + VECTOR2I( vecT.x * track_stub_len + vecT.y * track_halfwidth,
|
||||||
vecT.y * track_stub_len - vecT.x * track_halfwidth );
|
vecT.y * track_stub_len - vecT.x * track_halfwidth );
|
||||||
wxPoint pointA = start + wxPoint( vecT.x * track_stub_len - vecT.y * track_halfwidth,
|
VECTOR2I pointA = start + VECTOR2I( vecT.x * track_stub_len - vecT.y * track_halfwidth,
|
||||||
vecT.y * track_stub_len + vecT.x * track_halfwidth );
|
vecT.y * track_stub_len + vecT.x * track_halfwidth );
|
||||||
|
|
||||||
// To build a polygonal valid shape pointA and point B must be outside the pad
|
// To build a polygonal valid shape pointA and point B must be outside the pad
|
||||||
|
@ -700,19 +703,19 @@ bool TEARDROP_MANAGER::computeTeardropPolygonPoints( std::vector<wxPoint>& aCorn
|
||||||
}
|
}
|
||||||
|
|
||||||
// Introduce a last point to cover the via centre to ensure it is seen as connected
|
// Introduce a last point to cover the via centre to ensure it is seen as connected
|
||||||
wxPoint pointD = aViaPad.m_Pos;
|
VECTOR2I pointD = aViaPad.m_Pos;
|
||||||
// add a small offset in order to have the aViaPad.m_Pos reference point inside
|
// add a small offset in order to have the aViaPad.m_Pos reference point inside
|
||||||
// the teardrop area, just in case...
|
// the teardrop area, just in case...
|
||||||
int offset = Millimeter2iu( 0.001 );
|
int offset = Millimeter2iu( 0.001 );
|
||||||
pointD += wxPoint( int( -vecT.x*offset), int(-vecT.y*offset) );
|
pointD += VECTOR2I( int( -vecT.x*offset), int(-vecT.y*offset) );
|
||||||
|
|
||||||
wxPoint pointC, pointE; // Point on PADVIA outlines
|
VECTOR2I pointC, pointE; // Point on PADVIA outlines
|
||||||
std::vector<wxPoint> pts = {pointA, pointB, pointC, pointD, pointE};
|
std::vector<VECTOR2I> pts = {pointA, pointB, pointC, pointD, pointE};
|
||||||
|
|
||||||
ComputePointsOnPadVia( aTrack, aViaPad, pts );
|
ComputePointsOnPadVia( aTrack, aViaPad, pts );
|
||||||
|
|
||||||
if( m_Parameters.m_curveSegCount <= 2
|
if( m_Parameters.m_curveSegCount <= 2
|
||||||
|| m_Parameters.m_curveOpt == CURVED_OPTION::OPTION_NONE )
|
|| m_Parameters.m_curveShapeOpt == CURVED_OPTION_NONE )
|
||||||
{
|
{
|
||||||
aCorners = pts;
|
aCorners = pts;
|
||||||
return true;
|
return true;
|
||||||
|
@ -720,9 +723,16 @@ bool TEARDROP_MANAGER::computeTeardropPolygonPoints( std::vector<wxPoint>& aCorn
|
||||||
|
|
||||||
// See if we can use curved teardrop shape
|
// See if we can use curved teardrop shape
|
||||||
if( aViaPad.m_IsRound )
|
if( aViaPad.m_IsRound )
|
||||||
|
{
|
||||||
|
if( m_Parameters.m_curveShapeOpt & CURVED_OPTION_ROUND )
|
||||||
computeCurvedForRoundShape( aCorners, track_halfwidth,
|
computeCurvedForRoundShape( aCorners, track_halfwidth,
|
||||||
vecT, aViaPad, pts );
|
vecT, aViaPad, pts );
|
||||||
else if( m_Parameters.m_curveOpt == CURVED_OPTION::OPTION_ALL_PADS )
|
else
|
||||||
|
aCorners = pts;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( m_Parameters.m_curveShapeOpt & CURVED_OPTION_RECT )
|
||||||
{
|
{
|
||||||
int td_height = aViaPad.m_Width * m_Parameters.m_heightRatio;
|
int td_height = aViaPad.m_Width * m_Parameters.m_heightRatio;
|
||||||
|
|
||||||
|
@ -734,6 +744,7 @@ bool TEARDROP_MANAGER::computeTeardropPolygonPoints( std::vector<wxPoint>& aCorn
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
aCorners = pts;
|
aCorners = pts;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -608,6 +608,11 @@ void ZONE_FILLER::knockoutThermalReliefs( const ZONE* aZone, PCB_LAYER_ID aLayer
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// a teardrop area is always fully connected to its pad
|
||||||
|
// (always equiv to ZONE_CONNECTION::FULL)
|
||||||
|
if( aZone->IsTeardropArea() )
|
||||||
|
continue;
|
||||||
|
|
||||||
constraint = bds.m_DRCEngine->EvalZoneConnection( pad, aZone, aLayer );
|
constraint = bds.m_DRCEngine->EvalZoneConnection( pad, aZone, aLayer );
|
||||||
ZONE_CONNECTION conn = constraint.m_ZoneConnection;
|
ZONE_CONNECTION conn = constraint.m_ZoneConnection;
|
||||||
|
|
||||||
|
@ -935,7 +940,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
||||||
|
|
||||||
if( otherZone->GetIsRuleArea() )
|
if( otherZone->GetIsRuleArea() )
|
||||||
{
|
{
|
||||||
if( otherZone->GetDoNotAllowCopperPour() )
|
if( otherZone->GetDoNotAllowCopperPour() && !aZone->IsTeardropArea() )
|
||||||
knockoutZoneClearance( otherZone );
|
knockoutZoneClearance( otherZone );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -957,7 +962,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
||||||
|
|
||||||
if( otherZone->GetIsRuleArea() )
|
if( otherZone->GetIsRuleArea() )
|
||||||
{
|
{
|
||||||
if( otherZone->GetDoNotAllowCopperPour() )
|
if( otherZone->GetDoNotAllowCopperPour() && !aZone->IsTeardropArea() )
|
||||||
knockoutZoneClearance( otherZone );
|
knockoutZoneClearance( otherZone );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1000,6 +1005,8 @@ void ZONE_FILLER::subtractHigherPriorityZones( const ZONE* aZone, PCB_LAYER_ID a
|
||||||
if( otherZone->GetNetCode() == aZone->GetNetCode()
|
if( otherZone->GetNetCode() == aZone->GetNetCode()
|
||||||
&& otherZone->GetPriority() > aZone->GetPriority() )
|
&& otherZone->GetPriority() > aZone->GetPriority() )
|
||||||
{
|
{
|
||||||
|
// Do not remove teardrop area: it is not useful and not good
|
||||||
|
if( !otherZone->IsTeardropArea() )
|
||||||
knockoutZoneOutline( otherZone );
|
knockoutZoneOutline( otherZone );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1011,6 +1018,8 @@ void ZONE_FILLER::subtractHigherPriorityZones( const ZONE* aZone, PCB_LAYER_ID a
|
||||||
if( otherZone->GetNetCode() == aZone->GetNetCode()
|
if( otherZone->GetNetCode() == aZone->GetNetCode()
|
||||||
&& otherZone->GetPriority() > aZone->GetPriority() )
|
&& otherZone->GetPriority() > aZone->GetPriority() )
|
||||||
{
|
{
|
||||||
|
// Do not remove teardrop area: it is not useful and not good
|
||||||
|
if( !otherZone->IsTeardropArea() )
|
||||||
knockoutZoneOutline( otherZone );
|
knockoutZoneOutline( otherZone );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue