Commit 56d95e00 authored by charras's avatar charras

minor fixes.

parent 56cb99c7
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
* under GNU General Public License (see copyright.txt) * under GNU General Public License (see copyright.txt)
== Main Author == Main Author
Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> Jean-Pierre Charras <jean-pierre.charras[at]gipsa-lab-dot-inpg-dot-fr>
Maitre de Conferences
IUT1 GEII2 IUT1 GEII2
Universite Joseph Fourier (U.J.F.) Universite Joseph Fourier (U.J.F.)
Saint Martin d'Hres (38402) Saint Martin d'Hres (38402)
...@@ -12,34 +11,38 @@ Laboratiore GIPSA-Lab ...@@ -12,34 +11,38 @@ Laboratiore GIPSA-Lab
Saint Martin d'Hres Saint Martin d'Hres
== Contributors == Contributors
Dick Hollenbeck <dick@softplc.com> Dick Hollenbeck <dick[at]softplc-dot-com>
Jerry Jacobs <xor.gate.engineering@gmail.com> Hauptmech <hauptmech[at]gmail-dot-com>
Jonas Diemer <diemer@gmx.de> Jerry Jacobs <xor.gate.engineering[at]gmail-dot-com>
Jonas Diemer <diemer[at]gmx-dot-de>
KBool Library http://boolean.klaasholwerda.nl/bool.html KBool Library http://boolean.klaasholwerda.nl/bool.html
Rok Markovic <rok@kanardia.eu> Lorenzo <lomarcan[at]tin-dot-it>
Tim Hanson <sideskate@gmail.com> Marco Serantoni <marco.serantoni[at]gmail-dot-com> (OSX maintener)
Vesa Solonen <vesa.solonen@hut.fi> Rok Markovic <rok[at]kanardia.eu>
Wayne Stambaugh <stambaughw@verizon.net> Tim Hanson <sideskate[at]gmail-dot-com>
Vesa Solonen <vesa.solonen[at]hut-dot-fi>
Wayne Stambaugh <stambaughw[at]verizon-dot-net>
See also CHANGELOG.txt for contributors. See also CHANGELOG.txt for contributors.
== Document Writers == Document Writers
Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> Jean-Pierre Charras <jean-pierre.charras[at]gipsa-lab.inpg.fr>
Igor Plyatov <plyatov@gmail.com> Igor Plyatov <plyatov[at]gmail.com>
== Translators == Translators
Czech (CZ) Martin Kratoška <martin@ok1rr.com> Czech (CZ) Martin Kratoška <martin[at]ok1rr-dot-com>
Dutch (NL) Jerry Jacobs <xor.gate.engineering@gmail.com> Dutch (NL) Jerry Jacobs <xor.gate.engineering[at]gmail-dot-com>
Finnish (FI) Vesa Solonen <vesa.solonen@hut.fi> Finnish (FI) Vesa Solonen <vesa.solonen[at]hut-dot-fi>
French (FR) Jean-Pierre Charras <jean-pierre.charras@inpg.fr> French (FR) Jean-Pierre Charras <jean-pierre.charras[at]inpg-dot-fr>
Polish (PL) Mateusz Skowroski <skowri@gmail.com> Polish (PL) Mateusz Skowroski <skowri[at]gmail-dot-com>
Portuguese (PT) Renie Marquet <reniemarquet@uol.com.br>" Portuguese (PT) Renie Marquet <reniemarquet[at]uol-dot-com-dot-br>"
Russian (RU) Igor Plyatov <plyatov@gmail.com> Russian (RU) Igor Plyatov <plyatov[at]gmail-dot-com>
Spanish (ES) Pedro Martin del Valle <pkicad@yahoo.es> Spanish (ES) Pedro Martin del Valle <pkicad[at]yahoo-dot-es>
Spanish (ES) Iigo Zuluaga <inigo_zuluaga@yahoo.es> Spanish (ES) Iigo Zuluaga <inigo_zuluaga[at]yahoo-dot-es>
German (DE) Rafael Sokolowski <Rafael.Sokolowski[at]web-dot-de
Remy Halvick, David Briscoe, Dominique Laigle, Paul Burke Remy Halvick, David Briscoe, Dominique Laigle, Paul Burke
== Programm credits for icons and others == Programm credits for icons and others
Icons by Iigo Zuluagaz <inigo_zuluaga@yahoo.es> Icons by Iigo Zuluagaz <inigo_zuluaga[at]yahoo-dot-es>
3D modules by Renie Marquet <reniemarquet@uol.com.br> 3D modules by Renie Marquet <reniemarquet[at]uol.com-dot-br>
3D modules by Christophe Boschat <nox454@hotmail.fr> 3D modules by Christophe Boschat <nox454[at]hotmail-dot-fr>
...@@ -704,10 +704,12 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef( ...@@ -704,10 +704,12 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef(
#if defined(KICAD_GOST) #if defined(KICAD_GOST)
Unit = aList[ii].m_Unit + '1' - 1; Unit = aList[ii].m_Unit + '1' - 1;
#else #else
Unit = aList[ii].m_Unit + 'A' - 1; Unit = aList[ii].m_Unit + 'A' - 1;
#endif #endif
...@@ -719,6 +721,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef( ...@@ -719,6 +721,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef(
#if defined(KICAD_GOST) #if defined(KICAD_GOST)
fprintf( f, "%s%c%s%c%s", CmpName, s_ExportSeparatorSymbol, fprintf( f, "%s%c%s%c%s", CmpName, s_ExportSeparatorSymbol,
CONV_TO_UTF8( DrawLibItem->GetField( CONV_TO_UTF8( DrawLibItem->GetField(
VALUE )->m_Text ), s_ExportSeparatorSymbol, VALUE )->m_Text ), s_ExportSeparatorSymbol,
...@@ -726,6 +729,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef( ...@@ -726,6 +729,7 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef(
#else #else
fprintf( f, "%s%c%s", CmpName, s_ExportSeparatorSymbol, fprintf( f, "%s%c%s", CmpName, s_ExportSeparatorSymbol,
CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ) ); CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ) );
#endif #endif
...@@ -734,12 +738,14 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef( ...@@ -734,12 +738,14 @@ int DIALOG_BUILD_BOM::PrintComponentsListByRef(
#if defined(KICAD_GOST) #if defined(KICAD_GOST)
fprintf( f, "| %-10s %-12s %-20s", CmpName, fprintf( f, "| %-10s %-12s %-20s", CmpName,
CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ), CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ),
CONV_TO_UTF8( DrawLibItem->GetField( DATASHEET )->m_Text ) ); CONV_TO_UTF8( DrawLibItem->GetField( DATASHEET )->m_Text ) );
#else #else
fprintf( f, "| %-10s %-12s", CmpName, fprintf( f, "| %-10s %-12s", CmpName,
CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ) ); CONV_TO_UTF8( DrawLibItem->GetField( VALUE )->m_Text ) );
#endif #endif
...@@ -799,19 +805,15 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart( ...@@ -799,19 +805,15 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
std::vector <OBJ_CMP_TO_LIST>& aList ) std::vector <OBJ_CMP_TO_LIST>& aList )
{ {
int qty = 1; int qty = 1;
char RefName[256]; wxString RefName;
wxString ValName, NxtName; wxString ValName;
char RNames[2000]; wxString NxtName;
wxString RNames;
EDA_BaseStruct* DrawList; EDA_BaseStruct* DrawList;
EDA_BaseStruct* NxtList; EDA_BaseStruct* NxtList;
SCH_COMPONENT* DrawLibItem; SCH_COMPONENT* DrawLibItem;
SCH_COMPONENT* NxtLibItem; SCH_COMPONENT* NxtLibItem;
SCH_COMPONENT* m_Cmp; SCH_COMPONENT dummyCmp; // A dummy component, to store fields
SCH_COMPONENT Cmp;
NxtName = wxT ("");
strcpy( RNames, "" );
m_Cmp = &Cmp;
for( unsigned ii = 0; ii < aList.size(); ii++ ) for( unsigned ii = 0; ii < aList.size(); ii++ )
{ {
...@@ -823,15 +825,14 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart( ...@@ -823,15 +825,14 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
if( aList[ii].m_Reference[0] == '#' ) if( aList[ii].m_Reference[0] == '#' )
continue; continue;
DrawLibItem = (SCH_COMPONENT*) DrawList; DrawLibItem = (SCH_COMPONENT*) DrawList;
if( (DrawLibItem->GetField( VALUE )->m_Text.IsEmpty()) ) if( ( DrawLibItem->GetField( VALUE )->m_Text.IsEmpty() ) )
continue; continue;
// m_Cmp = DrawLibItem->GenCopy();
// Store fields. try to store non empty fields. // Store fields. Store non empty fields only.
for( int jj = FOOTPRINT; jj < DrawLibItem->GetFieldCount(); jj++ ) for( int jj = FOOTPRINT; jj < DrawLibItem->GetFieldCount(); jj++ )
{ {
if( ! DrawLibItem->GetField( jj )->m_Text.IsEmpty() ) if( !DrawLibItem->GetField( jj )->m_Text.IsEmpty() )
m_Cmp->GetField( jj )->m_Text = DrawLibItem->GetField( jj )->m_Text; dummyCmp.GetField( jj )->m_Text = DrawLibItem->GetField( jj )->m_Text;
} }
NxtLibItem = NULL; NxtLibItem = NULL;
...@@ -845,45 +846,49 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart( ...@@ -845,45 +846,49 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
if( aList[ij].m_Reference[0] == '#' ) if( aList[ij].m_Reference[0] == '#' )
continue; continue;
NxtLibItem = (SCH_COMPONENT*) NxtList; NxtLibItem = (SCH_COMPONENT*) NxtList;
if( (NxtLibItem->GetField( VALUE )->m_Text.IsEmpty()) ) { if( ( NxtLibItem->GetField( VALUE )->m_Text.IsEmpty() ) )
continue; {
} continue;
}
break; break;
} }
if( NxtLibItem != NULL ) if( NxtLibItem != NULL )
NxtName = NxtLibItem->GetField( VALUE )->m_Text; NxtName = NxtLibItem->GetField( VALUE )->m_Text;
else else
NxtName = wxT (""); NxtName = wxT( "" );
sprintf( RefName, "%s", aList[ii].m_Reference ); RefName = CONV_FROM_UTF8( aList[ii].m_Reference );
ValName = DrawLibItem->GetField( VALUE )->m_Text ; ValName = DrawLibItem->GetField( VALUE )->m_Text;
if( !NxtName.CmpNoCase(ValName )) { if( !NxtName.CmpNoCase( ValName ) )
{
qty++; qty++;
strcat( RNames, ", " ); RNames << wxT( ", " ) << RefName;
strcat( RNames, RefName ); continue;
continue;
} }
fprintf( f, "%15s%c%3d", CONV_TO_UTF8(ValName), s_ExportSeparatorSymbol, qty ); fprintf( f, "%15s%c%3d", CONV_TO_UTF8( ValName ), s_ExportSeparatorSymbol, qty );
qty = 1; qty = 1;
if( m_AddFootprintField->IsChecked() ) if( m_AddFootprintField->IsChecked() )
fprintf( f, "%c%15s", s_ExportSeparatorSymbol, fprintf( f, "%c%15s", s_ExportSeparatorSymbol,
CONV_TO_UTF8( DrawLibItem->GetField( FOOTPRINT )->m_Text ) ); CONV_TO_UTF8( DrawLibItem->GetField( FOOTPRINT )->m_Text ) );
// for( int jj = FIELD1; jj < DrawLibItem->GetFieldCount(); jj++ ) // print fields
for( int jj = FIELD1; jj < FIELD5 ; jj++ ) for( int jj = FIELD1; jj < FIELD5; jj++ )
fprintf( f, "%c%12s", s_ExportSeparatorSymbol, fprintf( f, "%c%12s", s_ExportSeparatorSymbol,
CONV_TO_UTF8( m_Cmp->GetField( jj )->m_Text ) ); CONV_TO_UTF8( dummyCmp.GetField( jj )->m_Text ) );
fprintf( f, "%c%s%s", s_ExportSeparatorSymbol, RefName, RNames ); fprintf( f, "%c%s%s", s_ExportSeparatorSymbol,
CONV_TO_UTF8( RefName ),
CONV_TO_UTF8( RNames ) );
fputs( "\n", f ); fputs( "\n", f );
strcpy( RNames, "" ); // Clear strings, to prepare next component
RNames.Empty();
for( int jj = FOOTPRINT; jj < DrawLibItem->GetFieldCount(); jj++ ) for( int jj = FOOTPRINT; jj < DrawLibItem->GetFieldCount(); jj++ )
m_Cmp->GetField( jj )->m_Text = wxT (""); dummyCmp.GetField( jj )->m_Text.Empty();
} }
return 0; return 0;
......
No preview for this file type
This diff is collapsed.
...@@ -313,13 +313,13 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind ...@@ -313,13 +313,13 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
wxStaticBoxSizer* m_LayersSizer; wxStaticBoxSizer* m_LayersSizer;
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL ); m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
m_PadLayerCu = new wxCheckBox( this, wxID_ANY, _("Copper layer"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadLayerCmp = new wxCheckBox( this, wxID_ANY, _("Component layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayersSizer->Add( m_PadLayerCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_LayersSizer->Add( m_PadLayerCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerCmp = new wxCheckBox( this, wxID_ANY, _("Component layer"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadLayerCu = new wxCheckBox( this, wxID_ANY, _("Copper layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayersSizer->Add( m_PadLayerCmp, 0, wxALL, 5 ); m_LayersSizer->Add( m_PadLayerCu, 0, wxALL, 5 );
m_LayersSizer->Add( 0, 8, 1, wxEXPAND, 5 ); m_LayersSizer->Add( 0, 8, 1, wxEXPAND, 5 );
...@@ -356,17 +356,17 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind ...@@ -356,17 +356,17 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_LayersSizer->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_LayersSizer->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerDraft = new wxCheckBox( this, wxID_ANY, _("Draft layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayersSizer->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerECO1 = new wxCheckBox( this, wxID_ANY, _("E.C.O.1 layer"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadLayerECO1 = new wxCheckBox( this, wxID_ANY, _("E.C.O.1 layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayersSizer->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_LayersSizer->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_PadLayerECO2 = new wxCheckBox( this, wxID_ANY, _("E.C.O.2 layer"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadLayerECO2 = new wxCheckBox( this, wxID_ANY, _("E.C.O.2 layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayersSizer->Add( m_PadLayerECO2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_LayersSizer->Add( m_PadLayerECO2, 0, wxALL, 5 );
m_PadLayerDraft = new wxCheckBox( this, wxID_ANY, _("Draft layer"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayersSizer->Add( m_PadLayerDraft, 0, wxALL, 5 );
m_RightBoxSizer->Add( m_LayersSizer, 0, 0, 5 ); m_RightBoxSizer->Add( m_LayersSizer, 0, 0, 5 );
......
...@@ -3461,10 +3461,10 @@ ...@@ -3461,10 +3461,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Copper layer</property> <property name="label">Component layer</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PadLayerCu</property> <property name="name">m_PadLayerCmp</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -3513,10 +3513,10 @@ ...@@ -3513,10 +3513,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Component layer</property> <property name="label">Copper layer</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PadLayerCmp</property> <property name="name">m_PadLayerCu</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -3991,10 +3991,10 @@ ...@@ -3991,10 +3991,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">E.C.O.1 layer</property> <property name="label">Draft layer</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PadLayerECO1</property> <property name="name">m_PadLayerDraft</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -4043,10 +4043,10 @@ ...@@ -4043,10 +4043,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">E.C.O.2 layer</property> <property name="label">E.C.O.1 layer</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PadLayerECO2</property> <property name="name">m_PadLayerECO1</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
...@@ -4095,10 +4095,10 @@ ...@@ -4095,10 +4095,10 @@
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Draft layer</property> <property name="label">E.C.O.2 layer</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_PadLayerDraft</property> <property name="name">m_PadLayerECO2</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
......
...@@ -109,8 +109,8 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog ...@@ -109,8 +109,8 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxTextCtrl* m_SolderPasteMarginRatioCtrl; wxTextCtrl* m_SolderPasteMarginRatioCtrl;
wxStaticText* m_SolderPasteRatioMarginUnits; wxStaticText* m_SolderPasteRatioMarginUnits;
wxRadioBox* m_PadType; wxRadioBox* m_PadType;
wxCheckBox* m_PadLayerCu;
wxCheckBox* m_PadLayerCmp; wxCheckBox* m_PadLayerCmp;
wxCheckBox* m_PadLayerCu;
wxCheckBox* m_PadLayerAdhCmp; wxCheckBox* m_PadLayerAdhCmp;
wxCheckBox* m_PadLayerAdhCu; wxCheckBox* m_PadLayerAdhCu;
...@@ -120,9 +120,9 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog ...@@ -120,9 +120,9 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
wxCheckBox* m_PadLayerSilkCu; wxCheckBox* m_PadLayerSilkCu;
wxCheckBox* m_PadLayerMaskCmp; wxCheckBox* m_PadLayerMaskCmp;
wxCheckBox* m_PadLayerMaskCu; wxCheckBox* m_PadLayerMaskCu;
wxCheckBox* m_PadLayerDraft;
wxCheckBox* m_PadLayerECO1; wxCheckBox* m_PadLayerECO1;
wxCheckBox* m_PadLayerECO2; wxCheckBox* m_PadLayerECO2;
wxCheckBox* m_PadLayerDraft;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizer1Cancel;
......
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