Commit 56059efd authored by charras's avatar charras

Netclasses work continued

Fixed problems in libedit and crashes when no component loaded
parent b4fe26a3
......@@ -8,7 +8,7 @@
#include "appl_wxstruct.h"
#define BUILD_VERSION "(20091001-unstable)"
#define BUILD_VERSION "(20091010-unstable)"
#ifdef HAVE_SVN_VERSION
......
......@@ -19,6 +19,7 @@ set(CVPCB_SRCS
dialog_cvpcb_config_fbp.cpp
dialog_display_options.cpp
displayframe.cpp
dummy_functions.cpp
genequiv.cpp
init.cpp
listboxes.cpp
......
/* dummy_functions.cpp
*
* There are functions used in some classes.
* they are useful in pcbnew, but have no meaning or are never used
* in cvpcb or gerbview.
* but they must exist because they appear in some classes, and here, no nothing.
*/
#include "fctsys.h"
#include "common.h"
#include "pcbnew.h"
TRACK* Marque_Une_Piste( BOARD* aPcb,
TRACK* aStartSegm,
int* aSegmCount,
int* aTrackLen,
bool aReorder )
{
return NULL;
}
......@@ -101,7 +101,8 @@ int WinEDA_LibeditFrame::HandleBlockEnd( wxDC* DC )
case BLOCK_DRAG: /* Drag */
case BLOCK_MOVE: /* Move */
case BLOCK_COPY: /* Copy */
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
if ( m_component )
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
m_unit, m_convert,
g_EditPinByPinIsOn );
if( ItemCount )
......@@ -125,12 +126,14 @@ int WinEDA_LibeditFrame::HandleBlockEnd( wxDC* DC )
break;
case BLOCK_DELETE: /* Delete */
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
if ( m_component )
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
m_unit, m_convert,
g_EditPinByPinIsOn );
if( ItemCount )
SaveCopyInUndoList( m_component );
m_component->DeleteSelectedItems();
if ( m_component )
m_component->DeleteSelectedItems();
break;
case BLOCK_SAVE: /* Save */
......@@ -142,14 +145,16 @@ int WinEDA_LibeditFrame::HandleBlockEnd( wxDC* DC )
case BLOCK_MIRROR_Y:
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
if ( m_component )
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
m_unit, m_convert,
g_EditPinByPinIsOn );
if( ItemCount )
SaveCopyInUndoList( m_component );
pt = GetScreen()->m_BlockLocate.Centre();
pt.y *= -1;
m_component->MirrorSelectedItemsH( pt );
if ( m_component )
m_component->MirrorSelectedItemsH( pt );
break;
case BLOCK_ZOOM: /* Window Zoom */
......@@ -166,7 +171,8 @@ int WinEDA_LibeditFrame::HandleBlockEnd( wxDC* DC )
if( MustDoPlace <= 0 )
{
if( GetScreen()->m_BlockLocate.m_Command != BLOCK_SELECT_ITEMS_ONLY )
m_component->ClearSelectedItems();
if ( m_component )
m_component->ClearSelectedItems();
GetScreen()->m_BlockLocate.m_Flags = 0;
GetScreen()->m_BlockLocate.m_State = STATE_NO_BLOCK;
......@@ -213,19 +219,23 @@ void WinEDA_LibeditFrame::HandleBlockPlace( wxDC* DC )
case BLOCK_MOVE: /* Move */
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
GetScreen()->m_BlockLocate.ClearItemsList();
SaveCopyInUndoList( m_component );
if ( m_component )
SaveCopyInUndoList( m_component );
pt = GetScreen()->m_BlockLocate.m_MoveVector;
pt.y *= -1;
m_component->MoveSelectedItems( pt );
if ( m_component )
m_component->MoveSelectedItems( pt );
DrawPanel->Refresh( TRUE );
break;
case BLOCK_COPY: /* Copy */
GetScreen()->m_BlockLocate.ClearItemsList();
SaveCopyInUndoList( m_component );
if ( m_component )
SaveCopyInUndoList( m_component );
pt = GetScreen()->m_BlockLocate.m_MoveVector;
pt.y *= -1;
m_component->CopySelectedItems( pt );
if ( m_component )
m_component->CopySelectedItems( pt );
break;
case BLOCK_PASTE: /* Paste (recopie du dernier bloc sauve */
......@@ -233,10 +243,12 @@ void WinEDA_LibeditFrame::HandleBlockPlace( wxDC* DC )
break;
case BLOCK_MIRROR_Y: /* Invert by popup menu, from block move */
SaveCopyInUndoList( m_component );
if ( m_component )
SaveCopyInUndoList( m_component );
pt = GetScreen()->m_BlockLocate.Centre();
pt.y *= -1;
m_component->MirrorSelectedItemsH( pt );
if ( m_component )
m_component->MirrorSelectedItemsH( pt );
break;
case BLOCK_ZOOM: // Handled by HandleBlockEnd
......
......@@ -599,8 +599,8 @@ bool LIB_COMPONENT::Load( FILE* file, char* line, int* lineNum,
return false;
}
m_DrawPinNum = (drawnum == 'N') ? FALSE : TRUE;
m_DrawPinName = (drawname == 'N') ? FALSE : TRUE;
m_DrawPinNum = (drawnum == 'N') ? FALSE : true;
m_DrawPinName = (drawname == 'N') ? FALSE : true;
/* Copy part name and prefix. */
strupper( name );
......@@ -622,7 +622,7 @@ bool LIB_COMPONENT::Load( FILE* file, char* line, int* lineNum,
// Copy optional infos
if( ( p = strtok( NULL, " \t\n" ) ) != NULL && *p == 'L' )
m_UnitSelectionLocked = TRUE;
m_UnitSelectionLocked = true;
if( ( p = strtok( NULL, " \t\n" ) ) != NULL && *p == 'P' )
m_Options = ENTRY_POWER;
......@@ -862,10 +862,10 @@ void LIB_COMPONENT::SetFields( const std::vector <LIB_FIELD> aFields )
{
bool create = FALSE;
if( !aFields[ii].m_Text.IsEmpty() )
create = TRUE;
create = true;
if( !aFields[ii].m_Name.IsEmpty()
&& ( aFields[ii].m_Name != ReturnDefaultFieldName( ii ) ) )
create = TRUE;
create = true;
if( create )
{
LIB_FIELD*Field = new LIB_FIELD( this, ii );
......@@ -1302,7 +1302,7 @@ void LIB_COMPONENT::SetConversion( bool asConvert )
{
if( asConvert == HasConversion() )
return;
// Duplicate items to create the converted shape
if( asConvert )
{
......@@ -1321,6 +1321,7 @@ void LIB_COMPONENT::SetConversion( bool asConvert )
}
else
{
// Delete converted shape items becuase the converted shape does not exist
LIB_DRAW_ITEM_LIST::iterator i = m_Drawings.begin();
while( i != m_Drawings.end() )
......
......@@ -31,18 +31,21 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
m_OptionsBoxSizer->Add( m_AsConvertButt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ShowPinNumButt = new wxCheckBox( m_PanelBasic, wxID_ANY, _("Show Pin Num"), wxDefaultPosition, wxDefaultSize, 0 );
m_ShowPinNumButt->SetValue(true);
m_ShowPinNumButt->SetToolTip( _("Show or hide pin numbers") );
m_OptionsBoxSizer->Add( m_ShowPinNumButt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ShowPinNameButt = new wxCheckBox( m_PanelBasic, wxID_ANY, _("Show Pin Name"), wxDefaultPosition, wxDefaultSize, 0 );
m_ShowPinNameButt->SetValue(true);
m_ShowPinNameButt->SetToolTip( _("Show or hide pin names") );
m_OptionsBoxSizer->Add( m_ShowPinNameButt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PinsNameInsideButt = new wxCheckBox( m_PanelBasic, wxID_ANY, _("Pin Name Inside"), wxDefaultPosition, wxDefaultSize, 0 );
m_PinsNameInsideButt->SetValue(true);
m_PinsNameInsideButt->SetToolTip( _("Check this option to have pin names inside the body and pin number outside.\nIf not checked pins names and pins numbers are outside.") );
......@@ -63,7 +66,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
m_staticTextNbUnits->Wrap( -1 );
bSizernbunits->Add( m_staticTextNbUnits, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_SelNumberOfUnits = new wxSpinCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 16, 1 );
m_SelNumberOfUnits = new wxSpinCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 16, 1 );
bSizernbunits->Add( m_SelNumberOfUnits, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerMidBasicPanel->Add( bSizernbunits, 1, wxEXPAND, 5 );
......@@ -75,7 +78,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx
m_staticTextskew->Wrap( -1 );
bSizer17->Add( m_staticTextskew, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_SetSkew = new wxSpinCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 );
m_SetSkew = new wxSpinCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 0 );
bSizer17->Add( m_SetSkew, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerMidBasicPanel->Add( bSizer17, 1, wxEXPAND, 5 );
......
......@@ -246,7 +246,7 @@
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="checked">1</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
......@@ -298,7 +298,7 @@
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="checked">1</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
......@@ -350,7 +350,7 @@
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="checked">1</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
......@@ -531,7 +531,7 @@
<property name="initial">1</property>
<property name="max">16</property>
<property name="maximum_size"></property>
<property name="min">0</property>
<property name="min">1</property>
<property name="minimum_size"></property>
<property name="name">m_SelNumberOfUnits</property>
<property name="permission">protected</property>
......@@ -648,7 +648,7 @@
<property name="initial">0</property>
<property name="max">100</property>
<property name="maximum_size"></property>
<property name="min">0</property>
<property name="min">1</property>
<property name="minimum_size"></property>
<property name="name">m_SetSkew</property>
<property name="permission">protected</property>
......
......@@ -522,7 +522,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="initial">0</property>
<property name="max">40</property>
<property name="max">26</property>
<property name="maximum_size"></property>
<property name="min">1</property>
<property name="minimum_size"></property>
......@@ -754,7 +754,7 @@
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Prevent drawing items from being &amp;moved</property>
<property name="label">Parts in package locked (cannot be swapped)</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_checkLockItems</property>
......@@ -949,9 +949,9 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="initial">40</property>
<property name="max">10000</property>
<property name="max">100</property>
<property name="maximum_size"></property>
<property name="min">0</property>
<property name="min">1</property>
<property name="minimum_size"></property>
<property name="name">m_spinPinTextPosition</property>
<property name="permission">protected</property>
......@@ -1190,6 +1190,79 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer121</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">3</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">12</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">3</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">1</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pin name &amp;inside</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_checkShowPinNameInside</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxALL|wxEXPAND</property>
......
......@@ -62,6 +62,12 @@ public:
m_checkShowPinName->SetValue( show );
}
bool GetShowPinName( void ) { return m_checkShowPinName->GetValue(); }
void SetPinNameInside( bool show )
{
m_checkShowPinNameInside->SetValue( show );
}
bool GetPinNameInside( void ) { return m_checkShowPinNameInside->GetValue(); }
};
#endif // __dialog_lib_new_component__
......@@ -80,7 +80,7 @@ DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent,
bSizer4->Add( 0, 0, 1, wxEXPAND, 3 );
m_spinPartCount = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxSize( 100,-1 ), wxSP_ARROW_KEYS, 1, 40, 0 );
m_spinPartCount = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxSize( 100,-1 ), wxSP_ARROW_KEYS, 1, 26, 0 );
bSizer4->Add( m_spinPartCount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
......@@ -118,7 +118,7 @@ DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent,
bSizer9->Add( 12, 0, 0, wxEXPAND, 3 );
m_checkLockItems = new wxCheckBox( this, wxID_ANY, _("Prevent drawing items from being &moved"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkLockItems = new wxCheckBox( this, wxID_ANY, _("Parts in package locked (cannot be swapped)"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer9->Add( m_checkLockItems, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
......@@ -146,7 +146,7 @@ DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent,
bSizer6->Add( 0, 0, 1, wxEXPAND, 3 );
m_spinPinTextPosition = new wxSpinCtrl( this, wxID_ANY, wxT("40"), wxDefaultPosition, wxSize( 100,-1 ), wxSP_ARROW_KEYS, 0, 10000, 40 );
m_spinPinTextPosition = new wxSpinCtrl( this, wxID_ANY, wxT("40"), wxDefaultPosition, wxSize( 100,-1 ), wxSP_ARROW_KEYS, 1, 100, 40 );
bSizer6->Add( m_spinPinTextPosition, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText5 = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxSize( 30,-1 ), 0 );
......@@ -181,6 +181,19 @@ DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent,
bSizer5->Add( bSizer12, 0, wxALL|wxEXPAND, 0 );
wxBoxSizer* bSizer121;
bSizer121 = new wxBoxSizer( wxHORIZONTAL );
bSizer121->Add( 12, 0, 0, wxEXPAND, 3 );
m_checkShowPinNameInside = new wxCheckBox( this, wxID_ANY, _("Pin name &inside"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkShowPinNameInside->SetValue(true);
bSizer121->Add( m_checkShowPinNameInside, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
bSizer5->Add( bSizer121, 1, wxEXPAND, 5 );
bSizer5->Add( 0, 5, 0, wxALL|wxEXPAND, 10 );
......
......@@ -67,6 +67,8 @@ class DIALOG_LIB_NEW_COMPONENT_BASE : public wxDialog
wxCheckBox* m_checkShowPinName;
wxCheckBox* m_checkShowPinNameInside;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
......
......@@ -5,6 +5,7 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "gestfich.h"
......@@ -31,13 +32,12 @@
void WinEDA_LibeditFrame::OnEditComponentProperties( wxCommandEvent& event )
{
EditComponentProperties();
DrawPanel->Refresh();
}
void WinEDA_LibeditFrame::EditComponentProperties()
{
wxASSERT( m_component != NULL && m_library != NULL );
DIALOG_EDIT_COMPONENT_IN_LIBRARY dlg( this );
if( dlg.ShowModal() == wxID_CANCEL )
......@@ -120,15 +120,21 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event )
/* Update the doc, keyword and doc filename strings */
size_t i;
int index;
CMP_LIB_ENTRY* entry;
CMP_LIB_ENTRY* entry = NULL;
LIB_COMPONENT* component = m_Parent->GetComponent();
if( component == NULL )
{
EndModal( wxID_CANCEL );
return;
}
CMP_LIBRARY* library = m_Parent->GetLibrary();
if( m_Parent->GetAliasName().IsEmpty() )
{
entry = (CMP_LIB_ENTRY*) component;
}
else
else if ( library )
{
entry = library->FindEntry( m_Parent->GetAliasName() );
}
......@@ -213,21 +219,26 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event )
component->m_DrawPinNum = m_ShowPinNumButt->GetValue() ? 1 : 0;
component->m_DrawPinName = m_ShowPinNameButt->GetValue() ? 1 : 0;
if( m_PinsNameInsideButt->GetValue() == FALSE )
component->m_TextInside = 0;
if( m_PinsNameInsideButt->GetValue() == false )
component->m_TextInside = 0; // pin text outside the body (name is on the pin)
else
{
component->m_TextInside = m_SetSkew->GetValue();
// Ensure component->m_TextInside != 0, because the meaning is "text outside".
if( component->m_TextInside == 0 )
component->m_TextInside = 20; // give a reasonnable value
}
if( m_OptionPower->GetValue() == TRUE )
if( m_OptionPower->GetValue() == true )
component->m_Options = ENTRY_POWER;
else
component->m_Options = ENTRY_NORMAL;
/* Set the option "Units locked".
* Obviously, cannot be TRUE if there is only one part */
* Obviously, cannot be true if there is only one part */
component->m_UnitSelectionLocked = m_OptionPartsLocked->GetValue();
if( component->GetPartCount() <= 1 )
component->m_UnitSelectionLocked = FALSE;
component->m_UnitSelectionLocked = false;
/* Update the footprint filter list */
component->m_FootprintList.Clear();
......@@ -273,8 +284,8 @@ edited!" ),
if( IsOK( this, _( "Remove all aliases from list?" ) ) )
{
m_PartAliasList->Clear();
m_ButtonDeleteAllAlias->Enable( FALSE );
m_ButtonDeleteOneAlias->Enable( FALSE );
m_ButtonDeleteAllAlias->Enable( false );
m_ButtonDeleteOneAlias->Enable( false );
}
}
......@@ -316,8 +327,8 @@ library <%s>." ),
m_PartAliasList->Append( aliasname );
if( m_Parent->GetAliasName().IsEmpty() )
m_ButtonDeleteAllAlias->Enable( TRUE );
m_ButtonDeleteOneAlias->Enable( TRUE );
m_ButtonDeleteAllAlias->Enable( true );
m_ButtonDeleteOneAlias->Enable( true );
}
......@@ -342,8 +353,8 @@ edited!" ),
if( m_PartAliasList->IsEmpty() )
{
m_ButtonDeleteAllAlias->Enable( FALSE );
m_ButtonDeleteOneAlias->Enable( FALSE );
m_ButtonDeleteAllAlias->Enable( false );
m_ButtonDeleteOneAlias->Enable( false );
}
}
......@@ -379,20 +390,20 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::SetUnsetConvert()
|| ( m_Parent->GetShowDeMorgan() == component->HasConversion() ) )
return false;
if( m_Parent->GetShowDeMorgan()
&& !IsOK( this, _( "Add new pins for alternate body style \
( DeMorgan ) to component?" ) ) )
if( m_Parent->GetShowDeMorgan() )
{
m_Parent->SetShowDeMorgan( false );
if( !IsOK( this, _( "Add new pins for alternate body style \
( DeMorgan ) to component?" ) ) )
return false;
}
if( !m_Parent->GetShowDeMorgan()
&& !IsOK( this, _( "Delete alternate body style (DeMorgan) draw \
items from component?" ) ) )
else if( component->HasConversion() )
{
m_Parent->SetShowDeMorgan( true );
return false;
if( !IsOK( this, _( "Delete alternate body style (DeMorgan) draw items from component?" ) ) )
{
m_Parent->SetShowDeMorgan( true );
return false;
}
}
component->SetConversion( m_Parent->GetShowDeMorgan() );
......@@ -419,7 +430,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile( wxCommandEvent& e
mask, /* Masque d'affichage */
this,
wxFD_OPEN,
TRUE
true
);
if( FullFileName.IsEmpty() )
return;
......@@ -446,8 +457,8 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAllFootprintFilter(
if( IsOK( this, _( "Ok to Delete FootprintFilter LIST" ) ) )
{
m_FootprintFilterListBox->Clear();
m_ButtonDeleteAllFootprintFilter->Enable( FALSE );
m_ButtonDeleteOneFootprintFilter->Enable( FALSE );
m_ButtonDeleteAllFootprintFilter->Enable( false );
m_ButtonDeleteOneFootprintFilter->Enable( false );
}
}
......@@ -486,8 +497,8 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddFootprintFilter( wxCommandEvent& WXUNU
}
m_FootprintFilterListBox->Append( Line );
m_ButtonDeleteAllFootprintFilter->Enable( TRUE );
m_ButtonDeleteOneFootprintFilter->Enable( TRUE );
m_ButtonDeleteAllFootprintFilter->Enable( true );
m_ButtonDeleteOneFootprintFilter->Enable( true );
}
......@@ -503,7 +514,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteOneFootprintFilter(
if( !component || (m_FootprintFilterListBox->GetCount() == 0) )
{
m_ButtonDeleteAllFootprintFilter->Enable( FALSE );
m_ButtonDeleteOneFootprintFilter->Enable( FALSE );
m_ButtonDeleteAllFootprintFilter->Enable( false );
m_ButtonDeleteOneFootprintFilter->Enable( false );
}
}
......@@ -113,6 +113,7 @@ library \"%s\"." ),
GetScreen()->ClearUndoRedoList();
Zoom_Automatique( false );
DrawPanel->Refresh();
SetShowDeMorgan(m_component->HasConversion() );
}
......@@ -506,7 +507,10 @@ lost!\n\nClear the current component from the screen?" ) ) )
return;
if( dlg.GetName().IsEmpty() )
{
wxMessageBox(_("This new component has no name and cannot be created. Aborted"));
return;
}
name = dlg.GetName().MakeUpper();
name.Replace( wxT( " " ), wxT( "_" ) );
......@@ -525,12 +529,25 @@ lost!\n\nClear the current component from the screen?" ) ) )
LIB_COMPONENT* component = new LIB_COMPONENT( name );
component->m_Prefix.m_Text = dlg.GetReference();
component->SetPartCount( dlg.GetPartCount() );
// Initialize component->m_TextInside member:
// if 0, pin text is outside the body (on the pin)
// if > 0, pin text is inside the body
component->SetConversion( dlg.GetAlternateBodyStyle() );
component->m_TextInside = dlg.GetPinTextPosition();
component->m_Options = ( dlg.GetPowerSymbol() ) ? ENTRY_POWER :
ENTRY_NORMAL;
SetShowDeMorgan( dlg.GetAlternateBodyStyle() );
if( dlg.GetPinNameInside( ) )
{
component->m_TextInside = dlg.GetPinTextPosition();
if( component->m_TextInside == 0 )
component->m_TextInside = 1;
}
else
component->m_TextInside = 0;
component->m_Options = ( dlg.GetPowerSymbol() ) ? ENTRY_POWER : ENTRY_NORMAL;
component->m_DrawPinNum = dlg.GetShowPinNumber();
component->m_DrawPinName = dlg.GetShowPinName();
component->m_UnitSelectionLocked = dlg.GetLockItems();
if( dlg.GetPartCount() < 2 )
component->m_UnitSelectionLocked = false;
if( m_component )
{
......
......@@ -20,8 +20,8 @@ class LIB_DRAW_ITEM;
class WinEDA_LibeditFrame : public WinEDA_DrawFrame
{
public:
WinEDAChoiceBox* m_SelpartBox;
WinEDAChoiceBox* m_SelAliasBox;
WinEDAChoiceBox* m_SelpartBox; // a Box to select a part to edit (if any)
WinEDAChoiceBox* m_SelAliasBox; // a box to select the alias to edit (if any)
public:
WinEDA_LibeditFrame( wxWindow* father,
......@@ -31,59 +31,59 @@ public:
~WinEDA_LibeditFrame();
void Process_Special_Functions( wxCommandEvent& event );
void OnImportPart( wxCommandEvent& event );
void OnExportPart( wxCommandEvent& event );
void OnSelectAlias( wxCommandEvent& event );
void OnSelectPart( wxCommandEvent& event );
void DeleteOnePart( wxCommandEvent& event );
void CreateNewLibraryPart( wxCommandEvent& event );
void OnEditComponentProperties( wxCommandEvent& event );
void InstallFieldsEditorDialog( wxCommandEvent& event );
void LoadOneLibraryPart( wxCommandEvent& event );
void OnViewEntryDoc( wxCommandEvent& event );
void OnCheckComponent( wxCommandEvent& event );
void OnSelectBodyStyle( wxCommandEvent& event );
void OnUpdateEditingPart( wxUpdateUIEvent& event );
void OnUpdateNotEditingPart( wxUpdateUIEvent& event );
void OnUpdateUndo( wxUpdateUIEvent& event );
void OnUpdateRedo( wxUpdateUIEvent& event );
void OnUpdateSaveCurrentLib( wxUpdateUIEvent& event );
void OnUpdateViewDoc( wxUpdateUIEvent& event );
void OnUpdatePinByPin( wxUpdateUIEvent& event );
void OnUpdatePartNumber( wxUpdateUIEvent& event );
void OnUpdateDeMorganNormal( wxUpdateUIEvent& event );
void OnUpdateDeMorganConvert( wxUpdateUIEvent& event );
void OnUpdateSelectAlias( wxUpdateUIEvent& event );
void UpdateAliasSelectList();
void UpdatePartSelectList();
void DisplayLibInfos();
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
void OnCloseWindow( wxCloseEvent& Event );
void ReCreateHToolbar();
void ReCreateVToolbar();
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
int BestZoom(); // Retourne le meilleur zoom
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
SCH_SCREEN* GetScreen() { return (SCH_SCREEN*) GetBaseScreen(); }
void OnHotKey( wxDC* DC, int hotkey,
EDA_BaseStruct* DrawStruct );
void GeneralControle( wxDC* DC,
wxPoint MousePositionInPixels );
void LoadSettings();
void SaveSettings();
LIB_COMPONENT* GetComponent( void ) { return m_component; }
CMP_LIBRARY* GetLibrary( void ) { return m_library; }
wxString& GetAliasName( void ) { return m_aliasName; }
void Process_Special_Functions( wxCommandEvent& event );
void OnImportPart( wxCommandEvent& event );
void OnExportPart( wxCommandEvent& event );
void OnSelectAlias( wxCommandEvent& event );
void OnSelectPart( wxCommandEvent& event );
void DeleteOnePart( wxCommandEvent& event );
void CreateNewLibraryPart( wxCommandEvent& event );
void OnEditComponentProperties( wxCommandEvent& event );
void InstallFieldsEditorDialog( wxCommandEvent& event );
void LoadOneLibraryPart( wxCommandEvent& event );
void OnViewEntryDoc( wxCommandEvent& event );
void OnCheckComponent( wxCommandEvent& event );
void OnSelectBodyStyle( wxCommandEvent& event );
void OnUpdateEditingPart( wxUpdateUIEvent& event );
void OnUpdateNotEditingPart( wxUpdateUIEvent& event );
void OnUpdateUndo( wxUpdateUIEvent& event );
void OnUpdateRedo( wxUpdateUIEvent& event );
void OnUpdateSaveCurrentLib( wxUpdateUIEvent& event );
void OnUpdateViewDoc( wxUpdateUIEvent& event );
void OnUpdatePinByPin( wxUpdateUIEvent& event );
void OnUpdatePartNumber( wxUpdateUIEvent& event );
void OnUpdateDeMorganNormal( wxUpdateUIEvent& event );
void OnUpdateDeMorganConvert( wxUpdateUIEvent& event );
void OnUpdateSelectAlias( wxUpdateUIEvent& event );
void UpdateAliasSelectList();
void UpdatePartSelectList();
void DisplayLibInfos();
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
void OnCloseWindow( wxCloseEvent& Event );
void ReCreateHToolbar();
void ReCreateVToolbar();
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
int BestZoom(); // Retourne le meilleur zoom
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
SCH_SCREEN* GetScreen() { return (SCH_SCREEN*) GetBaseScreen(); }
void OnHotKey( wxDC* DC, int hotkey,
EDA_BaseStruct* DrawStruct );
void GeneralControle( wxDC* DC,
wxPoint MousePositionInPixels );
void LoadSettings();
void SaveSettings();
LIB_COMPONENT* GetComponent( void ) { return m_component; }
CMP_LIBRARY* GetLibrary( void ) { return m_library; }
wxString& GetAliasName( void ) { return m_aliasName; }
int GetUnit( void ) { return m_unit; }
......@@ -93,6 +93,7 @@ public:
m_unit = unit;
}
int GetConvert( void ) { return m_convert; }
void SetConvert( int convert )
......@@ -101,16 +102,18 @@ public:
m_convert = convert;
}
LIB_DRAW_ITEM* GetLastDrawItem( void ) { return m_lastDrawItem; }
LIB_DRAW_ITEM* GetLastDrawItem( void ) { return m_lastDrawItem; }
void SetLastDrawItem( LIB_DRAW_ITEM* drawItem )
{
m_lastDrawItem = drawItem;
}
LIB_DRAW_ITEM* GetDrawItem( void ) { return m_drawItem; }
void SetDrawItem( LIB_DRAW_ITEM* drawItem );
LIB_DRAW_ITEM* GetDrawItem( void ) { return m_drawItem; }
void SetDrawItem( LIB_DRAW_ITEM* drawItem );
bool GetShowDeMorgan( void ) { return m_showDeMorgan; }
......@@ -119,79 +122,84 @@ public:
private:
// General:
void SaveOnePartInMemory();
void SelectActiveLibrary();
void SaveActiveLibrary( wxCommandEvent& event );
void SaveOnePartInMemory();
void SelectActiveLibrary();
void SaveActiveLibrary( wxCommandEvent& event );
bool LoadOneLibraryPartAux( CMP_LIB_ENTRY* LibEntry,
CMP_LIBRARY* Library );
bool LoadOneLibraryPartAux( CMP_LIB_ENTRY* LibEntry,
CMP_LIBRARY* Library );
void DisplayCmpDoc();
void EditComponentProperties();
void DisplayCmpDoc();
void EditComponentProperties();
// General editing
public:
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
int flag_type_command = 0 );
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
int flag_type_command = 0 );
private:
void GetComponentFromUndoList(wxCommandEvent& event);
void GetComponentFromRedoList(wxCommandEvent& event);
void GetComponentFromUndoList( wxCommandEvent& event );
void GetComponentFromRedoList( wxCommandEvent& event );
// Edition des Pins:
void CreatePin( wxDC* DC );
void DeletePin( wxDC* DC,
LIB_COMPONENT* LibEntry,
LIB_PIN* Pin );
void StartMovePin( wxDC* DC );
void CreatePin( wxDC* DC );
void DeletePin( wxDC* DC,
LIB_COMPONENT* LibEntry,
LIB_PIN* Pin );
void StartMovePin( wxDC* DC );
// Edition de l'ancre
void PlaceAncre();
void PlaceAncre();
// Edition des graphismes:
LIB_DRAW_ITEM* CreateGraphicItem( LIB_COMPONENT* LibEntry, wxDC* DC );
void GraphicItemBeginDraw( wxDC* DC );
void StartMoveDrawSymbol( wxDC* DC );
void EndDrawGraphicItem( wxDC* DC );
void LoadOneSymbol();
void SaveOneSymbol();
void EditGraphicSymbol( wxDC* DC,
LIB_DRAW_ITEM* DrawItem );
void EditSymbolText( wxDC* DC, LIB_DRAW_ITEM* DrawItem );
void RotateSymbolText( wxDC* DC );
void DeleteDrawPoly( wxDC* DC );
LIB_DRAW_ITEM* LocateItemUsingCursor();
void RotateField( wxDC* DC, LIB_FIELD* Field );
void PlaceField( wxDC* DC, LIB_FIELD* Field );
void EditField( wxDC* DC, LIB_FIELD* Field );
void StartMoveField( wxDC* DC, LIB_FIELD* field );
LIB_DRAW_ITEM* CreateGraphicItem( LIB_COMPONENT* LibEntry, wxDC* DC );
void GraphicItemBeginDraw( wxDC* DC );
void StartMoveDrawSymbol( wxDC* DC );
void EndDrawGraphicItem( wxDC* DC );
void LoadOneSymbol();
void SaveOneSymbol();
void EditGraphicSymbol( wxDC* DC,
LIB_DRAW_ITEM* DrawItem );
void EditSymbolText( wxDC* DC, LIB_DRAW_ITEM* DrawItem );
void RotateSymbolText( wxDC* DC );
void DeleteDrawPoly( wxDC* DC );
LIB_DRAW_ITEM* LocateItemUsingCursor();
void RotateField( wxDC* DC, LIB_FIELD* Field );
void PlaceField( wxDC* DC, LIB_FIELD* Field );
void EditField( wxDC* DC, LIB_FIELD* Field );
void StartMoveField( wxDC* DC, LIB_FIELD* field );
public:
/* Block commands: */
int ReturnBlockCommand( int key );
void HandleBlockPlace( wxDC* DC );
int HandleBlockEnd( wxDC* DC );
int ReturnBlockCommand( int key );
void HandleBlockPlace( wxDC* DC );
int HandleBlockEnd( wxDC* DC );
void PlacePin( wxDC* DC );
void InitEditOnePin();
void GlobalSetPins( wxDC* DC, LIB_PIN* MasterPin, int id );
void PlacePin( wxDC* DC );
void InitEditOnePin();
void GlobalSetPins( wxDC* DC, LIB_PIN* MasterPin, int id );
// Repetition automatique de placement de pins
void RepeatPinItem( wxDC* DC, LIB_PIN* Pin );
void RepeatPinItem( wxDC* DC, LIB_PIN* Pin );
protected:
wxString m_ConfigPath;
wxString m_LastLibImportPath;
wxString m_LastLibExportPath;
wxString m_ConfigPath;
wxString m_LastLibImportPath;
wxString m_LastLibExportPath;
static LIB_COMPONENT* m_component;
static CMP_LIBRARY* m_library;
static LIB_COMPONENT* m_component; // The current edited component (NULL if no component)
static CMP_LIBRARY* m_library; // The current active libary (NULL if none)
static LIB_DRAW_ITEM* m_lastDrawItem;
static LIB_DRAW_ITEM* m_drawItem;
static wxString m_aliasName;
static int m_unit;
static int m_convert;
static bool m_showDeMorgan;
static int m_unit; // The unit number to edit and show
static int m_convert; // Show the normal shape ( m_convert <= 1 )
// or the converted shape ( m_convert > 1 )
static bool m_showDeMorgan; // true to force DeMorgan/normal tools selection enabled
// They are enabled when the loaded component has
// Graphic items for converted shape
// But under some circumstances (New component created)
// these tools must left enable
static wxSize m_clientSize;
DECLARE_EVENT_TABLE()
......
......@@ -154,6 +154,7 @@ WinEDA_LibeditFrame::WinEDA_LibeditFrame( wxWindow* father,
m_Draw_Axis = true; // true pour avoir les axes dessines
m_Draw_Grid = true; // true pour avoir la axes dessinee
m_ConfigPath = wxT( "LibraryEditor" );
SetShowDeMorgan( false );
// Give an icon
SetIcon( wxIcon( libedit_xpm ) );
......@@ -440,8 +441,7 @@ void WinEDA_LibeditFrame::OnUpdatePartNumber( wxUpdateUIEvent& event )
/* Using the typical event.Enable() call doesn't seem to work with wxGTK
* so use the pointer to alias combobox to directly enable or disable.
*/
m_SelpartBox->Enable( m_component != NULL
&& m_component->GetPartCount() > 1 );
m_SelpartBox->Enable( m_component && m_component->GetPartCount() > 1 );
}
......@@ -450,8 +450,8 @@ void WinEDA_LibeditFrame::OnUpdateDeMorganNormal( wxUpdateUIEvent& event )
if( m_HToolBar == NULL )
return;
event.Enable( m_component != NULL
&& m_component->HasConversion() );
event.Enable( GetShowDeMorgan() ||
(m_component && m_component->HasConversion()) );
m_HToolBar->ToggleTool( event.GetId(), m_convert <= 1 );
}
......@@ -461,8 +461,8 @@ void WinEDA_LibeditFrame::OnUpdateDeMorganConvert( wxUpdateUIEvent& event )
if( m_HToolBar == NULL )
return;
event.Enable( m_component != NULL
&& m_component->HasConversion() );
event.Enable( GetShowDeMorgan() ||
(m_component && m_component->HasConversion()) );
m_HToolBar->ToggleTool( event.GetId(), m_convert > 1 );
}
......
......@@ -796,7 +796,7 @@ static void FindAllsInstancesOfComponent( SCH_COMPONENT* Component_in,
for( pin = Entry->GetNextPin(); pin != NULL;
pin = Entry->GetNextPin( pin ) )
{
wxASSERT( pin->Type() != COMPONENT_PIN_DRAW_TYPE );
wxASSERT( pin->Type() == COMPONENT_PIN_DRAW_TYPE );
if( pin->m_Unit
&& ( pin->m_Unit != Component2->GetUnitSelection( sheet ) ) )
......
......@@ -12,6 +12,7 @@ set(GERBVIEW_SRCS
controle.cpp
dcode.cpp
deltrack.cpp
dummy_functions.cpp
edit.cpp
export_to_pcbnew.cpp
files.cpp
......
/* dummy_functions.cpp
*
* There are functions used in some classes.
* they are useful in pcbnew, but have no meaning or are never used
* in cvpcb or gerbview.
* but they must exist because they appear in some classes, and here, no nothing.
*/
#include "fctsys.h"
#include "common.h"
#include "pcbnew.h"
TRACK* Marque_Une_Piste( BOARD* aPcb,
TRACK* aStartSegm,
int* aSegmCount,
int* aTrackLen,
bool aReorder )
{
return NULL;
}
......@@ -59,7 +59,7 @@ public:
bool m_TrackAndViasSizesList_Changed;
private:
DRC* m_drc; ///< the DRC controller, see drc.cpp
// we'll use lower case function names for private member functions.
......@@ -457,9 +457,10 @@ public:
* Basic routine used by other routines when editing tracks or vias
* @param aTrackItem = the track segment or via to modify
* @param aItemsListPicker = the list picker to use for an undo command (can be NULL)
* @param aUseNetclassValue = true to use NetClass value, false to use g_DesignSettings value
* @return true if done, false if no not change (because DRC error)
*/
bool SetTrackSegmentWidth( TRACK* aTrackItem, PICKED_ITEMS_LIST* aItemsListPicker );
bool SetTrackSegmentWidth( TRACK* aTrackItem, PICKED_ITEMS_LIST* aItemsListPicker, bool aUseNetclassValue );
// zone handling
......
No preview for this file type
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-08 20:49+0100\n"
"PO-Revision-Date: 2009-10-08 20:57+0100\n"
"POT-Creation-Date: 2009-10-10 15:08+0100\n"
"PO-Revision-Date: 2009-10-10 15:10+0100\n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
......@@ -473,286 +473,6 @@ msgstr "Itération"
msgid "Ok to abort ?"
msgstr "Ok pour arrêter ?"
#: pcbnew/tool_pcb.cpp:29
msgid ""
"Show active layer selections\n"
"and select layer pair for route and place via"
msgstr ""
"Affiche sélections couche active\n"
"et sélection paire de couches pour routage et placement via"
#: pcbnew/tool_pcb.cpp:203
msgid "New board"
msgstr "Nouveau Circuit Imprimé"
#: pcbnew/tool_pcb.cpp:205
msgid "Open existing board"
msgstr "Ouvrir C.I. existant"
#: pcbnew/tool_pcb.cpp:207
msgid "Save board"
msgstr "Sauver Circuit Imprimé"
#: pcbnew/tool_pcb.cpp:211
msgid "Page settings (size, texts)"
msgstr "Ajustage de la feuille de dessin (dimensions, textes)"
#: pcbnew/tool_pcb.cpp:216
msgid "Open module editor"
msgstr "Ouvrir Editeur de modules"
#: pcbnew/tool_pcb.cpp:220
msgid "Cut selected item"
msgstr "Suppression des éléments sélectionnés"
#: pcbnew/tool_pcb.cpp:224
msgid "Copy selected item"
msgstr "Copie des éléments sélectionnés"
#: pcbnew/tool_pcb.cpp:227
msgid "Paste"
msgstr "Copie des éléments sauvegardés"
#: pcbnew/tool_pcb.cpp:232
msgid "Undo last edition"
msgstr "Défait dernière édition"
#: pcbnew/tool_pcb.cpp:234
msgid "Redo the last undo command"
msgstr "Refait la dernière commande defaite"
#: pcbnew/tool_pcb.cpp:238
msgid "Print board"
msgstr "Imprimer C.I."
#: pcbnew/tool_pcb.cpp:240
msgid "Plot (HPGL, PostScript, or GERBER format)"
msgstr "Tracer en format HPGL, POSTSCRIPT ou GERBER"
#: pcbnew/tool_pcb.cpp:243
msgid "Zoom in"
msgstr "Zoom +"
#: pcbnew/tool_pcb.cpp:248
msgid "Zoom out"
msgstr "Zoom -"
#: pcbnew/tool_pcb.cpp:253
msgid "Redraw view"
msgstr "Redessin de l'écran"
#: pcbnew/tool_pcb.cpp:258
msgid "Zoom auto"
msgstr "Zoom Automatique"
#: pcbnew/tool_pcb.cpp:264
msgid "Find components and texts"
msgstr "Recherche de composants et textes"
#: pcbnew/tool_pcb.cpp:272
msgid "Read netlist"
msgstr "Lire Netliste"
#: pcbnew/tool_pcb.cpp:274
msgid "Pcb Design Rules Check"
msgstr "Contrôle des règles de conception"
#: pcbnew/tool_pcb.cpp:286
msgid "Mode Module: Manual and Automatic Move or Place for modules"
msgstr "Mode Module: Déplacements ou Placement Manuel ou Automatique des modules"
#: pcbnew/tool_pcb.cpp:290
msgid "Mode Track and Autorouting"
msgstr "Mode Pistes et Autoroutage"
#: pcbnew/tool_pcb.cpp:296
msgid "Fast access to theWeb Based FreeROUTE advanced router"
msgstr "Acces rapide au routeur avancé FreeROUTE sur le Web"
#: pcbnew/tool_pcb.cpp:323
msgid "Drc OFF"
msgstr "Drc DESACTIVEE"
#: pcbnew/tool_pcb.cpp:326
msgid "Display Grid OFF"
msgstr "Suppression de l'affichage de la grille"
#: pcbnew/tool_pcb.cpp:329
msgid "Display Polar Coord ON"
msgstr "Activer affichage coord Polaires"
#: pcbnew/tool_pcb.cpp:332
msgid "Units in inches"
msgstr "Unités en pouces"
#: pcbnew/tool_pcb.cpp:335
msgid "Units in millimeters"
msgstr "Unités en millimètres"
#: pcbnew/tool_pcb.cpp:338
msgid "Change Cursor Shape"
msgstr "Sélection de la forme du curseur"
#: pcbnew/tool_pcb.cpp:343
msgid "Show General Ratsnest"
msgstr "Montrer le chevelu général"
#: pcbnew/tool_pcb.cpp:346
msgid "Show Module Ratsnest when moving"
msgstr "Montrer le chevelu du module pendant déplacement"
#: pcbnew/tool_pcb.cpp:352
msgid "Enable Auto Del Track"
msgstr "Autoriser l'effacement automatique des pistes"
#: pcbnew/tool_pcb.cpp:357
msgid "Show filled areas in zones"
msgstr "Afficher les surfaces remplies dans les zones"
#: pcbnew/tool_pcb.cpp:360
msgid "Do not show filled areas in zones"
msgstr "Ne pas afficher les surfaces remplies dans les zones"
#: pcbnew/tool_pcb.cpp:363
msgid "Show outlines of filled areas only in zones"
msgstr "Afficher uniquement les contours des surfaces remplies dans les zones"
#: pcbnew/tool_pcb.cpp:368
msgid "Show Pads Sketch"
msgstr "Afficher pastilles en contour"
#: pcbnew/tool_pcb.cpp:372
msgid "Show Vias Sketch"
msgstr "Afficher Pastilles en Contour"
#: pcbnew/tool_pcb.cpp:376
msgid "Show Tracks Sketch"
msgstr "Afficher Pistes en Contour"
#: pcbnew/tool_pcb.cpp:381
msgid "High Contrast Mode Display"
msgstr "Mode d'affichage Haut Contraste"
#: pcbnew/tool_pcb.cpp:388
msgid "Show Invisible Text"
msgstr "Montrer textes invisibles"
#: pcbnew/tool_pcb.cpp:399
msgid ""
"Display/remove auxiliary vertical toolbar (tools for micro wave applications)\n"
" This is a experimental feature (under development)"
msgstr ""
"Affiche/supprime le toolbar vertical auxiliaire (outils pour applications micro-ondes)\n"
"C'est un outil expérimental (en cours de développement)"
#: pcbnew/tool_pcb.cpp:429
msgid "Net highlight"
msgstr "Surbrillance des équipotentielles"
#: pcbnew/tool_pcb.cpp:434
msgid "Display local ratsnest (pad or module)"
msgstr "Afficher le chevelu local (pastilles ou modules)"
#: pcbnew/tool_pcb.cpp:440
msgid "Add modules"
msgstr "Addition de Modules"
#: pcbnew/tool_pcb.cpp:444
msgid "Add tracks and vias"
msgstr "Ajouter pistes et vias"
#: pcbnew/tool_pcb.cpp:448
msgid "Add zones"
msgstr "Addition de Zones"
#: pcbnew/tool_pcb.cpp:453
msgid "Add graphic line or polygon"
msgstr "Addition de lignes ou polygones graphiques"
#: pcbnew/tool_pcb.cpp:457
msgid "Add graphic circle"
msgstr "Addition de graphiques (Cercle)"
#: pcbnew/tool_pcb.cpp:461
msgid "Add graphic arc"
msgstr "Addition de graphiques (Arc de Cercle)"
#: pcbnew/tool_pcb.cpp:465
msgid "Add text"
msgstr "Ajout de Texte"
#: pcbnew/tool_pcb.cpp:470
msgid "Add dimension"
msgstr "Ajout des cotes"
#: pcbnew/tool_pcb.cpp:474
msgid "Add layer alignment target"
msgstr "Ajouter Mire de superposition"
#: pcbnew/tool_pcb.cpp:479
msgid "Delete items"
msgstr "Suppression d'éléments"
#: pcbnew/tool_pcb.cpp:484
msgid "Offset adjust for drill and place files"
msgstr "Ajuste offset pour fichier de perçage et placement"
#: pcbnew/tool_pcb.cpp:510
msgid "Create line of specified length for microwave applications"
msgstr "Création de lignes de longueur spécifiée (pour applications micro-ondes)"
#: pcbnew/tool_pcb.cpp:514
msgid "Create gap of specified length for microwave applications"
msgstr "Création de gaps de longueur spécifiée (pour applications micro-ondes)"
#: pcbnew/tool_pcb.cpp:520
msgid "Create stub of specified length for microwave applications"
msgstr "Création de stub de longueur spécifiée (pour applications micro-ondes)"
#: pcbnew/tool_pcb.cpp:524
msgid "Create stub (arc) of specified length for microwave applications"
msgstr "Création de stub (arc) de longueur spécifiée (pour applications micro-ondes)"
#: pcbnew/tool_pcb.cpp:529
msgid "Create a polynomial shape for microwave applications"
msgstr "Création de formes polynomiales (pour applications micro-ondes)"
#: pcbnew/tool_pcb.cpp:585
msgid "Current NetClass clearance value"
msgstr "Valeur isolation NetClass courante"
#: pcbnew/tool_pcb.cpp:595
msgid "Name of the current NetClass"
msgstr "Nom de la NetClass courante"
#: pcbnew/tool_pcb.cpp:601
msgid ""
"Auto track width: when starting on an existing track use its width\n"
"otherwise, use current width setting"
msgstr ""
"Largeur de piste automatique: si on démarre sur une piste existante, utiliser sa largeur\n"
" sinon utiliser la largeur courante"
#: pcbnew/tool_pcb.cpp:618
msgid "Auto"
msgstr "Auto"
#: pcbnew/tool_pcb.cpp:622
msgid "Zoom "
msgstr "Zoom "
#: pcbnew/tool_pcb.cpp:642
msgid "Grid"
msgstr "Grille"
#: pcbnew/tool_pcb.cpp:660
msgid "User Grid"
msgstr "Grille perso"
#: pcbnew/tool_pcb.cpp:769
msgid "+/- to switch"
msgstr "+/- pour commuter"
#: pcbnew/solve.cpp:240
msgid "Abort routing?"
msgstr "Arrêter le routage?"
......@@ -1474,93 +1194,345 @@ msgstr "Forme Mire:"
msgid "Board modified, Save before exit ?"
msgstr "Circuit Imprimé modifié, Sauver avant de quitter ?"
#: pcbnew/pcbframe.cpp:308
msgid "Confirmation"
msgstr "Confirmation"
#: pcbnew/pcbframe.cpp:308
msgid "Confirmation"
msgstr "Confirmation"
#: pcbnew/pcbframe.cpp:356
msgid "3D Frame already opened"
msgstr "Fenêtre 3D déjà ouverte"
#: pcbnew/pcbframe.cpp:360
msgid "3D Viewer"
msgstr "Visu 3D"
#: pcbnew/dialog_initpcb.cpp:103
msgid "Items to delete"
msgstr "Eléments à effacer"
#: pcbnew/dialog_initpcb.cpp:107
msgid "Delete Zones"
msgstr "Effacer Zones"
#: pcbnew/dialog_initpcb.cpp:111
msgid "Delete Texts"
msgstr "Effacer Textes"
#: pcbnew/dialog_initpcb.cpp:115
msgid "Delete Edges"
msgstr "Effacements des contours"
#: pcbnew/dialog_initpcb.cpp:119
msgid "Delete Drawings"
msgstr "Effacement éléments de tracé"
#: pcbnew/dialog_initpcb.cpp:123
msgid "Delete Modules"
msgstr "Effacement des Modules"
#: pcbnew/dialog_initpcb.cpp:127
msgid "Delete Tracks"
msgstr "Effacer Pistes"
#: pcbnew/dialog_initpcb.cpp:131
msgid "Delete Markers"
msgstr "Effacer Marqueurs"
#: pcbnew/dialog_initpcb.cpp:135
msgid "Clear Board"
msgstr "Effacement du C.I."
#: pcbnew/dialog_initpcb.cpp:142
msgid "Track Filter"
msgstr "Filtre Piste"
#: pcbnew/dialog_initpcb.cpp:146
msgid "Include AutoRouted Tracks"
msgstr "Inclure Pistes Autoroutées"
#: pcbnew/dialog_initpcb.cpp:150
msgid "Include Locked Tracks"
msgstr "Inclure Pistes Verrouillées"
#: pcbnew/tool_pcb.cpp:29
msgid ""
"Show active layer selections\n"
"and select layer pair for route and place via"
msgstr ""
"Affiche sélections couche active\n"
"et sélection paire de couches pour routage et placement via"
#: pcbnew/tool_pcb.cpp:203
msgid "New board"
msgstr "Nouveau Circuit Imprimé"
#: pcbnew/tool_pcb.cpp:205
msgid "Open existing board"
msgstr "Ouvrir C.I. existant"
#: pcbnew/tool_pcb.cpp:207
msgid "Save board"
msgstr "Sauver Circuit Imprimé"
#: pcbnew/tool_pcb.cpp:211
msgid "Page settings (size, texts)"
msgstr "Ajustage de la feuille de dessin (dimensions, textes)"
#: pcbnew/tool_pcb.cpp:216
msgid "Open module editor"
msgstr "Ouvrir Editeur de modules"
#: pcbnew/tool_pcb.cpp:220
msgid "Cut selected item"
msgstr "Suppression des éléments sélectionnés"
#: pcbnew/tool_pcb.cpp:224
msgid "Copy selected item"
msgstr "Copie des éléments sélectionnés"
#: pcbnew/tool_pcb.cpp:227
msgid "Paste"
msgstr "Copie des éléments sauvegardés"
#: pcbnew/tool_pcb.cpp:232
msgid "Undo last edition"
msgstr "Défait dernière édition"
#: pcbnew/tool_pcb.cpp:234
msgid "Redo the last undo command"
msgstr "Refait la dernière commande defaite"
#: pcbnew/tool_pcb.cpp:238
msgid "Print board"
msgstr "Imprimer C.I."
#: pcbnew/tool_pcb.cpp:240
msgid "Plot (HPGL, PostScript, or GERBER format)"
msgstr "Tracer en format HPGL, POSTSCRIPT ou GERBER"
#: pcbnew/tool_pcb.cpp:243
msgid "Zoom in"
msgstr "Zoom +"
#: pcbnew/tool_pcb.cpp:248
msgid "Zoom out"
msgstr "Zoom -"
#: pcbnew/tool_pcb.cpp:253
msgid "Redraw view"
msgstr "Redessin de l'écran"
#: pcbnew/tool_pcb.cpp:258
msgid "Zoom auto"
msgstr "Zoom Automatique"
#: pcbnew/tool_pcb.cpp:264
msgid "Find components and texts"
msgstr "Recherche de composants et textes"
#: pcbnew/tool_pcb.cpp:272
msgid "Read netlist"
msgstr "Lire Netliste"
#: pcbnew/tool_pcb.cpp:274
msgid "Pcb Design Rules Check"
msgstr "Contrôle des règles de conception"
#: pcbnew/tool_pcb.cpp:286
msgid "Mode Module: Manual and Automatic Move or Place for modules"
msgstr "Mode Module: Déplacements ou Placement Manuel ou Automatique des modules"
#: pcbnew/tool_pcb.cpp:290
msgid "Mode Track and Autorouting"
msgstr "Mode Pistes et Autoroutage"
#: pcbnew/tool_pcb.cpp:296
msgid "Fast access to theWeb Based FreeROUTE advanced router"
msgstr "Acces rapide au routeur avancé FreeROUTE sur le Web"
#: pcbnew/tool_pcb.cpp:323
msgid "Drc OFF"
msgstr "Drc DESACTIVEE"
#: pcbnew/tool_pcb.cpp:326
msgid "Display Grid OFF"
msgstr "Suppression de l'affichage de la grille"
#: pcbnew/tool_pcb.cpp:329
msgid "Display Polar Coord ON"
msgstr "Activer affichage coord Polaires"
#: pcbnew/tool_pcb.cpp:332
msgid "Units in inches"
msgstr "Unités en pouces"
#: pcbnew/tool_pcb.cpp:335
msgid "Units in millimeters"
msgstr "Unités en millimètres"
#: pcbnew/tool_pcb.cpp:338
msgid "Change Cursor Shape"
msgstr "Sélection de la forme du curseur"
#: pcbnew/tool_pcb.cpp:343
msgid "Show General Ratsnest"
msgstr "Montrer le chevelu général"
#: pcbnew/tool_pcb.cpp:346
msgid "Show Module Ratsnest when moving"
msgstr "Montrer le chevelu du module pendant déplacement"
#: pcbnew/tool_pcb.cpp:352
msgid "Enable Auto Del Track"
msgstr "Autoriser l'effacement automatique des pistes"
#: pcbnew/tool_pcb.cpp:357
msgid "Show filled areas in zones"
msgstr "Afficher les surfaces remplies dans les zones"
#: pcbnew/tool_pcb.cpp:360
msgid "Do not show filled areas in zones"
msgstr "Ne pas afficher les surfaces remplies dans les zones"
#: pcbnew/tool_pcb.cpp:363
msgid "Show outlines of filled areas only in zones"
msgstr "Afficher uniquement les contours des surfaces remplies dans les zones"
#: pcbnew/tool_pcb.cpp:368
msgid "Show Pads Sketch"
msgstr "Afficher pastilles en contour"
#: pcbnew/tool_pcb.cpp:372
msgid "Show Vias Sketch"
msgstr "Afficher Pastilles en Contour"
#: pcbnew/tool_pcb.cpp:376
msgid "Show Tracks Sketch"
msgstr "Afficher Pistes en Contour"
#: pcbnew/tool_pcb.cpp:381
msgid "High Contrast Mode Display"
msgstr "Mode d'affichage Haut Contraste"
#: pcbnew/tool_pcb.cpp:388
msgid "Show Invisible Text"
msgstr "Montrer textes invisibles"
#: pcbnew/tool_pcb.cpp:399
msgid ""
"Display/remove auxiliary vertical toolbar (tools for micro wave applications)\n"
" This is a experimental feature (under development)"
msgstr ""
"Affiche/supprime le toolbar vertical auxiliaire (outils pour applications micro-ondes)\n"
"C'est un outil expérimental (en cours de développement)"
#: pcbnew/tool_pcb.cpp:429
msgid "Net highlight"
msgstr "Surbrillance des équipotentielles"
#: pcbnew/tool_pcb.cpp:434
msgid "Display local ratsnest (pad or module)"
msgstr "Afficher le chevelu local (pastilles ou modules)"
#: pcbnew/tool_pcb.cpp:440
msgid "Add modules"
msgstr "Addition de Modules"
#: pcbnew/tool_pcb.cpp:444
msgid "Add tracks and vias"
msgstr "Ajouter pistes et vias"
#: pcbnew/tool_pcb.cpp:448
msgid "Add zones"
msgstr "Addition de Zones"
#: pcbnew/pcbframe.cpp:356
msgid "3D Frame already opened"
msgstr "Fenêtre 3D déjà ouverte"
#: pcbnew/tool_pcb.cpp:453
msgid "Add graphic line or polygon"
msgstr "Addition de lignes ou polygones graphiques"
#: pcbnew/pcbframe.cpp:360
msgid "3D Viewer"
msgstr "Visu 3D"
#: pcbnew/tool_pcb.cpp:457
msgid "Add graphic circle"
msgstr "Addition de graphiques (Cercle)"
#: pcbnew/dialog_initpcb.cpp:103
msgid "Items to delete"
msgstr "Eléments à effacer"
#: pcbnew/tool_pcb.cpp:461
msgid "Add graphic arc"
msgstr "Addition de graphiques (Arc de Cercle)"
#: pcbnew/dialog_initpcb.cpp:107
msgid "Delete Zones"
msgstr "Effacer Zones"
#: pcbnew/tool_pcb.cpp:465
msgid "Add text"
msgstr "Ajout de Texte"
#: pcbnew/dialog_initpcb.cpp:111
msgid "Delete Texts"
msgstr "Effacer Textes"
#: pcbnew/tool_pcb.cpp:470
msgid "Add dimension"
msgstr "Ajout des cotes"
#: pcbnew/dialog_initpcb.cpp:115
msgid "Delete Edges"
msgstr "Effacements des contours"
#: pcbnew/tool_pcb.cpp:474
msgid "Add layer alignment target"
msgstr "Ajouter Mire de superposition"
#: pcbnew/dialog_initpcb.cpp:119
msgid "Delete Drawings"
msgstr "Effacement éléments de tracé"
#: pcbnew/tool_pcb.cpp:479
msgid "Delete items"
msgstr "Suppression d'éléments"
#: pcbnew/dialog_initpcb.cpp:123
msgid "Delete Modules"
msgstr "Effacement des Modules"
#: pcbnew/tool_pcb.cpp:484
msgid "Offset adjust for drill and place files"
msgstr "Ajuste offset pour fichier de perçage et placement"
#: pcbnew/dialog_initpcb.cpp:127
msgid "Delete Tracks"
msgstr "Effacer Pistes"
#: pcbnew/tool_pcb.cpp:510
msgid "Create line of specified length for microwave applications"
msgstr "Création de lignes de longueur spécifiée (pour applications micro-ondes)"
#: pcbnew/dialog_initpcb.cpp:131
msgid "Delete Markers"
msgstr "Effacer Marqueurs"
#: pcbnew/tool_pcb.cpp:514
msgid "Create gap of specified length for microwave applications"
msgstr "Création de gaps de longueur spécifiée (pour applications micro-ondes)"
#: pcbnew/dialog_initpcb.cpp:135
msgid "Clear Board"
msgstr "Effacement du C.I."
#: pcbnew/tool_pcb.cpp:520
msgid "Create stub of specified length for microwave applications"
msgstr "Création de stub de longueur spécifiée (pour applications micro-ondes)"
#: pcbnew/dialog_initpcb.cpp:142
msgid "Track Filter"
msgstr "Filtre Piste"
#: pcbnew/tool_pcb.cpp:524
msgid "Create stub (arc) of specified length for microwave applications"
msgstr "Création de stub (arc) de longueur spécifiée (pour applications micro-ondes)"
#: pcbnew/dialog_initpcb.cpp:146
msgid "Include AutoRouted Tracks"
msgstr "Inclure Pistes Autoroutées"
#: pcbnew/tool_pcb.cpp:529
msgid "Create a polynomial shape for microwave applications"
msgstr "Création de formes polynomiales (pour applications micro-ondes)"
#: pcbnew/dialog_initpcb.cpp:150
msgid "Include Locked Tracks"
msgstr "Inclure Pistes Verrouillées"
#: pcbnew/tool_pcb.cpp:585
msgid "Current NetClass clearance value"
msgstr "Valeur isolation NetClass courante"
#: pcbnew/class_drawsegment.cpp:372
msgid "Shape"
msgstr "Forme"
#: pcbnew/tool_pcb.cpp:595
msgid "Name of the current NetClass"
msgstr "Nom de la NetClass courante"
#: pcbnew/class_drawsegment.cpp:376
msgid "Circle"
msgstr "Cercle"
#: pcbnew/tool_pcb.cpp:601
msgid ""
"Auto track width: when starting on an existing track use its width\n"
"otherwise, use current width setting"
msgstr ""
"Largeur de piste automatique: si on démarre sur une piste existante, utiliser sa largeur\n"
" sinon utiliser la largeur courante"
#: pcbnew/class_drawsegment.cpp:380
msgid "Arc"
msgstr "Arc"
#: pcbnew/tool_pcb.cpp:618
msgid "Auto"
msgstr "Auto"
#: pcbnew/class_drawsegment.cpp:383
msgid "Angle"
msgstr "Angle"
#: pcbnew/tool_pcb.cpp:622
msgid "Zoom "
msgstr "Zoom "
#: pcbnew/class_drawsegment.cpp:386
msgid "Curve"
msgstr "Courbe"
#: pcbnew/tool_pcb.cpp:642
msgid "Grid"
msgstr "Grille"
#: pcbnew/class_drawsegment.cpp:390
msgid "Segment"
msgstr "Segment"
#: pcbnew/tool_pcb.cpp:660
msgid "User Grid"
msgstr "Grille perso"
#: pcbnew/class_drawsegment.cpp:400
msgid "Layer"
msgstr "Couche"
#: pcbnew/tool_pcb.cpp:769
msgid "+/- to switch"
msgstr "+/- pour commuter"
#: pcbnew/find.cpp:117
msgid "Marker found"
......@@ -1612,6 +1584,27 @@ msgstr "Effacer Couche"
msgid "Incorrect value for Via drill. No via drill change"
msgstr "Valeur incorrecte pour perçage. Pas de changement pour la via"
#: pcbnew/set_color.cpp:276
#: pcbnew/set_color.cpp:302
msgid "Show None"
msgstr "Rien Afficher"
#: pcbnew/set_color.cpp:285
msgid "Show All"
msgstr "Tout Afficher"
#: pcbnew/set_color.cpp:297
msgid "Switch on all of the copper layers"
msgstr "Affiche toutes les couches cuivre"
#: pcbnew/set_color.cpp:305
msgid "Switch off all of the copper layers"
msgstr "N'affiche pas les couches cuivre"
#: pcbnew/set_color.cpp:364
msgid "Apply"
msgstr "Appliquer"
#: pcbnew/files.cpp:22
msgid "Printed circuit board"
msgstr "Circuit imprimé"
......@@ -1673,6 +1666,44 @@ msgstr "Ecriture fichier CI: "
msgid "Failed to create "
msgstr "Impossible de créer fichier "
#: pcbnew/class_pcb_text.cpp:237
msgid "COTATION"
msgstr "COTATION"
#: pcbnew/class_pcb_text.cpp:239
msgid "PCB Text"
msgstr "Texte PCB"
#: pcbnew/class_pcb_text.cpp:241
#: pcbnew/class_text_mod.cpp:497
msgid "Layer"
msgstr "Couche"
#: pcbnew/class_pcb_text.cpp:247
#: pcbnew/class_text_mod.cpp:485
msgid "No"
msgstr "Non"
#: pcbnew/class_pcb_text.cpp:249
#: pcbnew/class_text_mod.cpp:487
msgid "Yes"
msgstr "Oui"
#: pcbnew/class_pcb_text.cpp:252
#: pcbnew/class_text_mod.cpp:506
msgid "Orient"
msgstr "Orient"
#: pcbnew/class_pcb_text.cpp:258
#: pcbnew/class_text_mod.cpp:512
msgid "H Size"
msgstr "Taille H"
#: pcbnew/class_pcb_text.cpp:261
#: pcbnew/class_text_mod.cpp:515
msgid "V Size"
msgstr "Taille V"
#: pcbnew/cross-probing.cpp:60
#, c-format
msgid "%s found"
......@@ -1714,27 +1745,6 @@ msgstr "Pas de mémoire pour autoroutage"
msgid "Place Cells"
msgstr "Place Cells"
#: pcbnew/set_color.cpp:261
#: pcbnew/set_color.cpp:287
msgid "Show None"
msgstr "Rien Afficher"
#: pcbnew/set_color.cpp:270
msgid "Show All"
msgstr "Tout Afficher"
#: pcbnew/set_color.cpp:282
msgid "Switch on all of the copper layers"
msgstr "Affiche toutes les couches cuivre"
#: pcbnew/set_color.cpp:290
msgid "Switch off all of the copper layers"
msgstr "N'affiche pas les couches cuivre"
#: pcbnew/set_color.cpp:349
msgid "Apply"
msgstr "Appliquer"
#: pcbnew/zones_by_polygon.cpp:309
#: pcbnew/zones_by_polygon.cpp:372
#: pcbnew/zones_by_polygon.cpp:710
......@@ -1808,30 +1818,6 @@ msgstr "Erreur. Vous devez choisir une équipotentielle"
msgid "You have chosen the \"not connected\" option. This will create insulated copper islands. Are you sure ?"
msgstr "Vous avez choisi l'option \"non connecté\". Cela créera des blocs non connectés. Etes vous sûr ?"
#: pcbnew/class_edge_mod.cpp:235
msgid "Seg"
msgstr "Seg"
#: pcbnew/class_edge_mod.cpp:237
msgid "Module"
msgstr "Module"
#: pcbnew/class_edge_mod.cpp:238
msgid "Value"
msgstr "Valeur"
#: pcbnew/class_edge_mod.cpp:241
msgid "TimeStamp"
msgstr "TimeStamp"
#: pcbnew/class_edge_mod.cpp:243
msgid "Mod Layer"
msgstr "Couche Mod."
#: pcbnew/class_edge_mod.cpp:245
msgid "Seg Layer"
msgstr "Couche Seg."
#: pcbnew/swap_layers.cpp:72
msgid "Swap Layers:"
msgstr "Permutte couches"
......@@ -1846,9 +1832,30 @@ msgstr "Garder"
msgid "Deselect this layer to select the No Change state"
msgstr "Désélectionner cette couche pour restorer l'option Pas de Changement"
#: pcbnew/ioascii.cpp:175
msgid "Error: Unexpected end of file !"
msgstr "Erreur: Fin de fichier inattendue !"
#: pcbnew/class_text_mod.cpp:467
msgid "Ref."
msgstr "Ref."
#: pcbnew/class_text_mod.cpp:467
msgid "Value"
msgstr "Valeur"
#: pcbnew/class_text_mod.cpp:467
#: pcbnew/class_text_mod.cpp:476
msgid "Text"
msgstr "Texte"
#: pcbnew/class_text_mod.cpp:473
msgid "Module"
msgstr "Module"
#: pcbnew/class_text_mod.cpp:499
msgid " No"
msgstr "Non"
#: pcbnew/class_text_mod.cpp:501
msgid " Yes"
msgstr "Oui"
#: pcbnew/xchgmod.cpp:174
#, c-format
......@@ -2062,41 +2069,21 @@ msgstr "Le circuit actuel sera perdu et cette opération ne pourra pas être ann
msgid "Current Footprint will be lost and this operation cannot be undone. Continue ?"
msgstr "Le module actuel sera perdu et cette opération ne pourra pas être annulée. Continuer ?"
#: pcbnew/class_module.cpp:824
msgid "Last Change"
msgstr "Last Change"
#: pcbnew/class_module.cpp:830
msgid "Netlist path"
msgstr "Chemin Netliste "
#: pcbnew/class_module.cpp:847
msgid "Pads"
msgstr "Pads"
#: pcbnew/class_module.cpp:855
msgid "Stat"
msgstr "Stat"
#: pcbnew/class_module.cpp:859
msgid "Orient"
msgstr "Orient"
#: pcbnew/class_module.cpp:868
msgid "No 3D shape"
msgstr "Pas de forme 3D"
#: pcbnew/class_edge_mod.cpp:236
msgid "Seg"
msgstr "Seg"
#: pcbnew/class_module.cpp:869
msgid "3D-Shape"
msgstr "Forme 3D"
#: pcbnew/class_edge_mod.cpp:242
msgid "TimeStamp"
msgstr "TimeStamp"
#: pcbnew/class_module.cpp:872
msgid "Doc: "
msgstr "Doc: "
#: pcbnew/class_edge_mod.cpp:244
msgid "Mod Layer"
msgstr "Couche Mod."
#: pcbnew/class_module.cpp:873
msgid "KeyW: "
msgstr "KeyW: "
#: pcbnew/class_edge_mod.cpp:246
msgid "Seg Layer"
msgstr "Couche Seg."
#: pcbnew/edgemod.cpp:191
msgid "The graphic item will be on a copper layer.It is very dangerous. Are you sure"
......@@ -2150,54 +2137,6 @@ msgstr "Erreur système sur écriture fichier \"%s\""
msgid "Error writing to STRINGFORMATTER"
msgstr "Erreur d'écriture à STRINGFORMATTER"
#: pcbnew/class_zone.cpp:915
msgid "Zone Outline"
msgstr "Contour de Zone"
#: pcbnew/class_zone.cpp:919
msgid "(Cutout)"
msgstr "(Cutout)"
#: pcbnew/class_zone.cpp:941
msgid "Not Found"
msgstr " Non Trouvé"
#: pcbnew/class_zone.cpp:944
msgid "NetName"
msgstr "NetName"
#: pcbnew/class_zone.cpp:947
msgid "Non Copper Zone"
msgstr "Zone non Cuivre"
#: pcbnew/class_zone.cpp:952
msgid "NetCode"
msgstr "NetCode"
#: pcbnew/class_zone.cpp:960
msgid "Corners"
msgstr "Sommets"
#: pcbnew/class_zone.cpp:964
msgid "Segments"
msgstr "Segments"
#: pcbnew/class_zone.cpp:966
msgid "Polygons"
msgstr "Polygones"
#: pcbnew/class_zone.cpp:967
msgid "Fill mode"
msgstr "Mode de remplissage"
#: pcbnew/class_zone.cpp:972
msgid "Hatch lines"
msgstr "Lignes de Hachure"
#: pcbnew/class_zone.cpp:978
msgid "Corners in DrawList"
msgstr "Sommets en Liste de dessin"
#: pcbnew/sel_layer.cpp:93
msgid "Select Layer:"
msgstr "Sélection couche:"
......@@ -2367,12 +2306,12 @@ msgid "Vias Options:"
msgstr "Options Vias:"
#: pcbnew/dialog_track_options_base.cpp:76
msgid "Through Via"
msgstr "Via Traversante"
msgid "Through via"
msgstr "Via traversante"
#: pcbnew/dialog_track_options_base.cpp:76
msgid "Blind or Buried Via"
msgstr "Via enterrée ou Aveugle"
msgid "Blind or buried via"
msgstr "Via enterrée ou aveugle"
#: pcbnew/dialog_track_options_base.cpp:78
msgid "Default Via Type"
......@@ -2387,12 +2326,12 @@ msgstr ""
"Via traversante est la sélection usuelle."
#: pcbnew/dialog_track_options_base.cpp:87
msgid "Do Not Allow Micro Vias"
msgstr "Ne pas Autoriser les Micro Vias"
msgid "Do not allow micro vias"
msgstr "Ne pas autoriser les micro vias"
#: pcbnew/dialog_track_options_base.cpp:87
msgid "Allow Micro Vias"
msgstr "Autoriser les Micro Vias"
msgid "Allow micro vias"
msgstr "Autoriser les micro vias"
#: pcbnew/dialog_track_options_base.cpp:91
msgid ""
......@@ -2801,6 +2740,10 @@ msgstr "Ajuster largeur des pistes et diamètre de vias"
msgid "Texts and Drawings"
msgstr "Textes et Tracés"
#: pcbnew/menubarpcb.cpp:243
msgid "Pads"
msgstr "Pads"
#: pcbnew/menubarpcb.cpp:244
msgid "Adjust size,shape,layers... for pads"
msgstr "Ajuster taille, forme, couches... pour pads"
......@@ -2997,7 +2940,6 @@ msgid "Delete Pad (module %s %s) "
msgstr "Effacer Pad (module %s %s) "
#: pcbnew/modules.cpp:82
#: pcbnew/librairi.cpp:523
msgid "Name:"
msgstr "Nom:"
......@@ -3178,45 +3120,72 @@ msgstr "Librairie existante "
msgid "Create error "
msgstr "Erreur en création "
#: pcbnew/class_text_mod.cpp:459
msgid "Ref."
msgstr "Ref."
#: pcbnew/class_zone.cpp:915
#: pcbnew/class_board_item.cpp:135
msgid "Zone Outline"
msgstr "Contour de Zone"
#: pcbnew/class_text_mod.cpp:459
#: pcbnew/class_text_mod.cpp:468
#: pcbnew/class_board_item.cpp:105
msgid "Text"
msgstr "Texte"
#: pcbnew/class_zone.cpp:919
#: pcbnew/class_board_item.cpp:140
msgid "(Cutout)"
msgstr "(Cutout)"
#: pcbnew/class_text_mod.cpp:477
msgid "No"
msgstr "Non"
#: pcbnew/class_zone.cpp:941
#: pcbnew/class_board_item.cpp:163
msgid "Not Found"
msgstr " Non Trouvé"
#: pcbnew/class_text_mod.cpp:479
msgid "Yes"
msgstr "Oui"
#: pcbnew/class_zone.cpp:944
msgid "NetName"
msgstr "NetName"
#: pcbnew/class_text_mod.cpp:491
msgid " No"
msgstr "Non"
#: pcbnew/class_zone.cpp:947
msgid "Non Copper Zone"
msgstr "Zone non Cuivre"
#: pcbnew/class_text_mod.cpp:493
msgid " Yes"
msgstr "Oui"
#: pcbnew/class_zone.cpp:952
msgid "NetCode"
msgstr "NetCode"
#: pcbnew/class_text_mod.cpp:504
msgid "H Size"
msgstr "Taille H"
#: pcbnew/class_zone.cpp:960
msgid "Corners"
msgstr "Sommets"
#: pcbnew/class_text_mod.cpp:507
msgid "V Size"
msgstr "Taille V"
#: pcbnew/class_zone.cpp:964
msgid "Segments"
msgstr "Segments"
#: pcbnew/class_zone.cpp:966
msgid "Polygons"
msgstr "Polygones"
#: pcbnew/class_zone.cpp:967
msgid "Fill mode"
msgstr "Mode de remplissage"
#: pcbnew/class_zone.cpp:972
msgid "Hatch lines"
msgstr "Lignes de Hachure"
#: pcbnew/class_zone.cpp:978
msgid "Corners in DrawList"
msgstr "Sommets en Liste de dessin"
#: pcbnew/class_board_item.cpp:24
#: pcbnew/dialog_pad_properties_base.cpp:44
msgid "Rect"
msgstr "Rect"
#: pcbnew/class_board_item.cpp:25
msgid "Arc"
msgstr "Arc"
#: pcbnew/class_board_item.cpp:26
#: pcbnew/dialog_pad_properties_base.cpp:44
#: pcbnew/dialog_pad_properties_base.cpp:53
msgid "Circle"
msgstr "Cercle"
#: pcbnew/class_board_item.cpp:27
msgid "Bezier Curve"
msgstr "Courbe de Bezier"
......@@ -3320,21 +3289,22 @@ msgstr "Mire"
msgid "size"
msgstr "dimension"
#: pcbnew/edit_track_width.cpp:153
msgid "Change track width (entire NET) ?"
msgstr "Change largeur piste ( NET complet) ?"
#: pcbnew/edit_track_width.cpp:180
#, c-format
msgid "Set tracks and vias sizes to the Netclass \"%s\"default value (entire NET \"%s\") ?"
msgstr ""
#: pcbnew/edit_track_width.cpp:203
msgid "Edit All Tracks and Vias Sizes"
msgstr "Editer TOUTES Pistes et Vias"
#: pcbnew/edit_track_width.cpp:232
msgid "Set All Tracks and Vias to Netclass value"
msgstr "Ajuster TOUTES Pistes et Vias à la valeur en Netclass"
#: pcbnew/edit_track_width.cpp:208
msgid "Edit All Via Sizes"
msgstr "Editer TOUTES Vias"
#: pcbnew/edit_track_width.cpp:237
msgid "Set All Via to Netclass value"
msgstr "Ajuster Toutes les Vias à la Valeur en NetClass"
#: pcbnew/edit_track_width.cpp:213
msgid "Edit All Track Sizes"
msgstr "Editer TOUTES Pistes"
#: pcbnew/edit_track_width.cpp:242
msgid "Set All Track to Netclass value"
msgstr "Ajuster Toutes les Pistes à la Valeur en NetClass"
#: pcbnew/dialog_non_copper_zones_properties_base.cpp:28
#: pcbnew/dialog_copper_zones_base.cpp:38
......@@ -3692,6 +3662,7 @@ msgid "Pad Type:"
msgstr "Type Pad:"
#: pcbnew/dialog_pad_properties_base.cpp:102
#: pcbnew/dialog_SVG_print_base.cpp:23
msgid "Layers:"
msgstr "Couches:"
......@@ -4012,29 +3983,38 @@ msgstr "Le fichier Session a une 'reference' à un composant non existant \"%s\"
msgid "A wire_via references a missing padstack \"%s\""
msgstr "Une piste ou via a une référence vers un pad \"%s\" manquant"
#: pcbnew/class_track.cpp:988
msgid "Flags"
msgstr "Flags"
#: pcbnew/pcbcfg.cpp:82
msgid "Read Project File"
msgstr "Lire Fichier Projet"
#: pcbnew/class_track.cpp:1026
msgid "Diam"
msgstr "Diam"
#: pcbnew/pcbcfg.cpp:92
#, c-format
msgid "File %s not found"
msgstr "Fichier %s non trouvé"
#: pcbnew/class_track.cpp:1034
msgid "Drill"
msgstr "Perçage"
#: pcbnew/pcbcfg.cpp:227
msgid "Save Project File"
msgstr "Sauver Fichier Projet"
#: pcbnew/class_track.cpp:1038
msgid "(Specific)"
msgstr "(Specifique)"
#: pcbnew/ioascii.cpp:175
msgid "Error: Unexpected end of file !"
msgstr "Erreur: Fin de fichier inattendue !"
#: pcbnew/class_track.cpp:1040
msgid "(Default)"
msgstr "(Défaut)"
#: pcbnew/class_drawsegment.cpp:373
msgid "Shape"
msgstr "Forme"
#: pcbnew/class_track.cpp:1052
msgid "Net Class"
msgstr "Classe d'Equipot"
#: pcbnew/class_drawsegment.cpp:384
msgid "Angle"
msgstr "Angle"
#: pcbnew/class_drawsegment.cpp:387
msgid "Curve"
msgstr "Courbe"
#: pcbnew/class_drawsegment.cpp:391
msgid "Segment"
msgstr "Segment"
#: pcbnew/gen_modules_placefile.cpp:134
msgid "No Modules for Automated Placement"
......@@ -4052,19 +4032,6 @@ msgstr "Fichier placement côté cuivre:"
msgid "Module count"
msgstr "Nb Modules"
#: pcbnew/pcbcfg.cpp:82
msgid "Read Project File"
msgstr "Lire Fichier Projet"
#: pcbnew/pcbcfg.cpp:92
#, c-format
msgid "File %s not found"
msgstr "Fichier %s non trouvé"
#: pcbnew/pcbcfg.cpp:223
msgid "Save Project File"
msgstr "Sauver Fichier Projet"
#: pcbnew/dialog_edit_module_text_base.cpp:19
#, c-format
msgid "Module %s (%s) orient %.1f"
......@@ -4298,64 +4265,149 @@ msgstr "Si activé, frorce la direction des pistes à H, V ou 45° en creation d
msgid "Segments 45 Only"
msgstr "Segments 45 seulement"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:115
msgid "If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers."
msgstr "Si activé, frorce la direction des segments à H, V ou 45° en création de segments sur couches techniques"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:115
msgid "If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers."
msgstr "Si activé, frorce la direction des segments à H, V ou 45° en création de segments sur couches techniques"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:119
msgid "Auto PAN"
msgstr "Auto PAN"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:121
msgid "Allows auto pan when creating a track, or moving an item."
msgstr "Autorise l'autopan en création de piste, ou lorsque on déplace un élément."
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:125
msgid "Double Segm Track"
msgstr "2 segments pour piste"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:127
msgid "If enabled, uses two track segments, with 45 degrees angle between them when creating a new track "
msgstr "Si activé, utiliser 2 segments de piste, avec un angle de 45 degrés entre eux, pour créer une nouvelle piste"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:136
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:144
msgid "Never"
msgstr "Jamais"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:136
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:144
msgid "When creating tracks"
msgstr "En création de pistes"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:136
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:144
msgid "Always"
msgstr "Toujours"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:138
msgid "Magnetic Pads"
msgstr " Pads magnétiques"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:140
msgid "control the capture of the pcb cursor when the mouse cursor enters a pad area"
msgstr "Contrôle la capture du curseur pcb quand le curseur souris est sur un pad"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:146
msgid "Magnetic Tracks"
msgstr "Pistes Magnétiques"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:148
msgid "Control the capture of the pcb cursor when the mouse cursor enters a track"
msgstr "Contrôle la capture du curseur pcb quand le curseur souris passe sur une piste"
#: pcbnew/toolbars_update_user_interface.cpp:38
msgid " mils"
msgstr " mils"
#: pcbnew/toolbars_update_user_interface.cpp:40
msgid " mm"
msgstr " mm"
#: pcbnew/toolbars_update_user_interface.cpp:53
msgid "NetClass: "
msgstr "NetClass: "
#: pcbnew/toolbars_update_user_interface.cpp:94
#: pcbnew/toolbars_update_user_interface.cpp:109
msgid " *"
msgstr " *"
#: pcbnew/toolbars_update_user_interface.cpp:198
msgid "DRC Off (Disable !!!), Currently: DRC is active"
msgstr "DRC off (désactivée !!!), actuellement DRC active"
#: pcbnew/toolbars_update_user_interface.cpp:200
msgid "DRC On (Currently: DRC is inactive !!!)"
msgstr "DRC On (Actuellement, DRC désactivée !!!)"
#: pcbnew/toolbars_update_user_interface.cpp:211
msgid "Polar coords not show"
msgstr "Coord Polaires non affichées"
#: pcbnew/toolbars_update_user_interface.cpp:212
msgid "Display polar coords"
msgstr "Affichage coord Polaires"
#: pcbnew/toolbars_update_user_interface.cpp:217
msgid "Show grid"
msgstr "Afficher grille"
#: pcbnew/toolbars_update_user_interface.cpp:226
msgid "Hide general ratsnest"
msgstr "Ne pas afficher le chevelu général"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:119
msgid "Auto PAN"
msgstr "Auto PAN"
#: pcbnew/toolbars_update_user_interface.cpp:227
msgid "Show general ratsnest"
msgstr "Afficher le chevelu général"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:121
msgid "Allows auto pan when creating a track, or moving an item."
msgstr "Autorise l'autopan en création de piste, ou lorsque on déplace un élément."
#: pcbnew/toolbars_update_user_interface.cpp:233
msgid "Hide module ratsnest"
msgstr "Ne pas montrer le chevelu du module"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:125
msgid "Double Segm Track"
msgstr "2 segments pour piste"
#: pcbnew/toolbars_update_user_interface.cpp:234
msgid "Show module ratsnest"
msgstr "Montrer le chevelu du module"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:127
msgid "If enabled, uses two track segments, with 45 degrees angle between them when creating a new track "
msgstr "Si activé, utiliser 2 segments de piste, avec un angle de 45 degrés entre eux, pour créer une nouvelle piste"
#: pcbnew/toolbars_update_user_interface.cpp:241
msgid "Disable auto delete old track"
msgstr "Ne pas Autoriser l'effacement automatique des pistes"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:136
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:144
msgid "Never"
msgstr "Jamais"
#: pcbnew/toolbars_update_user_interface.cpp:242
msgid "Enable auto delete old track"
msgstr "Autoriser l'effacement automatique des pistes"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:136
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:144
msgid "When creating tracks"
msgstr "En création de pistes"
#: pcbnew/toolbars_update_user_interface.cpp:249
msgid "Show pads sketch mode"
msgstr "Afficher pastilles en mode contour"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:136
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:144
msgid "Always"
msgstr "Toujours"
#: pcbnew/toolbars_update_user_interface.cpp:257
msgid "Show vias sketch mode"
msgstr "Afficher vias en mode contour"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:138
msgid "Magnetic Pads"
msgstr " Pads magnétiques"
#: pcbnew/toolbars_update_user_interface.cpp:265
msgid "Show tracks sketch mode"
msgstr "Afficher pistes en mode contour"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:140
msgid "control the capture of the pcb cursor when the mouse cursor enters a pad area"
msgstr "Contrôle la capture du curseur pcb quand le curseur souris est sur un pad"
#: pcbnew/toolbars_update_user_interface.cpp:266
msgid "Show tracks filled mode"
msgstr "Afficher pistes en mode plein"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:146
msgid "Magnetic Tracks"
msgstr "Pistes Magnétiques"
#: pcbnew/toolbars_update_user_interface.cpp:272
msgid "Normal contrast mode display"
msgstr "Mode d'affichage contraste normal"
#: pcbnew/dialog_general_options_BoardEditor_base.cpp:148
msgid "Control the capture of the pcb cursor when the mouse cursor enters a track"
msgstr "Contrôle la capture du curseur pcb quand le curseur souris passe sur une piste"
#: pcbnew/toolbars_update_user_interface.cpp:273
msgid "High contrast mode display"
msgstr "Mode d'affichage haut contraste"
#: pcbnew/class_pcb_text.cpp:236
msgid "COTATION"
msgstr "COTATION"
#: pcbnew/toolbars_update_user_interface.cpp:279
msgid "Hide invisible text"
msgstr "Cacher textes invisibles"
#: pcbnew/class_pcb_text.cpp:238
msgid "PCB Text"
msgstr "Texte PCB"
#: pcbnew/toolbars_update_user_interface.cpp:280
msgid "Show invisible text"
msgstr "Montrer textes invisibles"
#: pcbnew/dialog_netlist.cpp:68
msgid "Netlist Selection:"
......@@ -4450,6 +4502,7 @@ msgid "Preview"
msgstr "Prévisualisation"
#: pcbnew/dialog_print_using_printer_base.cpp:125
#: pcbnew/dialog_print_using_printer.cpp:465
msgid "Print"
msgstr "Imprimer"
......@@ -4615,99 +4668,6 @@ msgstr "Net Code"
msgid "Net Length"
msgstr "Long. Net"
#: pcbnew/toolbars_update_user_interface.cpp:38
msgid " mils"
msgstr " mils"
#: pcbnew/toolbars_update_user_interface.cpp:40
msgid " mm"
msgstr " mm"
#: pcbnew/toolbars_update_user_interface.cpp:53
msgid "NetClass: "
msgstr "NetClass: "
#: pcbnew/toolbars_update_user_interface.cpp:94
#: pcbnew/toolbars_update_user_interface.cpp:109
msgid " *"
msgstr " *"
#: pcbnew/toolbars_update_user_interface.cpp:198
msgid "DRC Off (Disable !!!), Currently: DRC is active"
msgstr "DRC off (désactivée !!!), actuellement DRC active"
#: pcbnew/toolbars_update_user_interface.cpp:200
msgid "DRC On (Currently: DRC is inactive !!!)"
msgstr "DRC On (Actuellement, DRC désactivée !!!)"
#: pcbnew/toolbars_update_user_interface.cpp:211
msgid "Polar coords not show"
msgstr "Coord Polaires non affichées"
#: pcbnew/toolbars_update_user_interface.cpp:212
msgid "Display polar coords"
msgstr "Affichage coord Polaires"
#: pcbnew/toolbars_update_user_interface.cpp:217
msgid "Show grid"
msgstr "Afficher grille"
#: pcbnew/toolbars_update_user_interface.cpp:226
msgid "Hide general ratsnest"
msgstr "Ne pas afficher le chevelu général"
#: pcbnew/toolbars_update_user_interface.cpp:227
msgid "Show general ratsnest"
msgstr "Afficher le chevelu général"
#: pcbnew/toolbars_update_user_interface.cpp:233
msgid "Hide module ratsnest"
msgstr "Ne pas montrer le chevelu du module"
#: pcbnew/toolbars_update_user_interface.cpp:234
msgid "Show module ratsnest"
msgstr "Montrer le chevelu du module"
#: pcbnew/toolbars_update_user_interface.cpp:241
msgid "Disable auto delete old track"
msgstr "Ne pas Autoriser l'effacement automatique des pistes"
#: pcbnew/toolbars_update_user_interface.cpp:242
msgid "Enable auto delete old track"
msgstr "Autoriser l'effacement automatique des pistes"
#: pcbnew/toolbars_update_user_interface.cpp:249
msgid "Show pads sketch mode"
msgstr "Afficher pastilles en mode contour"
#: pcbnew/toolbars_update_user_interface.cpp:257
msgid "Show vias sketch mode"
msgstr "Afficher vias en mode contour"
#: pcbnew/toolbars_update_user_interface.cpp:265
msgid "Show tracks sketch mode"
msgstr "Afficher pistes en mode contour"
#: pcbnew/toolbars_update_user_interface.cpp:266
msgid "Show tracks filled mode"
msgstr "Afficher pistes en mode plein"
#: pcbnew/toolbars_update_user_interface.cpp:272
msgid "Normal contrast mode display"
msgstr "Mode d'affichage contraste normal"
#: pcbnew/toolbars_update_user_interface.cpp:273
msgid "High contrast mode display"
msgstr "Mode d'affichage haut contraste"
#: pcbnew/toolbars_update_user_interface.cpp:278
msgid "Show invisible text"
msgstr "Montrer textes invisibles"
#: pcbnew/toolbars_update_user_interface.cpp:279
msgid "Hide invisible text"
msgstr "Cacher textes invisibles"
#: pcbnew/dialog_orient_footprints.cpp:138
msgid "Orientation:"
msgstr "Orientation:"
......@@ -5042,8 +5002,8 @@ msgid "Place Micro Via"
msgstr "Place Micro Via"
#: pcbnew/onrightclick.cpp:509
msgid "Change Width"
msgstr "Change Largeur"
msgid "Change Tracks and Vias Sizes"
msgstr "Changer Taille Pistes et Vias"
#: pcbnew/onrightclick.cpp:511
msgid "Change Via Size"
......@@ -5058,20 +5018,20 @@ msgid "Change Track Width"
msgstr "Change Largeur Piste"
#: pcbnew/onrightclick.cpp:517
msgid "Change Net"
msgstr "Change Net"
msgid "Set Net to NetClass values"
msgstr "Ajuster le Net à la Valeur en NetClass"
#: pcbnew/onrightclick.cpp:519
msgid "Change ALL Tracks and Vias"
msgstr "Changer TOUTES Pistes et Vias"
msgid "Set ALL Tracks and Vias to NetClass Values"
msgstr "Ajuster TOUTES Pistes et Vias aux Valeurs en NetClass"
#: pcbnew/onrightclick.cpp:521
msgid "Change ALL Vias (No Track)"
msgstr "Changer TOUTES Vias (Pas les Pistes)"
msgid "Set ALL Vias (No Track)to NetClass Values"
msgstr "Ajuster TOUTES Vias (pas les Pistes) aux Valeurs en NetClass"
#: pcbnew/onrightclick.cpp:523
msgid "Change ALL Tracks (No Via)"
msgstr "Changer TOUTES Pistes (Pas les Vias)"
msgid "Set ALL Tracks (No Via)to NetClass Values"
msgstr "Ajuster TOUTES Pistes (pas les Vias) aux Valeurs en NetClass"
#: pcbnew/onrightclick.cpp:531
msgid "Delete Via"
......@@ -5349,7 +5309,6 @@ msgid "Footprint documentation file"
msgstr "Fichier documentation des modules"
#: pcbnew/dialog_pcbnew_config_libs_and_paths_fbp.cpp:61
#: pcbnew/dialog_exchange_modules_base.cpp:68
msgid "Browse"
msgstr "Examiner"
......@@ -5394,6 +5353,43 @@ msgstr "Il y a un problème d'impression"
msgid "Print page %d"
msgstr "Imprimer page %d"
#: pcbnew/class_track.cpp:951
msgid "Flags"
msgstr "Flags"
#: pcbnew/class_track.cpp:963
msgid "Stat"
msgstr "Stat"
#: pcbnew/class_track.cpp:986
msgid "Diam"
msgstr "Diam"
#: pcbnew/class_track.cpp:993
#: pcbnew/class_pad.cpp:577
msgid "Drill"
msgstr "Perçage"
#: pcbnew/class_track.cpp:997
msgid "(Specific)"
msgstr "(Specifique)"
#: pcbnew/class_track.cpp:999
msgid "(Default)"
msgstr "(Défaut)"
#: pcbnew/class_track.cpp:1012
msgid "Net Class"
msgstr "Classe d'Equipot"
#: pcbnew/class_track.cpp:1019
msgid "Seg Len"
msgstr "Long. Seg."
#: pcbnew/class_track.cpp:1028
msgid "Track Len"
msgstr "Long. Piste"
#: pcbnew/class_pad.cpp:380
msgid "Unknown Pad shape"
msgstr "Forme Pad inconnue"
......@@ -5418,7 +5414,7 @@ msgstr "X Pos"
msgid "Y pos"
msgstr "Y pos"
#: pcbnew/editrack-part2.cpp:109
#: pcbnew/editrack-part2.cpp:110
msgid "Drc error, cancelled"
msgstr "Erreur DRC, annulation"
......@@ -5544,10 +5540,12 @@ msgid "3D settings"
msgstr "3D Caract"
#: pcbnew/dialog_edit_module_for_Modedit.cpp:83
#: pcbnew/dialog_edit_module_for_BoardEditor.cpp:205
msgid "Use this attribute for most non smd components"
msgstr "Utiliser cet attribut pour la plupart des composants"
#: pcbnew/dialog_edit_module_for_Modedit.cpp:86
#: pcbnew/dialog_edit_module_for_BoardEditor.cpp:208
msgid ""
"Use this attribute for smd components.\n"
"Only components with this option are put in the footprint position list file"
......@@ -5556,30 +5554,37 @@ msgstr ""
"Seuls les composants avec cette option sont mis dans le fichier de position des composants"
#: pcbnew/dialog_edit_module_for_Modedit.cpp:89
#: pcbnew/dialog_edit_module_for_BoardEditor.cpp:211
msgid "Use this attribute for \"virtual\" components drawn on board (like a old ISA PC bus connector)"
msgstr "Uiliser cet attribut pour les composants \"virtuels\" directement dessinés sur le PCB (tel que les vieux connecteurs ISA de PC)"
#: pcbnew/dialog_edit_module_for_Modedit.cpp:115
#: pcbnew/dialog_edit_module_for_BoardEditor.cpp:237
msgid "Enable hotkey move commands and Auto Placement"
msgstr "Autoriser les commandes clavier de déplacement et l'auto placement"
#: pcbnew/dialog_edit_module_for_Modedit.cpp:116
#: pcbnew/dialog_edit_module_for_BoardEditor.cpp:238
msgid "Disable hotkey move commands and Auto Placement"
msgstr "Interdire les commandes clavier de déplacement et l'auto placement"
#: pcbnew/dialog_edit_module_for_Modedit.cpp:125
#: pcbnew/dialog_edit_module_for_BoardEditor.cpp:247
msgid "Shape Scale:"
msgstr "Echelle de la forme:"
#: pcbnew/dialog_edit_module_for_Modedit.cpp:129
#: pcbnew/dialog_edit_module_for_BoardEditor.cpp:251
msgid "Shape Offset:"
msgstr "Offset forme:"
#: pcbnew/dialog_edit_module_for_Modedit.cpp:133
#: pcbnew/dialog_edit_module_for_BoardEditor.cpp:255
msgid "Shape Rotation:"
msgstr "Rot de la forme"
#: pcbnew/dialog_edit_module_for_Modedit.cpp:237
#: pcbnew/dialog_edit_module_for_BoardEditor.cpp:359
msgid "3D Shape:"
msgstr "Forme 3D:"
......@@ -6069,6 +6074,30 @@ msgstr "Designation"
msgid "Supplier and ref"
msgstr "Fournisseur et ref"
#: pcbnew/class_module.cpp:824
msgid "Last Change"
msgstr "Last Change"
#: pcbnew/class_module.cpp:830
msgid "Netlist path"
msgstr "Chemin Netliste "
#: pcbnew/class_module.cpp:868
msgid "No 3D shape"
msgstr "Pas de forme 3D"
#: pcbnew/class_module.cpp:869
msgid "3D-Shape"
msgstr "Forme 3D"
#: pcbnew/class_module.cpp:872
msgid "Doc: "
msgstr "Doc: "
#: pcbnew/class_module.cpp:873
msgid "KeyW: "
msgstr "KeyW: "
#: eeschema/pinedit.cpp:25
msgid "line"
msgstr "Ligne"
......@@ -7246,6 +7275,7 @@ msgid "Deselect current tool"
msgstr "Désélection outil courant"
#: eeschema/tool_lib.cpp:43
#: eeschema/libframe.cpp:623
msgid "Add pin"
msgstr "Addition de \"pins\""
......@@ -7254,14 +7284,17 @@ msgid "Add graphic text"
msgstr "Addition de textes graphiques (commentaires)"
#: eeschema/tool_lib.cpp:51
#: eeschema/libframe.cpp:649
msgid "Add rectangle"
msgstr "Ajout de rectangle"
#: eeschema/tool_lib.cpp:55
#: eeschema/libframe.cpp:653
msgid "Add circle"
msgstr "Ajout de cercle"
#: eeschema/tool_lib.cpp:59
#: eeschema/libframe.cpp:657
msgid "Add arc"
msgstr "Ajout d'arc"
......@@ -7908,18 +7941,26 @@ msgid "No Draw"
msgstr "Invisible"
#: eeschema/pinedit-dialog.cpp:215
#: eeschema/class_pin.cpp:1225
#: eeschema/dialog_edit_label_base.cpp:37
msgid "Right"
msgstr "Droite"
#: eeschema/pinedit-dialog.cpp:216
#: eeschema/class_pin.cpp:1221
#: eeschema/dialog_edit_label_base.cpp:37
msgid "Left"
msgstr "Gauche"
#: eeschema/pinedit-dialog.cpp:217
#: eeschema/class_pin.cpp:1213
#: eeschema/dialog_edit_label_base.cpp:37
msgid "Up"
msgstr "Haut"
#: eeschema/pinedit-dialog.cpp:218
#: eeschema/class_pin.cpp:1217
#: eeschema/dialog_edit_label_base.cpp:37
msgid "Down"
msgstr "Bas"
......@@ -8059,7 +8100,7 @@ msgstr "Invisible"
#: eeschema/class_pin.cpp:1229
msgid "Unknown"
msgstr ""
msgstr "Inconnu"
#: eeschema/tool_sch.cpp:37
msgid "Open schematic project"
......@@ -8213,19 +8254,19 @@ msgstr "U"
#: eeschema/dialog_lib_new_component_base.cpp:76
msgid "Number of &parts per package:"
msgstr ""
msgstr "Nombre de &parts par boitier"
#: eeschema/dialog_lib_new_component_base.cpp:97
msgid "Create component with &alternate body style (DeMorgan)"
msgstr ""
msgstr "Créer un composant avec une forme &alternative (DeMorgan)"
#: eeschema/dialog_lib_new_component_base.cpp:109
msgid "Create component as power &symbol"
msgstr "Créer composant comme &symbole d'alimentation"
#: eeschema/dialog_lib_new_component_base.cpp:121
msgid "Prevent drawing items from being &moved"
msgstr ""
msgid "Parts in package cannot be swapped"
msgstr "Les parts du boitier ne peuvent pas être interchangées"
#: eeschema/dialog_lib_new_component_base.cpp:130
msgid "Global Pin Settings"
......@@ -8233,7 +8274,7 @@ msgstr "Parametres Globaux des Pins"
#: eeschema/dialog_lib_new_component_base.cpp:142
msgid "Pin text position &offset:"
msgstr ""
msgstr "Offset de position du text de la pin"
#: eeschema/dialog_lib_new_component_base.cpp:152
msgid "mils"
......@@ -9894,7 +9935,6 @@ msgid " [no file]"
msgstr " [pas de fichier]"
#: cvpcb/menucfg.cpp:37
#: cvpcb/tool_cvpcb.cpp:30
msgid "Open a NetList file"
msgstr "Lire un Fichier Netliste"
......@@ -10697,14 +10737,11 @@ msgid "%d errors while reading Gerber file [%s]"
msgstr "%d erreurs pendant lecture fichier gerber [%s]"
#: gerbview/readgerb.cpp:274
#: gerbview/files.cpp:203
#: gerbview/files.cpp:238
#, c-format
msgid "Gerber DCODE files (%s)|*.%s"
msgstr "Fichiers Gerber DCODE (%s)|*.%s"
#: gerbview/readgerb.cpp:278
#: gerbview/files.cpp:208
msgid "Load GERBER DCODE File"
msgstr "Charger Fichier de DCodes"
......@@ -10738,6 +10775,14 @@ msgstr "Effacer Textes Pcb"
msgid "Delete Layer %d"
msgstr "Effacer Couche %d"
#: gerbview/set_color.cpp:271
msgid "Switch on all of the Gerber layers"
msgstr "Affiche toutes les couches Gerber"
#: gerbview/set_color.cpp:279
msgid "Switch off all of the Gerber layers"
msgstr "N'affiche pas les couches Gerber"
#: gerbview/files.cpp:84
msgid "Not yet available..."
msgstr "non encore disponible"
......@@ -10967,6 +11012,7 @@ msgid "Find D-codes"
msgstr "Chercher DCodes"
#: gerbview/tool_gerber.cpp:244
#: gerbview/select_layers_to_pcb.cpp:220
msgid "Layer "
msgstr "Couche "
......@@ -11088,14 +11134,6 @@ msgstr "Nom Fichier C.I.:"
msgid "Ok to change the existing file ?"
msgstr "D'accord pour changer le fichier existant ?"
#: gerbview/set_color.cpp:271
msgid "Switch on all of the Gerber layers"
msgstr "Affiche toutes les couches Gerber"
#: gerbview/set_color.cpp:279
msgid "Switch off all of the Gerber layers"
msgstr "N'affiche pas les couches Gerber"
#: gerbview/gerbview_config.cpp:26
msgid "GerbView project files (.cnf)|*.cnf"
msgstr "Fichiers projet GerbView (.cnf)|*.cnf"
......@@ -11492,6 +11530,10 @@ msgstr "??? Via"
msgid "Blind/Buried Via"
msgstr "Via Aveugle/Enterrée"
#: common/pcbcommon.cpp:64
msgid "Through Via"
msgstr "Via Traversante"
#: common/pcbcommon.cpp:82
msgid "Kicad footprint library files (*.mod)|*.mod"
msgstr "Fichiers Modules Kicad (*.mod)|*.mod"
......@@ -11885,66 +11927,66 @@ msgstr "Options Générales"
msgid "Pad Properties"
msgstr "Propriétés du Pad"
#: pcbnew/dialog_edit_module_text_base.h:63
msgid "Footprint text properties"
msgstr "Propriétés du texte du module"
#: pcbnew/set_color.h:36
msgid "Pcbnew Layer Colors:"
msgstr "Pcbnew: Couleur des Couches"
#: pcbnew/set_color.h:79
#: pcbnew/set_color.h:89
msgid "Copper Layers"
msgstr "Couches Cuivre."
#: pcbnew/set_color.h:214
#: pcbnew/set_color.h:224
msgid "Tech Layers"
msgstr "Couches Tech."
#: pcbnew/set_color.h:325
#: pcbnew/set_color.h:335
msgid "Others"
msgstr "Autres"
#: pcbnew/set_color.h:355
#: pcbnew/set_color.h:366
msgid "Ratsnest"
msgstr "Chevelu"
#: pcbnew/set_color.h:364
#: pcbnew/set_color.h:375
msgid "Pad Cu"
msgstr "Pad Cu"
#: pcbnew/set_color.h:372
#: pcbnew/set_color.h:383
msgid "Pad Cmp"
msgstr "Pad Cmp"
#: pcbnew/set_color.h:380
#: pcbnew/set_color.h:391
msgid "Text Module Cu"
msgstr "Texte Module Cu"
#: pcbnew/set_color.h:388
#: pcbnew/set_color.h:399
msgid "Text Module Cmp"
msgstr "Texte Module Cmp"
#: pcbnew/set_color.h:396
#: pcbnew/set_color.h:407
msgid "Text Module invisible"
msgstr "Texte Module invisible"
#: pcbnew/set_color.h:404
#: pcbnew/set_color.h:415
msgid "Anchors"
msgstr "Ancres"
#: pcbnew/set_color.h:421
#: pcbnew/set_color.h:432
msgid "Show Noconnect"
msgstr "Montrer Non Conn"
#: pcbnew/set_color.h:430
#: pcbnew/set_color.h:441
msgid "Show Modules Cmp"
msgstr "Afficher Modules Cmp"
#: pcbnew/set_color.h:439
#: pcbnew/set_color.h:450
msgid "Show Modules Cu"
msgstr "Afficher Modules Cu"
#: pcbnew/dialog_edit_module_text_base.h:63
msgid "Footprint text properties"
msgstr "Propriétés du texte du module"
#: pcbnew/dialog_drc_base.h:98
msgid "DRC Control"
msgstr "Contrôle DRC"
......@@ -11954,6 +11996,7 @@ msgid "Exchange Modules"
msgstr "Echange modules:"
#: pcbnew/dialog_edit_module_for_Modedit_base.h:88
#: pcbnew/dialog_edit_module_for_BoardEditor_base.h:102
msgid "Module properties"
msgstr "Propriétés du Module"
......@@ -12257,6 +12300,17 @@ msgstr "DCodes id."
msgid "Page Settings"
msgstr "Ajustage opt Page"
#~ msgid "Change track width (entire NET) ?"
#~ msgstr "Change largeur piste ( NET complet) ?"
#~ msgid "Edit All Via Sizes"
#~ msgstr "Editer TOUTES Vias"
#~ msgid "Edit All Track Sizes"
#~ msgstr "Editer TOUTES Pistes"
#~ msgid "Change Width"
#~ msgstr "Change Largeur"
#~ msgid "Change Net"
#~ msgstr "Change Net"
#, fuzzy
#~ msgid "Oriention"
#~ msgstr "Orientation"
......@@ -12328,8 +12382,6 @@ msgstr "Ajustage opt Page"
#~ msgstr "Couches"
#~ msgid "Net classes:"
#~ msgstr "Classes d'Equipotentielles:"
#~ msgid "Track size"
#~ msgstr "Largeur piste"
#~ msgid "Vias size"
#~ msgstr "Diamètre via"
#~ msgid "Track Min Size"
......
......@@ -97,6 +97,7 @@ set(PCBNEW_SRCS
librairi.cpp
loadcmp.cpp
locate.cpp
magnetic_tracks_functions.cpp
menubarmodedit.cpp
menubarpcb.cpp
mirepcb.cpp
......
......@@ -46,7 +46,8 @@ void WinEDA_PcbFrame::Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On )
return;
DrawPanel->CursorOff( DC ); // Erase cursor shape
Track = Marque_Une_Piste( this, DC, track, &nb_segm, GR_OR | GR_SURBRILL );
Track = Marque_Une_Piste( GetBoard(), track, &nb_segm, NULL, true );
Trace_Une_Piste( DrawPanel, DC, Track, nb_segm, GR_OR | GR_SURBRILL );
for( ; (Track != NULL) && (nb_segm > 0); nb_segm-- )
{
......
......@@ -208,7 +208,7 @@ public:
return m_NetClassName;
}
#if 0
#if 1
/**
* Function GetTrackWidth
* returns the width of tracks used to route this net.
......@@ -220,16 +220,18 @@ public:
}
#if 0
/**
* Function GetTrackWidth
* Function GetTrackMinWidth
* returns the Minimum value for tracks thickness (used in DRC)
*/
int GetTrackWidth()
int GetTrackMinWidth()
{
wxASSERT( m_NetClass );
return m_NetClass->GetTrackMinWidth();
// wxASSERT( m_NetClass );
// return m_NetClass->GetTrackMinWidth();
return g_DesignSettings.m_TrackMinWidth;
}
#endif
/**
* Function GetViaSize
......@@ -238,7 +240,17 @@ public:
int GetViaSize()
{
wxASSERT( m_NetClass );
return m_NetClass->GetViaSize();
return m_NetClass->GetViaDiameter();
}
/**
* Function GetMicroViaSize
* returns the size of vias used to route this net
*/
int GetMicroViaSize()
{
wxASSERT( m_NetClass );
return m_NetClass->GetuViaDiameter();
}
......@@ -249,10 +261,22 @@ public:
int GetViaDrillSize()
{
wxASSERT( m_NetClass );
return m_NetClass->GetViaDrillSize();
return m_NetClass->GetViaDrill();
}
/**
* Function GetViaDrillSize
* returns the size of via drills used to route this net
*/
int GetMicroViaDrillSize()
{
wxASSERT( m_NetClass );
return m_NetClass->GetuViaDrill();
}
#if 0
/**
* Function GetViaMinSize
* returns the Minimum value for via sizes (used in DRC)
......@@ -262,7 +286,7 @@ public:
wxASSERT( m_NetClass );
return m_NetClass->GetViaMinSize();
}
#endif
/**
* Function GetClearance
......
......@@ -14,32 +14,6 @@
#include "protos.h"
// #define RATSNET_DEBUG
#ifdef RATSNET_DEBUG
/**************************************/
void DbgDisplayTrackInfos( TRACK* track )
/**************************************/
/* Only for ratsnest debug
*/
{
wxString msg;
msg << wxT( "Netcode " ) << track->GetNet();
msg << wxT( " - " ) << track->GetSubNet();
msg << wxT( "\nptrS " ) << (unsigned) track->start;
msg << wxT( " ptrE " ) << (unsigned) track->end;
msg << wxT( " this " ) << (unsigned) track;
wxMessageBox( msg );
}
#endif
/**
* Function ShowClearance
* tests to see if the clearance border is drawn on the given track.
......@@ -151,17 +125,27 @@ int TRACK::GetDrillValue() const
return g_DesignSettings.m_ViaDrill;
}
/**
* Function GetLength
* returns the position of this object.
* @return the length of the track segment (0 for a via).
*/
double TRACK::GetLength()
{
wxPoint delta = m_End - m_Start;
return sqrt( (double)delta.x*delta.x + (double)delta.y*delta.y );
}
/***********************/
bool TRACK::IsNull()
/***********************/
// return TRUE if segment length = 0
// return true if segment length = 0
{
if( ( Type() != TYPE_VIA ) && ( m_Start == m_End ) )
return TRUE;
return true;
else
return FALSE;
return false;
}
......@@ -272,27 +256,29 @@ EDA_Rect TRACK::GetBoundingBox()
return ret;
}
/**
* Function Rotate
* Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
void TRACK::Rotate(const wxPoint& aRotCentre, int aAngle)
void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle )
{
RotatePoint( &m_Start, aRotCentre, aAngle );
RotatePoint( &m_End, aRotCentre, aAngle );
}
/**
* Function Flip
* Flip this object, i.e. change the board side for this object
* @param const wxPoint& aCentre - the rotation point.
*/
void TRACK::Flip(const wxPoint& aCentre )
void TRACK::Flip( const wxPoint& aCentre )
{
m_Start.y = aCentre.y - (m_Start.y - aCentre.y);
m_End.y = aCentre.y - (m_End.y - aCentre.y);
m_Start.y = aCentre.y - (m_Start.y - aCentre.y);
m_End.y = aCentre.y - (m_End.y - aCentre.y);
if( Type() == TYPE_VIA )
{
}
......@@ -712,13 +698,13 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
angle = 900; // angle is in 0.1 degree
if( panel->GetScreen()->Scale( tsize ) >= 6 )
{
if( !(!IsOnLayer( curr_layer )&& DisplayOpt.ContrastModeDisplay)){
tsize = (tsize * 8) / 10; // small reduction to give a better look
DrawGraphicText( panel, DC, tpos,
WHITE, net->GetShortNetname(), angle, wxSize( tsize, tsize ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7,
false, false );
if( !(!IsOnLayer( curr_layer )&& DisplayOpt.ContrastModeDisplay) )
{
tsize = (tsize * 8) / 10; // small reduction to give a better look
DrawGraphicText( panel, DC, tpos,
WHITE, net->GetShortNetname(), angle, wxSize( tsize, tsize ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7,
false, false );
}
}
}
......@@ -729,13 +715,14 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoint& notUsed )
/*******************************************************************************************/
{
int color;
int rayon;
int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
int color;
int rayon;
int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
int fillvia = 0;
WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) panel->m_Parent;
PCB_SCREEN* screen = frame->GetScreen();
int fillvia = 0;
WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) panel->m_Parent;
PCB_SCREEN* screen = frame->GetScreen();
if( frame->m_DisplayViaFill == FILLED )
fillvia = 1;
......@@ -907,7 +894,7 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
DrawGraphicText( panel, DC, m_Start,
WHITE, net->GetShortNetname(), 0, wxSize( tsize, tsize ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7,
false, false);
false, false );
}
}
}
......@@ -917,12 +904,7 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
{
wxString msg;
int text_pos;
BOARD* board = ( (WinEDA_BasePcbFrame*)frame)->GetBoard();
#ifdef RATSNET_DEBUG
DbgDisplayTrackInfos( this );
#endif
BOARD* board = ( (WinEDA_BasePcbFrame*) frame )->GetBoard();
frame->MsgPanel->EraseMsgBox();
......@@ -943,18 +925,11 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
msg = wxT( "????" ); break;
}
text_pos = 1;
Affiche_1_Parametre( frame, text_pos, _( "Type" ), msg, DARKCYAN );
text_pos += 10;
frame->MsgPanel->AppendMessage( _( "Type" ), msg, DARKCYAN );
if( Type() == TYPE_TRACK
|| Type() == TYPE_ZONE
|| Type() == TYPE_VIA )
// Display Net Name (in pcbnew)
if( frame->m_Ident == PCB_FRAME )
{
/* Display NetName pour les segments de piste type cuivre */
NETINFO_ITEM* net = board->FindNet( GetNet() );
if( net )
......@@ -962,31 +937,18 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
else
msg = wxT( "<noname>" );
Affiche_1_Parametre( frame, text_pos, _( "NetName" ), msg, RED );
text_pos += 20;
frame->MsgPanel->AppendMessage( _( "NetName" ), msg, RED );
/* Display net code : (usefull in test or debug) */
msg.Printf( wxT( "%d .%d" ), GetNet(), GetSubNet() );
Affiche_1_Parametre( frame, text_pos, _( "NetCode" ), msg, RED );
text_pos += 8;
}
else
{
Affiche_1_Parametre( frame, text_pos, _( "Segment" ), wxEmptyString, RED );
if( m_Shape == S_CIRCLE )
Affiche_1_Parametre( frame, -1, wxEmptyString, _( "Circle" ), RED );
else
Affiche_1_Parametre( frame, -1, wxEmptyString, _( "Standard" ), RED );
text_pos += 8;
frame->MsgPanel->AppendMessage( _( "NetCode" ), msg, RED );
}
#if defined(DEBUG)
/* Display the flags */
msg.Printf( wxT( "0x%08X" ), m_Flags );
Affiche_1_Parametre( frame, text_pos, _( "Flags" ), msg, BLUE );
text_pos += 8;
frame->MsgPanel->AppendMessage( _( "Flags" ), msg, BLUE );
#endif
......@@ -998,8 +960,7 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
if( GetState( SEGM_AR ) )
msg[2] = 'A';
Affiche_1_Parametre( frame, text_pos, _( "Stat" ), msg, MAGENTA );
text_pos += 6;
frame->MsgPanel->AppendMessage( _( "Stat" ), msg, MAGENTA );
/* Display layer or layer pair) */
if( Type() == TYPE_VIA )
......@@ -1014,8 +975,7 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
else
msg = board->GetLayerName( m_Layer );
Affiche_1_Parametre( frame, text_pos, _( "Layer" ), msg, BROWN );
text_pos += 15;
frame->MsgPanel->AppendMessage( _( "Layer" ), msg, BROWN );
/* Display width */
valeur_param( (unsigned) m_Width, msg );
......@@ -1023,8 +983,7 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
if( Type() == TYPE_VIA ) // Display Diam and Drill values
{
// Display diameter value:
Affiche_1_Parametre( frame, text_pos, _( "Diam" ), msg, DARKCYAN );
text_pos += 8;
frame->MsgPanel->AppendMessage( _( "Diam" ), msg, DARKCYAN );
// Display drill value
int drill_value = GetDrillValue();
......@@ -1032,24 +991,41 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
valeur_param( (unsigned) drill_value, msg );
wxString title = _( "Drill" );
title += wxT(" ");
title += wxT( " " );
if( m_Drill >= 0 )
title += _( "(Specific)" );
else
title += _( "(Default)" );
Affiche_1_Parametre( frame, text_pos, title, msg, RED );
frame->MsgPanel->AppendMessage( title, msg, RED );
}
else
Affiche_1_Parametre( frame, text_pos, _( "Width" ), msg, DARKCYAN );
{
frame->MsgPanel->AppendMessage( _( "Width" ), msg, DARKCYAN );
}
NETCLASS* netclass = GetNetClass();
if( netclass )
{
msg = netclass->GetName();
text_pos += 10;
Affiche_1_Parametre( frame, text_pos, _( "Net Class" ), msg, DARKCYAN );
frame->MsgPanel->AppendMessage( _( "Net Class" ), msg, DARKCYAN );
}
// Display segment length
if( Type() != TYPE_VIA ) // Display Diam and Drill values
{
valeur_param( wxRound( GetLength() ), msg );
frame->MsgPanel->AppendMessage( _( "Seg Len" ), msg, DARKCYAN );
}
// Display full track length (in pcbnew)
if( frame->m_Ident == PCB_FRAME )
{
int trackLen;
Marque_Une_Piste( board, this, NULL, &trackLen, false );
valeur_param( trackLen, msg );
frame->MsgPanel->AppendMessage( _( "Track Len" ), msg, DARKCYAN );
}
}
......
......@@ -96,6 +96,13 @@ public:
return m_Start; // it had to be start or end.
}
/**
* Function GetLength
* returns the position of this object.
* @return the length of the track segment (0 for a via).
*/
double GetLength();
EDA_Rect GetBoundingBox();
......
......@@ -10,11 +10,13 @@
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "protos.h"
#include "pcbnew_id.h"
#include "collectors.h"
#include "bitmaps.h"
//external funtions used here:
extern bool Magnetize( BOARD* m_Pcb, WinEDA_PcbFrame* frame,
int aCurrentTool, wxSize grid, wxPoint on_grid, wxPoint* curpos );
/*************************************************************************************/
static BOARD_ITEM* AllAreModulesAndReturnSmallestIfSo( GENERAL_COLLECTOR* aCollector )
......@@ -220,265 +222,6 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode )
}
/**
* Function Join
* finds the point where line segment (b1,b0) intersects with segment (a1,a0).
* If that point would be outside of (a0,a1), the respective endpoint is used.
* Join returns the point in "res" and "true" if a suitable point was found,
* "false" if both lines are parallel or if the length of either segment is zero.
*/
static bool Join( wxPoint* res, wxPoint a0, wxPoint a1, wxPoint b0, wxPoint b1 )
{
/* References:
http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
http://www.gekkou.co.uk/blogs/monologues/2007/12/13/1197586800000.html
*/
double denom;
double t;
// if either segment is zero length
if( a1.x==a0.x && a1.y==a0.y )
return false;
if( b1.x==b0.x && b1.y==b0.y )
return false;
a1 -= a0;
b1 -= b0;
b0 -= a0;
denom = (double) b1.y * a1.x - (double) b1.x * a1.y;
if( !denom )
{
return false; // parallel
}
t = ((double) b1.y * b0.x - (double) b1.x * b0.y ) / denom;
t = min( max( t, 0.0 ), 1.0 );
res->x = wxRound( a0.x + t * a1.x );
res->y = wxRound( a0.y + t * a1.y );
return true;
}
/*
* "Project" finds the projection of a grid point on a track. This is the point
* from where we want to draw new orthogonal tracks when starting on a track.
*/
bool Project( wxPoint* res, wxPoint on_grid, const TRACK* track )
{
if( track->m_Start == track->m_End )
return false;
wxPoint vec = track->m_End - track->m_Start;
double t = double( on_grid.x - track->m_Start.x ) * vec.x +
double( on_grid.y - track->m_Start.y ) * vec.y;
t /= (double) vec.x * vec.x + (double) vec.y * vec.y;
t = min( max( t, 0.0 ), 1.0 );
res->x = wxRound( track->m_Start.x + t * vec.x );
res->y = wxRound( track->m_Start.y + t * vec.y );
return true;
}
/**
* Function Magnetize
* tests to see if there are any magnetic items within near reach of the given
* "curpos". If yes, then curpos is adjusted appropriately according to that
* near magnetic item and true is returned.
* @param curpos The initial position, and what to adjust if a change is needed.
* @return bool - true if the position was adjusted magnetically, else false.
*/
static bool Magnetize( BOARD* m_Pcb, WinEDA_PcbFrame* frame,
int aCurrentTool, wxSize grid, wxPoint on_grid, wxPoint* curpos )
{
bool doCheckNet = g_MagneticPadOption != capture_always && Drc_On;
bool doTrack = false;
bool doPad = false;
bool amMovingVia = false;
TRACK* currTrack = g_CurrentTrackSegment;
BOARD_ITEM* currItem = frame->GetCurItem();
// D( printf( "currTrack=%p currItem=%p currTrack->Type()=%d currItem->Type()=%d\n", currTrack, currItem, currTrack ? currTrack->Type() : 0, currItem ? currItem->Type() : 0 ); )
if( !currTrack && currItem && currItem->Type()==TYPE_VIA && currItem->m_Flags )
{
// moving a VIA
currTrack = (TRACK*) currItem;
amMovingVia = true;
return false; // comment this return out and play with it.
}
else if( currItem != currTrack )
{
currTrack = NULL;
}
if( g_MagneticPadOption == capture_always )
doPad = true;
if( g_MagneticTrackOption == capture_always )
doTrack = true;
if( aCurrentTool == ID_TRACK_BUTT || amMovingVia )
{
int q = capture_cursor_in_track_tool;
if( g_MagneticPadOption == q )
doPad = true;
if( g_MagneticTrackOption == q )
doTrack = true;
}
// D(printf("doPad=%d doTrack=%d aCurrentTool=%d amMovingVia=%d\n", doPad, doTrack, aCurrentTool, amMovingVia );)
// The search precedence order is pads, then tracks/vias
if( doPad )
{
D_PAD* pad = Locate_Any_Pad( m_Pcb, CURSEUR_OFF_GRILLE, TRUE );
if( pad )
{
if( doCheckNet && currTrack && currTrack->GetNet() != pad->GetNet() )
return false;
*curpos = pad->m_Pos;
return true;
}
}
// after pads, only track & via tests remain, skip them if not desired
if( doTrack )
{
int layer = ( (PCB_SCREEN*) ActiveScreen )->m_Active_Layer;
for( TRACK* via = m_Pcb->m_Track;
via && (via = Locate_Via_Area( via, *curpos, layer )) != NULL;
via = via->Next() )
{
if( via != currTrack ) // a via cannot influence itself
{
if( !doCheckNet || !currTrack || currTrack->GetNet() == via->GetNet() )
{
*curpos = via->m_Start;
// D(printf("via hit\n");)
return true;
}
}
else
{
//D( printf( "skipping self\n" ); )
}
}
if( !currTrack )
{
int layer_mask = g_TabOneLayerMask[layer];
TRACK* track = Locate_Pistes( m_Pcb->m_Track, layer_mask, CURSEUR_OFF_GRILLE );
if( !track || track->Type() != TYPE_TRACK )
{
// D(printf("!currTrack and track=%p not found, layer_mask=0x%X\n", track, layer_mask );)
return false;
}
// D( printf( "Project\n" ); )
return Project( curpos, on_grid, track );
}
/*
* In two segment mode, ignore the final segment if it's inside a grid
* square.
*/
if( !amMovingVia && currTrack && g_TwoSegmentTrackBuild && currTrack->Back()
&& currTrack->m_Start.x - grid.x < currTrack->m_End.x
&& currTrack->m_Start.x + grid.x > currTrack->m_End.x
&& currTrack->m_Start.y - grid.y < currTrack->m_End.y
&& currTrack->m_Start.y + grid.y > currTrack->m_End.y )
{
currTrack = currTrack->Back();
}
for( TRACK* track = m_Pcb->m_Track; track; track = track->Next() )
{
if( track->Type() != TYPE_TRACK )
continue;
if( doCheckNet && currTrack && currTrack->GetNet() != track->GetNet() )
continue;
if( g_DesignSettings.IsLayerVisible( track->GetLayer() ) == false )
continue;
// omit the layer check if moving a via
if( !amMovingVia && !track->IsOnLayer( layer ) )
continue;
if( !track->HitTest( *curpos ) )
continue;
D(printf( "have track prospect\n");)
if( Join( curpos, track->m_Start, track->m_End, currTrack->m_Start, currTrack->m_End ) )
{
// D(printf( "join currTrack->Type()=%d\n", currTrack->Type() );)
return true;
}
if( aCurrentTool == ID_TRACK_BUTT || amMovingVia )
{
// At this point we have a drawing mouse on a track, we are drawing
// a new track and that new track is parallel to the track the
// mouse is on. Find the nearest end point of the track under mouse
// to the mouse and return that.
double distStart = hypot( double( curpos->x - track->m_Start.x ),
double( curpos->y - track->m_Start.y ));
double distEnd = hypot( double( curpos->x - track->m_End.x ),
double( curpos->y - track->m_End.y ));
// if track not via, or if its a via dragging but not with its adjacent track
if( currTrack->Type() != TYPE_VIA
|| ( currTrack->m_Start != track->m_Start && currTrack->m_Start != track->m_End ))
{
if( distStart <= currTrack->m_Width/2 )
{
// D(printf("nearest end is start\n");)
*curpos = track->m_Start;
return true;
}
if( distEnd <= currTrack->m_Width/2 )
{
// D(printf("nearest end is end\n");)
*curpos = track->m_End;
return true;
}
// @todo otherwise confine curpos such that it stays centered
// within "track"
}
}
}
}
return false;
}
/****************************************************************/
void WinEDA_PcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
/*****************************************************************/
......
......@@ -192,7 +192,7 @@ void WinEDA_PcbFrame::Remove_One_Track( wxDC* DC, TRACK* pt_segm )
if( pt_segm == NULL )
return;
TRACK* trackList = Marque_Une_Piste( this, DC, pt_segm, &segments_to_delete_count, 0 );
TRACK* trackList = Marque_Une_Piste( GetBoard(), pt_segm, &segments_to_delete_count, NULL, true );
if( segments_to_delete_count == 0 )
return;
......
......@@ -73,7 +73,7 @@ DIALOG_TRACKS_OPTIONS_BASE::DIALOG_TRACKS_OPTIONS_BASE( wxWindow* parent, wxWind
wxStaticBoxSizer* sbMiddleLeftSizer;
sbMiddleLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Vias Options:") ), wxVERTICAL );
wxString m_OptViaTypeChoices[] = { _("Through Via"), _("Blind or Buried Via") };
wxString m_OptViaTypeChoices[] = { _("Through via"), _("Blind or buried via") };
int m_OptViaTypeNChoices = sizeof( m_OptViaTypeChoices ) / sizeof( wxString );
m_OptViaType = new wxRadioBox( this, wxID_ANY, _("Default Via Type"), wxDefaultPosition, wxDefaultSize, m_OptViaTypeNChoices, m_OptViaTypeChoices, 1, wxRA_SPECIFY_COLS );
m_OptViaType->SetSelection( 0 );
......@@ -84,7 +84,7 @@ DIALOG_TRACKS_OPTIONS_BASE::DIALOG_TRACKS_OPTIONS_BASE( wxWindow* parent, wxWind
sbMiddleLeftSizer->Add( 10, 10, 0, 0, 5 );
wxString m_AllowMicroViaCtrlChoices[] = { _("Do Not Allow Micro Vias"), _("Allow Micro Vias") };
wxString m_AllowMicroViaCtrlChoices[] = { _("Do not allow micro vias"), _("Allow micro vias") };
int m_AllowMicroViaCtrlNChoices = sizeof( m_AllowMicroViaCtrlChoices ) / sizeof( wxString );
m_AllowMicroViaCtrl = new wxRadioBox( this, wxID_ALLOW_MICROVIA, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, m_AllowMicroViaCtrlNChoices, m_AllowMicroViaCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AllowMicroViaCtrl->SetSelection( 0 );
......
......@@ -509,7 +509,7 @@
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Through Via&quot; &quot;Blind or Buried Via&quot;</property>
<property name="choices">&quot;Through via&quot; &quot;Blind or buried via&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
......@@ -573,7 +573,7 @@
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Do Not Allow Micro Vias&quot; &quot;Allow Micro Vias&quot;</property>
<property name="choices">&quot;Do not allow micro vias&quot; &quot;Allow micro vias&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
......
/***************************************************************/
/* Edition des pistes: Routines de modification de dimensions: */
/* Modif de largeurs de segment, piste, net , zone et diam Via */
/***************************************************************/
/***************************************************************
* Tracks and Vias size edition:
* Functions to modify sizes of segment, track, net , all vias and/or all tracks
***************************************************************/
#include "fctsys.h"
#include "common.h"
......@@ -13,29 +13,46 @@
#include "protos.h"
/** Function SetTrackSegmentWidth
* Modify one track segment width or one via diameter (using DRC control).
* Basic routine used by other routines when editing tracks or vias
* @param aTrackItem = the track segment or via to modify
* @param aItemsListPicker = the list picker to use for an undo command (can be NULL)
* @param aUseNetclassValue = true to use NetClass value, false to use g_DesignSettings value
* @return true if done, false if no not change (because DRC error)
*/
bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem,
PICKED_ITEMS_LIST* aItemsListPicker )
PICKED_ITEMS_LIST* aItemsListPicker,
bool aUseNetclassValue )
{
int initial_width, new_width;
bool change_ok = false;
int initial_width, new_width;
bool change_ok = false;
NETINFO_ITEM* net = NULL;
if( aUseNetclassValue )
net = GetBoard()->FindNet( aTrackItem->GetNet() );
initial_width = aTrackItem->m_Width;
new_width = aTrackItem->m_Width = g_DesignSettings.m_CurrentTrackWidth;
if( net )
new_width = net->GetTrackWidth();
else
new_width = g_DesignSettings.m_CurrentTrackWidth;
if( aTrackItem->Type() == TYPE_VIA )
{
new_width = aTrackItem->m_Width = g_DesignSettings.m_CurrentViaSize;
if( net )
new_width = net->GetViaSize();
else
new_width = aTrackItem->m_Width = g_DesignSettings.m_CurrentViaSize;
if( aTrackItem->m_Shape == VIA_MICROVIA )
new_width = aTrackItem->m_Width = g_DesignSettings.m_CurrentMicroViaSize;
{
if( net )
new_width = net->GetViaSize();
else
new_width = aTrackItem->m_Width = g_DesignSettings.m_CurrentMicroViaSize;
}
}
aTrackItem->m_Width = new_width;
if( initial_width < new_width ) /* make a DRC test because the new size is bigger than the old size */
{
int diagdrc = OK_DRC;
......@@ -46,6 +63,7 @@ bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem,
}
else if( initial_width > new_width )
change_ok = true;
// if new width == initial_width: do nothing
if( change_ok )
......@@ -75,7 +93,7 @@ bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem,
void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
{
PICKED_ITEMS_LIST itemsListPicker;
bool change = SetTrackSegmentWidth( aTrackItem, &itemsListPicker );
bool change = SetTrackSegmentWidth( aTrackItem, &itemsListPicker, false );
if( change == 0 || aTrackItem->m_Flags )
return; // No change
......@@ -84,7 +102,7 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
if( DC )
{
TRACK* oldsegm = (TRACK*) itemsListPicker.GetPickedItemLink( 0 );
wxASSERT(oldsegm);
wxASSERT( oldsegm );
DrawPanel->CursorOff( DC ); // Erase cursor shape
oldsegm->Draw( DrawPanel, DC, GR_XOR ); // Erase old track shape
aTrackItem->Draw( DrawPanel, DC, GR_OR ); // Display new track shape
......@@ -93,6 +111,7 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
SaveCopyInUndoList( itemsListPicker, UR_CHANGED );
}
/** Function Edit_Track_Width
* Modify a full track width (using DRC control).
* a full track is the set of track segments between 2 ends: pads or a point that has more than 2 segments ends connected
......@@ -108,14 +127,14 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* DC, TRACK* aTrackSegment )
if( aTrackSegment == NULL )
return;
pt_track = Marque_Une_Piste( this, DC, aTrackSegment, &nb_segm, 0 );
pt_track = Marque_Une_Piste( GetBoard(), aTrackSegment, &nb_segm, NULL, true );
PICKED_ITEMS_LIST itemsListPicker;
bool change = false;
for( int ii = 0; ii < nb_segm; ii++, pt_track = pt_track->Next() )
{
pt_track->SetState( BUSY, OFF );
if( SetTrackSegmentWidth( pt_track, &itemsListPicker ) )
if( SetTrackSegmentWidth( pt_track, &itemsListPicker, false ) )
change = true;
}
......@@ -142,26 +161,36 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* DC, TRACK* aTrackSegment )
/***********************************************************/
void WinEDA_PcbFrame::Edit_Net_Width( wxDC* DC, int Netcode )
void WinEDA_PcbFrame::Edit_Net_Width( wxDC* DC, int aNetcode )
/***********************************************************/
{
TRACK* pt_segm;
if( Netcode <= 0 )
if( aNetcode <= 0 )
return;
if( !IsOK( this, _( "Change track width (entire NET) ?" ) ) )
NETINFO_ITEM* net = GetBoard()->FindNet( aNetcode );
wxASSERT( net );
wxString netName = net->GetNetname();
wxString msg;
NETCLASS* netClass = net->GetNetClass();
wxASSERT( netClass );
wxString netClassName = netClass->GetName();
msg.Printf( _(
"Set tracks and vias sizes to the Netclass \"%s\"default value (entire NET \"%s\") ?" ),
netClassName.c_str(), netName.c_str() );
if( !IsOK( this, msg ) )
return;
/* balayage des segments */
/* Examine segments */
PICKED_ITEMS_LIST itemsListPicker;
bool change = false;
for( pt_segm = GetBoard()->m_Track; pt_segm != NULL; pt_segm = pt_segm->Next() )
{
if( Netcode != pt_segm->GetNet() ) /* mauvaise piste */
if( aNetcode != pt_segm->GetNet() ) /* not in net */
continue;
/* piste d'un net trouvee */
if( SetTrackSegmentWidth( pt_segm, &itemsListPicker ) )
/* we have found a item member of the net */
if( SetTrackSegmentWidth( pt_segm, &itemsListPicker, true ) )
change = true;
}
......@@ -200,17 +229,17 @@ bool WinEDA_PcbFrame::Resize_Pistes_Vias( wxDC* DC, bool Track, bool Via )
if( Track && Via )
{
if( !IsOK( this, _( "Edit All Tracks and Vias Sizes" ) ) )
if( !IsOK( this, _( "Set All Tracks and Vias to Netclass value" ) ) )
return FALSE;
}
else if( Via )
{
if( !IsOK( this, _( "Edit All Via Sizes" ) ) )
if( !IsOK( this, _( "Set All Via to Netclass value" ) ) )
return FALSE;
}
else if( Track )
{
if( !IsOK( this, _( "Edit All Track Sizes" ) ) )
if( !IsOK( this, _( "Set All Track to Netclass value" ) ) )
return FALSE;
}
......@@ -221,16 +250,17 @@ bool WinEDA_PcbFrame::Resize_Pistes_Vias( wxDC* DC, bool Track, bool Via )
{
if( (pt_segm->Type() == TYPE_VIA ) && Via )
{
if( SetTrackSegmentWidth( pt_segm, &itemsListPicker ) )
if( SetTrackSegmentWidth( pt_segm, &itemsListPicker, true ) )
change = true;
}
}
if( (pt_segm->Type() == TYPE_TRACK ) && Track )
{
if( SetTrackSegmentWidth( pt_segm, &itemsListPicker ) )
change = true;;
if( (pt_segm->Type() == TYPE_TRACK ) && Track )
{
if( SetTrackSegmentWidth( pt_segm, &itemsListPicker, true ) )
change = true;;
}
}
if( !change )
return false;
......
......@@ -73,7 +73,8 @@ void WinEDA_PcbFrame::ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC )
l1 = Route_Layer_TOP; l2 = Route_Layer_BOTTOM;
pt_track = Marque_Une_Piste( this, DC, pt_segm, &nb_segm, GR_XOR );
pt_track = Marque_Une_Piste( GetBoard(), pt_segm, &nb_segm, NULL, true );
Trace_Une_Piste( DrawPanel, DC, pt_track, nb_segm, GR_XOR );
/* effacement du flag BUSY et sauvegarde en membre .param de la couche
* initiale */
......
/********************************************************/
/* magnetic_tracks_functions.cpp */
/********************************************************/
/* functions used to controle the cursor position, when creating a track
* and when the "magnetic tracks" option is on
* (the current created track is kept near existing tracks
* the distance is the clearance between tracks)
*/
#include "fctsys.h"
#include "common.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "protos.h"
#include "pcbnew_id.h"
/**
* Function Join
* finds the point where line segment (b1,b0) intersects with segment (a1,a0).
* If that point would be outside of (a0,a1), the respective endpoint is used.
* Join returns the point in "res" and "true" if a suitable point was found,
* "false" if both lines are parallel or if the length of either segment is zero.
*/
static bool Join( wxPoint* res, wxPoint a0, wxPoint a1, wxPoint b0, wxPoint b1 )
{
/* References:
http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
http://www.gekkou.co.uk/blogs/monologues/2007/12/13/1197586800000.html
*/
double denom;
double t;
// if either segment is zero length
if( a1.x==a0.x && a1.y==a0.y )
return false;
if( b1.x==b0.x && b1.y==b0.y )
return false;
a1 -= a0;
b1 -= b0;
b0 -= a0;
denom = (double) b1.y * a1.x - (double) b1.x * a1.y;
if( !denom )
{
return false; // parallel
}
t = ((double) b1.y * b0.x - (double) b1.x * b0.y ) / denom;
t = min( max( t, 0.0 ), 1.0 );
res->x = wxRound( a0.x + t * a1.x );
res->y = wxRound( a0.y + t * a1.y );
return true;
}
/*
* "Project" finds the projection of a grid point on a track. This is the point
* from where we want to draw new orthogonal tracks when starting on a track.
*/
bool Project( wxPoint* res, wxPoint on_grid, const TRACK* track )
{
if( track->m_Start == track->m_End )
return false;
wxPoint vec = track->m_End - track->m_Start;
double t = double( on_grid.x - track->m_Start.x ) * vec.x +
double( on_grid.y - track->m_Start.y ) * vec.y;
t /= (double) vec.x * vec.x + (double) vec.y * vec.y;
t = min( max( t, 0.0 ), 1.0 );
res->x = wxRound( track->m_Start.x + t * vec.x );
res->y = wxRound( track->m_Start.y + t * vec.y );
return true;
}
/**
* Function Magnetize
* tests to see if there are any magnetic items within near reach of the given
* "curpos". If yes, then curpos is adjusted appropriately according to that
* near magnetic item and true is returned.
* @param curpos The initial position, and what to adjust if a change is needed.
* @return bool - true if the position was adjusted magnetically, else false.
*/
bool Magnetize( BOARD* m_Pcb, WinEDA_PcbFrame* frame,
int aCurrentTool, wxSize grid, wxPoint on_grid, wxPoint* curpos )
{
bool doCheckNet = g_MagneticPadOption != capture_always && Drc_On;
bool doTrack = false;
bool doPad = false;
bool amMovingVia = false;
TRACK* currTrack = g_CurrentTrackSegment;
BOARD_ITEM* currItem = frame->GetCurItem();
// D( printf( "currTrack=%p currItem=%p currTrack->Type()=%d currItem->Type()=%d\n", currTrack, currItem, currTrack ? currTrack->Type() : 0, currItem ? currItem->Type() : 0 ); )
if( !currTrack && currItem && currItem->Type()==TYPE_VIA && currItem->m_Flags )
{
// moving a VIA
currTrack = (TRACK*) currItem;
amMovingVia = true;
return false; // comment this return out and play with it.
}
else if( currItem != currTrack )
{
currTrack = NULL;
}
if( g_MagneticPadOption == capture_always )
doPad = true;
if( g_MagneticTrackOption == capture_always )
doTrack = true;
if( aCurrentTool == ID_TRACK_BUTT || amMovingVia )
{
int q = capture_cursor_in_track_tool;
if( g_MagneticPadOption == q )
doPad = true;
if( g_MagneticTrackOption == q )
doTrack = true;
}
// D(printf("doPad=%d doTrack=%d aCurrentTool=%d amMovingVia=%d\n", doPad, doTrack, aCurrentTool, amMovingVia );)
// The search precedence order is pads, then tracks/vias
if( doPad )
{
D_PAD* pad = Locate_Any_Pad( m_Pcb, CURSEUR_OFF_GRILLE, TRUE );
if( pad )
{
if( doCheckNet && currTrack && currTrack->GetNet() != pad->GetNet() )
return false;
*curpos = pad->m_Pos;
return true;
}
}
// after pads, only track & via tests remain, skip them if not desired
if( doTrack )
{
int layer = ( (PCB_SCREEN*) ActiveScreen )->m_Active_Layer;
for( TRACK* via = m_Pcb->m_Track;
via && (via = Locate_Via_Area( via, *curpos, layer )) != NULL;
via = via->Next() )
{
if( via != currTrack ) // a via cannot influence itself
{
if( !doCheckNet || !currTrack || currTrack->GetNet() == via->GetNet() )
{
*curpos = via->m_Start;
// D(printf("via hit\n");)
return true;
}
}
else
{
//D( printf( "skipping self\n" ); )
}
}
if( !currTrack )
{
int layer_mask = g_TabOneLayerMask[layer];
TRACK* track = Locate_Pistes( m_Pcb->m_Track, layer_mask, CURSEUR_OFF_GRILLE );
if( !track || track->Type() != TYPE_TRACK )
{
// D(printf("!currTrack and track=%p not found, layer_mask=0x%X\n", track, layer_mask );)
return false;
}
// D( printf( "Project\n" ); )
return Project( curpos, on_grid, track );
}
/*
* In two segment mode, ignore the final segment if it's inside a grid
* square.
*/
if( !amMovingVia && currTrack && g_TwoSegmentTrackBuild && currTrack->Back()
&& currTrack->m_Start.x - grid.x < currTrack->m_End.x
&& currTrack->m_Start.x + grid.x > currTrack->m_End.x
&& currTrack->m_Start.y - grid.y < currTrack->m_End.y
&& currTrack->m_Start.y + grid.y > currTrack->m_End.y )
{
currTrack = currTrack->Back();
}
for( TRACK* track = m_Pcb->m_Track; track; track = track->Next() )
{
if( track->Type() != TYPE_TRACK )
continue;
if( doCheckNet && currTrack && currTrack->GetNet() != track->GetNet() )
continue;
if( g_DesignSettings.IsLayerVisible( track->GetLayer() ) == false )
continue;
// omit the layer check if moving a via
if( !amMovingVia && !track->IsOnLayer( layer ) )
continue;
if( !track->HitTest( *curpos ) )
continue;
D(printf( "have track prospect\n");)
if( Join( curpos, track->m_Start, track->m_End, currTrack->m_Start, currTrack->m_End ) )
{
// D(printf( "join currTrack->Type()=%d\n", currTrack->Type() );)
return true;
}
if( aCurrentTool == ID_TRACK_BUTT || amMovingVia )
{
// At this point we have a drawing mouse on a track, we are drawing
// a new track and that new track is parallel to the track the
// mouse is on. Find the nearest end point of the track under mouse
// to the mouse and return that.
double distStart = hypot( double( curpos->x - track->m_Start.x ),
double( curpos->y - track->m_Start.y ));
double distEnd = hypot( double( curpos->x - track->m_End.x ),
double( curpos->y - track->m_End.y ));
// if track not via, or if its a via dragging but not with its adjacent track
if( currTrack->Type() != TYPE_VIA
|| ( currTrack->m_Start != track->m_Start && currTrack->m_Start != track->m_End ))
{
if( distStart <= currTrack->m_Width/2 )
{
// D(printf("nearest end is start\n");)
*curpos = track->m_Start;
return true;
}
if( distEnd <= currTrack->m_Width/2 )
{
// D(printf("nearest end is end\n");)
*curpos = track->m_End;
return true;
}
// @todo otherwise confine curpos such that it stays centered
// within "track"
}
}
}
}
return false;
}
......@@ -506,7 +506,7 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
track_mnu = new wxMenu;
ADD_MENUITEM_WITH_SUBMENU( PopMenu, track_mnu,
ID_POPUP_PCB_EDIT_TRACK_MNU, _(
"Change Width" ), width_track_xpm );
"Change Tracks and Vias Sizes" ), width_track_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_TRACKSEG,
Track->Type()==TYPE_VIA ? _( "Change Via Size" ) : _(
"Change Segment Width" ), width_segment_xpm );
......@@ -514,13 +514,13 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_TRACK,
_( "Change Track Width" ), width_track_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_NET,
_( "Change Net" ), width_net_xpm );
_( "Set Net to NetClass values" ), width_net_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_ALL_VIAS_AND_TRACK_SIZE,
_( "Change ALL Tracks and Vias" ), width_track_via_xpm );
_( "Set ALL Tracks and Vias to NetClass Values" ), width_track_via_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_ALL_VIAS_SIZE,
_( "Change ALL Vias (No Track)" ), width_vias_xpm );
_( "Set ALL Vias (No Track)to NetClass Values" ), width_vias_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_ALL_TRACK_SIZE,
_( "Change ALL Tracks (No Via)" ), width_track_xpm );
_( "Set ALL Tracks (No Via)to NetClass Values" ), width_track_xpm );
}
// Delete control:
......
......@@ -262,17 +262,24 @@ void Calcule_Coord_Extremite_45( int ox, int oy, int* fx, int* fy );
/*****************/
/* TRACK.CPP : */
/*****************/
TRACK* Marque_Une_Piste( WinEDA_BasePcbFrame* frame, wxDC* DC,
TRACK* pt_segm, int* nb_segm, int flagcolor );
/* Routine de Marquage de 1 piste, a partir du segment pointe par pt_segm.
* le segment pointe est marque puis les segments adjacents
* jusqu'a un pad ou un point de jonction de plus de 2 segments
* le marquage est la mise a 1 du bit BUSY du parametre .status
* Les segments sont ensuite reclasses pour etre contigus en memoire
* Retourne:
* adresse du 1er segment de la chaine creee
* nombre de segments */
/**
* Function Marque_Une_Piste
* marks a chain of track segments, connected to aTrackList.
* Each segment is marked by setting the BUSY bit into m_Flags. Electrical continuity
* is detected by walking each segment, and finally the segments are rearranged
* into a contiguous chain within the given list.
* @param aPcb = the board to analyse
* @param aStartSegm The first interesting segment within a list of track segment of aPcb
* @param aSegmCount = a pointer to an integer where to return the number of interesting segments
* @param aTrackLen = a pointer to an integer where to return the lenght of the track
* @param aReorder =
* true for reorder the interesting segments (useful for track edition/deletion)
* in this case the flag BUSY is set (the user is responsible of flag clearing)
* false for no reorder : useful when we want just calculate the track lenght
* in this case, flags are reset
* @return TRACK* the first in the chain of interesting segments.
*/
TRACK* Marque_Une_Piste( BOARD * aPcb, TRACK* aStartSegm, int* aSegmCount, int * aTrackLen, bool aReorder );
int ReturnEndsTrack( TRACK* RefTrack, int NbSegm,
TRACK** StartTrack, TRACK** EndTrack );
......
......@@ -49,7 +49,7 @@ int WinEDA_PcbFrame::EraseRedundantTrack( wxDC* aDC, TRACK* aNewTrack, int aNewT
if( aNewTrack->Type() == TYPE_VIA && (aNewTrackSegmentsCount > 1 ) )
aNewTrack = aNewTrack->Next();
aNewTrack = Marque_Une_Piste( this, aDC, aNewTrack, &aNewTrackSegmentsCount, 0 );
aNewTrack = Marque_Une_Piste( GetBoard(), aNewTrack, &aNewTrackSegmentsCount, NULL, true );
wxASSERT( aNewTrack );
#if 0 && defined(DEBUG)
......@@ -204,7 +204,7 @@ int WinEDA_PcbFrame::EraseRedundantTrack( wxDC* aDC, TRACK* aNewTrack, int aNewT
nbconnect--;
pt_del->SetState( CHAIN, OFF );
pt_del = Marque_Une_Piste( this, aDC, pt_del, &nb_segm, 0 );
pt_del = Marque_Une_Piste( GetBoard(), pt_del, &nb_segm, NULL, true );
/* Test si La piste marquee est redondante, c'est a dire si l'un des
* segments marques est connecte au point de depart de la piste nouvelle
......
/*********************************************/
/* Edition des pistes: Routines d'effacement */
/* Effacement de segment, piste, net et zone */
/*********************************************/
/*********************************************
* track.cpp
*********************************************/
#include "fctsys.h"
......@@ -10,63 +9,63 @@
#include "protos.h"
/* Functions to reconize a track.
* A track is a list of connected segments (or/and vias)
* from a starting to an ending point
* starting and ending points are a pad or a point with more than 2 segments connected
* (and obviouly a dangling segment end)
*/
typedef std::vector<TRACK*> TRACK_PTRS;
/* Routines externes : */
void Montre_Position_New_Piste( int flag );/* defini dans editrack.cc */
typedef std::vector<TRACK*> TRACK_PTRS; // buffer of item candidates when search for items on the same track
/* Routines Locales */
/* Local functions */
static void Marque_Chaine_segments( BOARD* Pcb, wxPoint ref_pos, int masklayer, TRACK_PTRS* aList );
/* Variables locales */
/* Routine de Marquage de 1 piste, a partir du segment pointe par pt_segm.
* le segment pointe est marque puis les segments connectes
* jusqu'a un pad ou un point de jonction de plus de 2 segments
* le marquage est la mise a 1 du bit BUSY
* Les segments sont ensuite reclasses pour etre contigus en liste chainee
* Retourne:
* adresse du 1er segment de la chaine creee
* nombre de segments
*/
/**
* Function Marque_Une_Piste
* marks a chain of track segments, starting at aTrackList.
* marks a chain of track segments, connected to aTrackList.
* Each segment is marked by setting the BUSY bit into m_Flags. Electrical continuity
* is detected by walking each segment, and finally the segments are rearranged
* into a contiguous chain within the given list.
* @param aTrackList The first interesting segment within a list of many
* interesting and uninteresting segments.
* @param aPcb = the board to analyse
* @param aStartSegm The first interesting segment within a list of track segment of aPcb
* @param aSegmCount = a pointer to an integer where to return the number of interesting segments
* @param aTrackLen = a pointer to an integer where to return the lenght of the track
* @param aReorder = bool:
* true for reorder the interesting segments (useful for track edition/deletion)
* in this case the flag BUSY is set (the user is responsible of flag clearing)
* false for no reorder : useful when we want just calculate the track lenght
* in this case, flags are reset
* @return TRACK* the first in the chain of interesting segments.
*/
TRACK* Marque_Une_Piste( WinEDA_BasePcbFrame* frame, wxDC* DC,
TRACK* aTrackList, int* nb_segm, int flagcolor )
TRACK* Marque_Une_Piste( BOARD* aPcb,
TRACK* aStartSegm,
int* aSegmCount,
int* aTrackLen,
bool aReorder )
{
int NbSegmBusy;
int NbSegmBusy;
TRACK_PTRS trackList;
TRACK_PTRS trackList;
*nb_segm = 0;
if( aTrackList == NULL )
return NULL;
if( aSegmCount )
*aSegmCount = 0;
if( flagcolor )
aTrackList->Draw( frame->DrawPanel, DC, flagcolor );
if( aStartSegm == NULL )
return NULL;
// Ensure the flag BUSY is cleared because we use it to mark segments of the track
for( TRACK* track = frame->GetBoard()->m_Track; track; track = track->Next() )
track->SetState( BUSY , OFF );
// Ensure the flag BUSY of all tracks of the board is cleared
// because we use it to mark segments of the track
for( TRACK* track = aPcb->m_Track; track; track = track->Next() )
track->SetState( BUSY, OFF );
/* Set flags of the initial track segment */
aTrackList->SetState( BUSY, ON );
int masque_layer = aTrackList->ReturnMaskLayer();
aStartSegm->SetState( BUSY, ON );
int masque_layer = aStartSegm->ReturnMaskLayer();
trackList.push_back( aTrackList );
trackList.push_back( aStartSegm );
/* Examine the initial track segment : if it is really a segment, this is easy.
* If it is a via, one must search for connected segments.
......@@ -74,85 +73,106 @@ TRACK* Marque_Une_Piste( WinEDA_BasePcbFrame* frame, wxDC* DC,
* and this via and these 2 segments are a part of a track.
* If > 2 only this via is flagged (the track has only this via)
*/
if( aTrackList->Type() == TYPE_VIA )
if( aStartSegm->Type() == TYPE_VIA )
{
TRACK* Segm1, * Segm2 = NULL, * Segm3 = NULL;
Segm1 = Fast_Locate_Piste( frame->GetBoard()->m_Track, NULL,
aTrackList->m_Start, masque_layer );
Segm1 = Fast_Locate_Piste( aPcb->m_Track, NULL,
aStartSegm->m_Start, masque_layer );
if( Segm1 )
{
Segm2 = Fast_Locate_Piste( Segm1->Next(), NULL,
aTrackList->m_Start, masque_layer );
aStartSegm->m_Start, masque_layer );
}
if( Segm2 )
{
Segm3 = Fast_Locate_Piste( Segm2->Next(), NULL,
aTrackList->m_Start, masque_layer );
aStartSegm->m_Start, masque_layer );
}
if( Segm3 ) // More than 2 segments are connected to this via. the "track" is only this via
{
*nb_segm = 1;
return aTrackList;
if( aSegmCount )
*aSegmCount = 1;
return aStartSegm;
}
if( Segm1 ) // search for others segments connected to the initial segment start point
{
masque_layer = Segm1->ReturnMaskLayer();
Marque_Chaine_segments( frame->GetBoard(), aTrackList->m_Start, masque_layer, &trackList );
Marque_Chaine_segments(
aPcb, aStartSegm->m_Start, masque_layer, &trackList );
}
if( Segm2 ) // search for others segments connected to the initial segment end point
{
masque_layer = Segm2->ReturnMaskLayer();
Marque_Chaine_segments( frame->GetBoard(), aTrackList->m_Start, masque_layer, &trackList );
Marque_Chaine_segments(
aPcb, aStartSegm->m_Start, masque_layer, &trackList );
}
}
else // mark the chain using both ends of the initial segment
{
Marque_Chaine_segments( frame->GetBoard(), aTrackList->m_Start, masque_layer, &trackList );
Marque_Chaine_segments( frame->GetBoard(), aTrackList->m_End, masque_layer, &trackList );
Marque_Chaine_segments( aPcb, aStartSegm->m_Start, masque_layer, &trackList );
Marque_Chaine_segments( aPcb, aStartSegm->m_End, masque_layer, &trackList );
}
// marquage des vias (vias non connectees ou inutiles
// Now we examine selected vias and flag them if they are on the track
// If a via is connected to only one or 2 segments, it is flagged (is on the track)
// If a via is connected to more than 2 segments, it is a track end, and it is removed from the list
// go through the list backwards.
for( int i = trackList.size()-1; i>=0; --i )
for( int i = trackList.size() - 1; i>=0; --i )
{
TRACK* via = trackList[i];
TRACK* via = trackList[i];
if( via->Type() != TYPE_VIA )
continue;
if( via == aTrackList )
if( via == aStartSegm )
continue;
via->SetState( BUSY, ON );
via->SetState( BUSY, ON ); // Try to flag it. the flag will be cleared later if needed
masque_layer = via->ReturnMaskLayer();
TRACK* track = Fast_Locate_Piste( frame->GetBoard()->m_Track,
NULL, via->m_Start, masque_layer );
TRACK* track = Fast_Locate_Piste( aPcb->m_Track, NULL, via->m_Start, masque_layer );
// Fast_Locate_Piste does not consider tracks flagged BUSY.
// So if no connected track found, this via is on the current track only: keep it
if( track == NULL )
continue;
/* Test des connexions: si via utile: suppression marquage */
/* if a track is found, this via connects also others segments of an other track
* This case happens when the vias ends the selected track.
* But must we consider this via is on the selected track, or on an other track.
* (this is important when selecting a track for deletion: must this via be deleted or not?)
* We consider here this via on the track if others segment connected to this via
* remain connected when removing this via.
* We search for all others segment connected together:
* if there are on the same layer, the via is on the selected track
* if there are on different layers, the via is on an other track
*/
int layer = track->GetLayer();
while( ( track = Fast_Locate_Piste( track->Next(), NULL,
via->m_Start, masque_layer ) ) != NULL )
via->m_Start, masque_layer ) ) != NULL )
{
if( layer != track->GetLayer() )
{
// The via connects segments of an other track: it is removed from list
// because it is member of an other track
via->SetState( BUSY, OFF );
break;
}
}
}
/* Reclassement des segments marques en une chaine */
/* Rearrange the track list in order to have flagged segments linked from firstTrack
* So the NbSegmBusy segments are consecutive segments in list, the first item
* in the full track list is firstTrack, and the NbSegmBusy-1 next items
* (NbSegmBusy when including firstTrack) are the flagged segments
*/
NbSegmBusy = 0;
TRACK* firstTrack;
for( firstTrack = frame->GetBoard()->m_Track; firstTrack; firstTrack = firstTrack->Next() )
for( firstTrack = aPcb->m_Track; firstTrack; firstTrack = firstTrack->Next() )
{
// recherche du debut de la liste des segments marques a BUSY
// Search for the first flagged BUSY segments
if( firstTrack->GetState( BUSY ) )
{
NbSegmBusy = 1;
......@@ -160,133 +180,176 @@ TRACK* Marque_Une_Piste( WinEDA_BasePcbFrame* frame, wxDC* DC,
}
}
wxASSERT( firstTrack );
if( firstTrack == NULL )
return NULL;
if( firstTrack )
double full_len = 0;
if( aReorder )
{
DLIST<TRACK>* list = (DLIST<TRACK>*)firstTrack->GetList();
wxASSERT(list);
wxASSERT( list );
/* Reclassement de la chaine debutant a FirstTrack et finissant
* au dernier segment marque. FirstTrack n'est pas modifie
/* Rearrange the chain starting at firstTrack
* All others flagged items are moved from their position to the end
* of the flagged list
*/
TRACK* next;
for( TRACK* track = firstTrack->Next(); track; track = next )
{
next = track->Next();
if( track->GetState( BUSY ) )
if( track->GetState( BUSY ) ) // move it!
{
NbSegmBusy++;
track->UnLink();
list->Insert( track, firstTrack->Next() );
if( aTrackLen )
full_len += track->GetLength();
}
}
}
else if( aTrackLen )
{
NbSegmBusy = 0;
for( TRACK* track = firstTrack; track; track = track->Next() )
{
if( track->GetState( BUSY ) )
{
NbSegmBusy++;
track->SetState( BUSY, OFF );
full_len += track->GetLength();
}
}
}
*nb_segm = NbSegmBusy;
if( flagcolor )
Trace_Une_Piste( frame->DrawPanel, DC, firstTrack, NbSegmBusy, flagcolor );
if( aTrackLen )
*aTrackLen = wxRound( full_len );
if( aSegmCount )
*aSegmCount = NbSegmBusy;
return firstTrack;
}
/********************************************************************************/
static void Marque_Chaine_segments( BOARD* Pcb, wxPoint ref_pos, int masque_layer, TRACK_PTRS* aList )
static void Marque_Chaine_segments( BOARD* aPcb, wxPoint aRef_pos, int aLayerMask,
TRACK_PTRS* aList )
/********************************************************************************/
/*
* routine utilisee par Supprime_1_Piste()
* Positionne le bit BUSY dans la chaine de segments commencant
* au point ox, oy sur la couche layer
*
* Les vias sont mises en liste des segments traites mais ne sont pas
* marquees.
/**
* Function used by Marque_Une_Piste()
* - Set the BUSY flag of connected segments, the first search point is
* ref_pos on layers allowed in masque_layer
* - Put segments fount in aList
* Vias are put in list but their flags BUSY is not set
* @param Pcb = the board
* @param aRef_pos = the reference coordinate of the starting search
* @param aLayerMask = the allowed layers for segments to search
* (1 layer when starting point is on a segment, but more than one when starting point is on a via)
* @param aList = the track list to fill with points of segments flagged
*/
{
TRACK* pt_segm, // Pointe le segment courant analyse
* pt_via, // pointe la via reperee, eventuellement a detruire
* MarqSegm; // pointe le segment a detruire (= NULL ou pt_segm
int NbSegm;
TRACK* pt_segm, // Pointe le segment courant analyse
* pt_via, // pointe la via reperee, eventuellement a detruire
* SegmentCandidate; // pointe le segment a detruire (= NULL ou pt_segm
int NbSegm;
if( Pcb->m_Track == NULL )
if( aPcb->m_Track == NULL )
return;
/* Marquage de la chaine */
/* Set the BUSY flag of all connected segments, first search starting at aRef_pos
* Search ends when:
* - a pad is found (end of a track)
* - a segment found is flagged "EDIT"
* - a segment end has more than one other segment end connected
* - and obviously when no connected item found
* Vias are a special case, because we must see others segment connected on others layers
* and they change the layer mask. They can be a track end or not
* They will be analyser later, and vias on terminal points of the track will be
* considered as part of this track if they do not connect segments of an other track together
* and will be considered as part of an other track
* if when removing the via, the segments of taht other track are disconnected
*/
for( ; ; )
{
if( Fast_Locate_Pad_Connecte( Pcb, ref_pos, masque_layer ) != NULL )
if( Fast_Locate_Pad_Connecte( aPcb, aRef_pos, aLayerMask ) != NULL )
return;
/* Localisation d'une via (car elle connecte plusieurs segments) */
pt_via = Fast_Locate_Via( Pcb->m_Track, NULL, ref_pos, masque_layer );
/* Test for a via: a via changes the layer mask and can connect a lot of segments
* at location aRef_pos
* When found, the via is just pushed in list.
* Vias will be examined later, when all connected segment are found and push in list
* This is because whena via is found we do not know at this time the number of connected items
* and we do not know if this via is on the track or finish the track
*/
pt_via = Fast_Locate_Via( aPcb->m_Track, NULL, aRef_pos, aLayerMask );
if( pt_via )
{
if( pt_via->GetState( EDIT ) )
return;
masque_layer = pt_via->ReturnMaskLayer();
aLayerMask = pt_via->ReturnMaskLayer();
aList->push_back( pt_via );
}
/* Recherche des segments connectes au point ref_pos
* si 1 segment: peut etre marque
* si > 1 segment:
* le segment ne peut etre marque
/* Now we search all segments connected to point aRef_pos
* if only 1 segment: this segment is candidate
* if > 1 segment:
* end of track (more than 2 segment connected at this location)
*/
pt_segm = Pcb->m_Track; MarqSegm = NULL;
pt_segm = aPcb->m_Track; SegmentCandidate = NULL;
NbSegm = 0;
while( ( pt_segm = Fast_Locate_Piste( pt_segm, NULL,
ref_pos, masque_layer ) ) != NULL )
aRef_pos, aLayerMask ) ) != NULL )
{
if( pt_segm->GetState( EDIT ) ) /* Fin de piste */
if( pt_segm->GetState( EDIT ) ) // End of track
return;
if( pt_segm->GetState( BUSY ) )
if( pt_segm->GetState( BUSY ) ) // already found and selected: skip it
{
pt_segm = pt_segm->Next();
continue;
}
if( pt_segm == pt_via ) /* deja traite */
if( pt_segm == pt_via ) // just previously found: skip it
{
pt_segm = pt_segm->Next();
continue;
}
NbSegm++;
if( NbSegm == 1 ) /* 1ere detection de segment de piste */
if( NbSegm == 1 ) /* First time we found a connected item: pt_segm is candidate */
{
MarqSegm = pt_segm;
pt_segm = pt_segm->Next();
SegmentCandidate = pt_segm;
pt_segm = pt_segm->Next();
}
else /* 2eme detection de segment -> fin de piste */
else /* More than 1 segment connected -> this location is an end of the track */
{
return;
}
}
if( MarqSegm )
if( SegmentCandidate ) // A candidate is found: flag it an push it in list
{
/* preparation de la nouvelle recherche */
masque_layer = MarqSegm->ReturnMaskLayer();
/* Initialize parameters to search items connected to this candidate:
* we must analyse connections to its other end
*/
aLayerMask = SegmentCandidate->ReturnMaskLayer();
if( ref_pos == MarqSegm->m_Start )
if( aRef_pos == SegmentCandidate->m_Start )
{
ref_pos = MarqSegm->m_End;
aRef_pos = SegmentCandidate->m_End;
}
else
{
ref_pos = MarqSegm->m_Start;
aRef_pos = SegmentCandidate->m_Start;
}
pt_segm = Pcb->m_Track; /* reinit recherche des segments */
pt_segm = aPcb->m_Track; /* restart list of tracks to analyse */
/* Marquage et mise en liste du segment */
aList->push_back( MarqSegm );
MarqSegm->SetState( BUSY, ON );
/* flag this item an push it in list of selected items */
aList->push_back( SegmentCandidate );
SegmentCandidate->SetState( BUSY, ON );
}
else
return;
......@@ -299,12 +362,14 @@ int ReturnEndsTrack( TRACK* RefTrack, int NbSegm,
TRACK** StartTrack, TRACK** EndTrack )
/**********************************************************/
/* Calcule les coordonnes des extremites d'une piste
* retourne 1 si OK, 0 si piste bouclee
* Retourne dans *StartTrack en *EndTrack les segments de debut et fin
* Les coord StartTrack->m_Start.x, m_Start.y contiennent le debut de la piste
* Les coord EndTrack->m_End.x, m_End.y contiennent le debut de la piste
* Les segments sont supposes chaines de facon consecutive
/* Calculate the end points coordinates of a track (a list of connected segments)
* RefTrack is a segment of the track
* return 1 if OK, 0 when a track is a closed loop
* and the beginning and the end of the track in *StartTrack and *EndTrack
* Modify *StartTrack en *EndTrack :
* (*StartTrack)->m_Start coordinate is the beginning of the track
* (*EndTrack)->m_End coordinate is the end of the track
* Segments connected must be consecutives in list
*/
{
TRACK* Track, * via, * segm, * TrackListEnd;
......@@ -433,7 +498,7 @@ int ReturnEndsTrack( TRACK* RefTrack, int NbSegm,
void ListSetState( EDA_BaseStruct* Start, int NbItem, int State, int onoff )
/***************************************************************************/
/* Met a jour le membre .state d'une chaine de structures
/* Set to onoff the .m_State member, bit mask State of a list of items
*/
{
if( Start == NULL )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment