Merge trunk @ 5315
This commit is contained in:
commit
5a202e16c6
|
@ -148,6 +148,34 @@ void DSNLEXER::SetSpecctraMode( bool aMode )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool DSNLEXER::SyncLineReaderWith( DSNLEXER& aLexer )
|
||||||
|
{
|
||||||
|
// Synchronize the pointers handling the data read by the LINE_READER
|
||||||
|
// only if aLexer shares the same LINE_READER, because only in this case
|
||||||
|
// the char buffer can be common
|
||||||
|
|
||||||
|
if( reader != aLexer.reader )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Be sure the char buffer is common
|
||||||
|
if( reader->Line() != aLexer.reader->Line() )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// We can synchronize the pointers which handle the data currently read
|
||||||
|
start = aLexer.start;
|
||||||
|
next = aLexer.next;
|
||||||
|
limit = aLexer.limit;
|
||||||
|
|
||||||
|
// Sync these parameters is not mandatory, but could help
|
||||||
|
// for instance in debug
|
||||||
|
curText = aLexer.curText;
|
||||||
|
curOffset = aLexer.curOffset;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DSNLEXER::PushReader( LINE_READER* aLineReader )
|
void DSNLEXER::PushReader( LINE_READER* aLineReader )
|
||||||
{
|
{
|
||||||
readerStack.push_back( aLineReader );
|
readerStack.push_back( aLineReader );
|
||||||
|
|
|
@ -275,6 +275,9 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* a
|
||||||
|
|
||||||
FOOTPRINT_INFO* FOOTPRINT_LIST::GetModuleInfo( const wxString& aFootprintName )
|
FOOTPRINT_INFO* FOOTPRINT_LIST::GetModuleInfo( const wxString& aFootprintName )
|
||||||
{
|
{
|
||||||
|
if( aFootprintName.IsEmpty() )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
BOOST_FOREACH( FOOTPRINT_INFO& fp, m_list )
|
BOOST_FOREACH( FOOTPRINT_INFO& fp, m_list )
|
||||||
{
|
{
|
||||||
FPID fpid;
|
FPID fpid;
|
||||||
|
|
|
@ -69,7 +69,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void parsePlugin() throw( IO_ERROR, PARSE_ERROR );
|
void parsePlugin() throw( IO_ERROR, PARSE_ERROR );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// PCB_PLOT_PARAMS_PARSER
|
// PCB_PLOT_PARAMS_PARSER
|
||||||
|
@ -175,7 +174,6 @@ private:
|
||||||
void OnCancelClick( wxCommandEvent& event );
|
void OnCancelClick( wxCommandEvent& event );
|
||||||
void OnHelp( wxCommandEvent& event );
|
void OnHelp( wxCommandEvent& event );
|
||||||
void OnAddPlugin( wxCommandEvent& event );
|
void OnAddPlugin( wxCommandEvent& event );
|
||||||
void OnChoosePlugin( wxCommandEvent& event );
|
|
||||||
void OnRemovePlugin( wxCommandEvent& event );
|
void OnRemovePlugin( wxCommandEvent& event );
|
||||||
void OnEditPlugin( wxCommandEvent& event );
|
void OnEditPlugin( wxCommandEvent& event );
|
||||||
void OnCommandLineEdited( wxCommandEvent& event );
|
void OnCommandLineEdited( wxCommandEvent& event );
|
||||||
|
@ -183,6 +181,25 @@ private:
|
||||||
|
|
||||||
void pluginInit();
|
void pluginInit();
|
||||||
void installPluginsList();
|
void installPluginsList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the Plugin filename from a command line
|
||||||
|
* @param aCommand = the command line
|
||||||
|
*/
|
||||||
|
wxString getPluginFileName( const wxString& aCommand );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* display (when exists) the text found between the keyword "@package"
|
||||||
|
* (compatible with doxygen comments)
|
||||||
|
* and the end of comment block (""" in python", --> in xml)
|
||||||
|
*/
|
||||||
|
void displayPluginInfo( FILE * aFile, const wxString& aFilename );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Browse plugin files, and set m_CommandStringCtrl field
|
||||||
|
* @return a command line ro run the plugin
|
||||||
|
*/
|
||||||
|
wxString choosePlugin();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create and show DIALOG_BOM.
|
// Create and show DIALOG_BOM.
|
||||||
|
@ -215,12 +232,14 @@ DIALOG_BOM::~DIALOG_BOM()
|
||||||
|
|
||||||
STRING_FORMATTER writer;
|
STRING_FORMATTER writer;
|
||||||
writer.Print( 0, "(plugins" );
|
writer.Print( 0, "(plugins" );
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < m_plugins.GetCount(); ii += 2 )
|
for( unsigned ii = 0; ii < m_plugins.GetCount(); ii += 2 )
|
||||||
{
|
{
|
||||||
writer.Print( 1, "(plugin %s (cmd %s))",
|
writer.Print( 1, "(plugin %s (cmd %s))",
|
||||||
writer.Quotew( m_plugins[ii] ).c_str(),
|
writer.Quotew( m_plugins[ii] ).c_str(),
|
||||||
writer.Quotew( m_plugins[ii+1] ).c_str() );
|
writer.Quotew( m_plugins[ii+1] ).c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.Print( 0, ")" );
|
writer.Print( 0, ")" );
|
||||||
|
|
||||||
wxString list( FROM_UTF8( writer.GetString().c_str() ) );
|
wxString list( FROM_UTF8( writer.GetString().c_str() ) );
|
||||||
|
@ -272,6 +291,7 @@ void DIALOG_BOM::OnPluginSelected( wxCommandEvent& event )
|
||||||
pluginInit();
|
pluginInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <wx/ffile.h>
|
||||||
void DIALOG_BOM::pluginInit()
|
void DIALOG_BOM::pluginInit()
|
||||||
{
|
{
|
||||||
int ii = m_lbPlugins->GetSelection();
|
int ii = m_lbPlugins->GetSelection();
|
||||||
|
@ -285,8 +305,70 @@ void DIALOG_BOM::pluginInit()
|
||||||
|
|
||||||
m_textCtrlName->SetValue( m_plugins[2 * ii] );
|
m_textCtrlName->SetValue( m_plugins[2 * ii] );
|
||||||
m_textCtrlCommand->SetValue( m_plugins[(2 * ii)+1] );
|
m_textCtrlCommand->SetValue( m_plugins[(2 * ii)+1] );
|
||||||
|
|
||||||
|
wxString pluginName = getPluginFileName( m_textCtrlCommand->GetValue() );
|
||||||
|
|
||||||
|
if( pluginName.IsEmpty() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
FILE* pluginFile = wxFopen( pluginName, "rt" );
|
||||||
|
|
||||||
|
if( pluginFile == NULL )
|
||||||
|
{
|
||||||
|
wxString msg;
|
||||||
|
msg.Printf( _( "Failed to open file '%s'" ), GetChars( pluginName ) );
|
||||||
|
DisplayError( this, msg );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
displayPluginInfo( pluginFile, pluginName );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_BOM::displayPluginInfo( FILE * aFile, const wxString& aFilename )
|
||||||
|
{
|
||||||
|
m_Messages->Clear();
|
||||||
|
|
||||||
|
// display (when exists) the text found between the keyword "@package"
|
||||||
|
// (compatible with doxygen comments)
|
||||||
|
// and the end of comment block (""" in python", --> in xml)
|
||||||
|
|
||||||
|
wxString data;
|
||||||
|
wxFFile fdata( aFile ); // dtor will close the file
|
||||||
|
|
||||||
|
if( !fdata.ReadAll( &data ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxString header( wxT( "@package" ) );
|
||||||
|
wxString endsection( wxT( "-->" ) ); // For xml
|
||||||
|
|
||||||
|
wxFileName fn( aFilename );
|
||||||
|
|
||||||
|
if( fn.GetExt().IsSameAs( wxT("py"), false ) )
|
||||||
|
endsection = wxT( "\"\"\"" );
|
||||||
|
else if( !fn.GetExt().IsSameAs( wxT("xsl"), false ) )
|
||||||
|
// If this is not a python file, we know nothing about file
|
||||||
|
// and the info cannot be found
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Extract substring between @package and """
|
||||||
|
int strstart = data.Find( header );
|
||||||
|
|
||||||
|
if( strstart == wxNOT_FOUND )
|
||||||
|
return;
|
||||||
|
|
||||||
|
strstart += header.Length();
|
||||||
|
int strend = data.find( endsection, strstart );
|
||||||
|
|
||||||
|
if( strend == wxNOT_FOUND)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Remove emty line if any
|
||||||
|
while( data[strstart] < ' ' )
|
||||||
|
strstart++;
|
||||||
|
|
||||||
|
m_Messages->SetValue( data.SubString( strstart, strend-1 ) );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function RunPlugin
|
* Function RunPlugin
|
||||||
|
@ -350,8 +432,17 @@ void DIALOG_BOM::OnRemovePlugin( wxCommandEvent& event )
|
||||||
*/
|
*/
|
||||||
void DIALOG_BOM::OnAddPlugin( wxCommandEvent& event )
|
void DIALOG_BOM::OnAddPlugin( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
|
wxString cmdLine = choosePlugin();
|
||||||
|
|
||||||
|
if( cmdLine.IsEmpty() )
|
||||||
|
return;
|
||||||
|
|
||||||
// Creates a new plugin entry
|
// Creates a new plugin entry
|
||||||
wxString name = wxGetTextFromUser( _("Plugin") );
|
wxFileName fn( getPluginFileName( cmdLine ) );
|
||||||
|
|
||||||
|
wxString defaultName = fn.GetName();
|
||||||
|
wxString name = wxGetTextFromUser( _("Plugin name in plugin list") ,
|
||||||
|
_("Plugin name"), defaultName );
|
||||||
|
|
||||||
if( name.IsEmpty() )
|
if( name.IsEmpty() )
|
||||||
return;
|
return;
|
||||||
|
@ -361,22 +452,26 @@ void DIALOG_BOM::OnAddPlugin( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( name == m_plugins[ii] )
|
if( name == m_plugins[ii] )
|
||||||
{
|
{
|
||||||
wxMessageBox( _("This plugin already exists. Abort") );
|
wxMessageBox( _("This name already exists. Abort") );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Eppend the new plugin
|
||||||
m_plugins.Add( name );
|
m_plugins.Add( name );
|
||||||
m_plugins.Add( wxEmptyString );
|
m_plugins.Add( wxEmptyString );
|
||||||
|
m_lbPlugins->SetSelection( m_lbPlugins->GetCount() - 1 );
|
||||||
m_lbPlugins->Append( name );
|
m_lbPlugins->Append( name );
|
||||||
m_lbPlugins->SetSelection( m_lbPlugins->GetCount() - 1 );
|
m_lbPlugins->SetSelection( m_lbPlugins->GetCount() - 1 );
|
||||||
|
m_textCtrlCommand->SetValue( cmdLine );
|
||||||
|
|
||||||
pluginInit();
|
pluginInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Browse plugin files, and set m_CommandStringCtrl field
|
* Browse plugin files, and set m_CommandStringCtrl field
|
||||||
*/
|
*/
|
||||||
void DIALOG_BOM::OnChoosePlugin( wxCommandEvent& event )
|
wxString DIALOG_BOM::choosePlugin()
|
||||||
{
|
{
|
||||||
wxString mask = wxT( "*" );
|
wxString mask = wxT( "*" );
|
||||||
#ifndef __WXMAC__
|
#ifndef __WXMAC__
|
||||||
|
@ -395,7 +490,7 @@ void DIALOG_BOM::OnChoosePlugin( wxCommandEvent& event )
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
if( fullFileName.IsEmpty() )
|
if( fullFileName.IsEmpty() )
|
||||||
return;
|
return wxEmptyString;
|
||||||
|
|
||||||
// Creates a default command line,
|
// Creates a default command line,
|
||||||
// suitable to run the external tool xslproc or python
|
// suitable to run the external tool xslproc or python
|
||||||
|
@ -414,44 +509,65 @@ void DIALOG_BOM::OnChoosePlugin( wxCommandEvent& event )
|
||||||
else
|
else
|
||||||
cmdLine.Printf(wxT("\"%s\""), GetChars( fullFileName ) );
|
cmdLine.Printf(wxT("\"%s\""), GetChars( fullFileName ) );
|
||||||
|
|
||||||
m_textCtrlCommand->SetValue( cmdLine );
|
return cmdLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DIALOG_BOM::OnEditPlugin( wxCommandEvent& event )
|
|
||||||
|
wxString DIALOG_BOM::getPluginFileName( const wxString& aCommand )
|
||||||
{
|
{
|
||||||
wxString pluginName, cmdline;
|
wxString pluginName;
|
||||||
|
|
||||||
// Try to find the plugin name.
|
// Try to find the plugin name.
|
||||||
// This is possible if the name ends by .py or .xsl
|
// This is possible if the name ends by .py or .xsl
|
||||||
cmdline = m_textCtrlCommand->GetValue();
|
|
||||||
int pos = -1;
|
int pos = -1;
|
||||||
|
|
||||||
if( (pos = cmdline.Find( wxT(".py") )) != wxNOT_FOUND )
|
if( (pos = aCommand.Find( wxT(".py") )) != wxNOT_FOUND )
|
||||||
pos += 2;
|
pos += 2;
|
||||||
else if( (pos = cmdline.Find( wxT(".xsl") )) != wxNOT_FOUND )
|
else if( (pos = aCommand.Find( wxT(".xsl") )) != wxNOT_FOUND )
|
||||||
pos += 3;
|
pos += 3;
|
||||||
|
|
||||||
// the end of plugin name is at position pos.
|
// the end of plugin name is at position pos.
|
||||||
if( pos > 0 )
|
if( pos > 0 )
|
||||||
{
|
{
|
||||||
// Be sure this is the end of the name: the next char is " or space
|
// Be sure this is the end of the name: the next char is " or space
|
||||||
int eos = cmdline[pos+1];
|
int eos = aCommand[pos+1];
|
||||||
|
|
||||||
if( eos == ' '|| eos == '\"' )
|
if( eos == ' '|| eos == '\"' )
|
||||||
{
|
{
|
||||||
// search for the starting point of the name
|
// search for the starting point of the name
|
||||||
int jj = pos-1;
|
int jj = pos-1;
|
||||||
while( jj >= 0 )
|
while( jj >= 0 )
|
||||||
if( cmdline[jj] != eos )
|
if( aCommand[jj] != eos )
|
||||||
jj--;
|
jj--;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// extract the name
|
// extract the name
|
||||||
if( jj >= 0 )
|
if( jj >= 0 )
|
||||||
pluginName = cmdline.SubString( jj, pos );
|
{
|
||||||
|
eos = aCommand[jj];
|
||||||
|
|
||||||
|
if( eos == ' '|| eos == '\"' ) // do not include delimiters
|
||||||
|
jj++;
|
||||||
|
|
||||||
|
pluginName = aCommand.SubString( jj, pos );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return pluginName;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DIALOG_BOM::OnEditPlugin( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
wxString pluginName = getPluginFileName( m_textCtrlCommand->GetValue() );
|
||||||
|
|
||||||
|
if( pluginName.Length() <= 2 ) // if name != ""
|
||||||
|
{
|
||||||
|
wxMessageBox( _("Plugin file name not found. Cannot edit plugin file") );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
AddDelimiterString( pluginName );
|
AddDelimiterString( pluginName );
|
||||||
wxString editorname = Pgm().GetEditorName();
|
wxString editorname = Pgm().GetEditorName();
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ BEGIN_EVENT_TABLE( DIALOG_BOM_BASE, DIALOG_SHIM )
|
||||||
EVT_BUTTON( wxID_CANCEL, DIALOG_BOM_BASE::_wxFB_OnCancelClick )
|
EVT_BUTTON( wxID_CANCEL, DIALOG_BOM_BASE::_wxFB_OnCancelClick )
|
||||||
EVT_BUTTON( ID_HELP, DIALOG_BOM_BASE::_wxFB_OnHelp )
|
EVT_BUTTON( ID_HELP, DIALOG_BOM_BASE::_wxFB_OnHelp )
|
||||||
EVT_BUTTON( ID_ADD_PLUGIN, DIALOG_BOM_BASE::_wxFB_OnAddPlugin )
|
EVT_BUTTON( ID_ADD_PLUGIN, DIALOG_BOM_BASE::_wxFB_OnAddPlugin )
|
||||||
EVT_BUTTON( wxID_BROWSE_PLUGINS, DIALOG_BOM_BASE::_wxFB_OnChoosePlugin )
|
|
||||||
EVT_BUTTON( ID_REMOVEL_PLUGIN, DIALOG_BOM_BASE::_wxFB_OnRemovePlugin )
|
EVT_BUTTON( ID_REMOVEL_PLUGIN, DIALOG_BOM_BASE::_wxFB_OnRemovePlugin )
|
||||||
EVT_BUTTON( wxID_ANY, DIALOG_BOM_BASE::_wxFB_OnEditPlugin )
|
EVT_BUTTON( wxID_ANY, DIALOG_BOM_BASE::_wxFB_OnEditPlugin )
|
||||||
EVT_TEXT( ID_CMDLINE, DIALOG_BOM_BASE::_wxFB_OnCommandLineEdited )
|
EVT_TEXT( ID_CMDLINE, DIALOG_BOM_BASE::_wxFB_OnCommandLineEdited )
|
||||||
|
@ -72,9 +71,6 @@ DIALOG_BOM_BASE::DIALOG_BOM_BASE( wxWindow* parent, wxWindowID id, const wxStrin
|
||||||
m_buttonAddPlugin = new wxButton( this, ID_ADD_PLUGIN, _("Add Plugin"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonAddPlugin = new wxButton( this, ID_ADD_PLUGIN, _("Add Plugin"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bRightSizer->Add( m_buttonAddPlugin, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
bRightSizer->Add( m_buttonAddPlugin, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_buttonBrowsePlugin = new wxButton( this, wxID_BROWSE_PLUGINS, _("Set Plugin Cmd"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
bRightSizer->Add( m_buttonBrowsePlugin, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
m_buttonDelPlugin = new wxButton( this, ID_REMOVEL_PLUGIN, _("Remove Plugin"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonDelPlugin = new wxButton( this, ID_REMOVEL_PLUGIN, _("Remove Plugin"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bRightSizer->Add( m_buttonDelPlugin, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
bRightSizer->Add( m_buttonDelPlugin, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
@ -103,6 +99,13 @@ DIALOG_BOM_BASE::DIALOG_BOM_BASE( wxWindow* parent, wxWindowID id, const wxStrin
|
||||||
|
|
||||||
bMainSizer->Add( bbottomSizer, 0, wxEXPAND, 5 );
|
bMainSizer->Add( bbottomSizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Plugin Info:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextInfo->Wrap( -1 );
|
||||||
|
bMainSizer->Add( m_staticTextInfo, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_Messages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
|
||||||
|
bMainSizer->Add( m_Messages, 1, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( bMainSizer );
|
this->SetSizer( bMainSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">DIALOG_BOM_BASE</property>
|
<property name="name">DIALOG_BOM_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">404,315</property>
|
<property name="size">409,393</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||||
<property name="title">Bill of Material</property>
|
<property name="title">Bill of Material</property>
|
||||||
|
@ -900,94 +900,6 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxButton" expanded="1">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer"></property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position"></property>
|
|
||||||
<property name="aui_row"></property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="caption"></property>
|
|
||||||
<property name="caption_visible">1</property>
|
|
||||||
<property name="center_pane">0</property>
|
|
||||||
<property name="close_button">1</property>
|
|
||||||
<property name="context_help"></property>
|
|
||||||
<property name="context_menu">1</property>
|
|
||||||
<property name="default">0</property>
|
|
||||||
<property name="default_pane">0</property>
|
|
||||||
<property name="dock">Dock</property>
|
|
||||||
<property name="dock_fixed">0</property>
|
|
||||||
<property name="docking">Left</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_BROWSE_PLUGINS</property>
|
|
||||||
<property name="label">Set Plugin Cmd</property>
|
|
||||||
<property name="max_size"></property>
|
|
||||||
<property name="maximize_button">0</property>
|
|
||||||
<property name="maximum_size"></property>
|
|
||||||
<property name="min_size"></property>
|
|
||||||
<property name="minimize_button">0</property>
|
|
||||||
<property name="minimum_size"></property>
|
|
||||||
<property name="moveable">1</property>
|
|
||||||
<property name="name">m_buttonBrowsePlugin</property>
|
|
||||||
<property name="pane_border">1</property>
|
|
||||||
<property name="pane_position"></property>
|
|
||||||
<property name="pane_size"></property>
|
|
||||||
<property name="permission">protected</property>
|
|
||||||
<property name="pin_button">1</property>
|
|
||||||
<property name="pos"></property>
|
|
||||||
<property name="resize">Resizable</property>
|
|
||||||
<property name="show">1</property>
|
|
||||||
<property name="size"></property>
|
|
||||||
<property name="style"></property>
|
|
||||||
<property name="subclass"></property>
|
|
||||||
<property name="toolbar_pane">0</property>
|
|
||||||
<property name="tooltip"></property>
|
|
||||||
<property name="validator_data_type"></property>
|
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
|
||||||
<property name="validator_variable"></property>
|
|
||||||
<property name="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
<event name="OnButtonClick">OnChoosePlugin</event>
|
|
||||||
<event name="OnChar"></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 class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
|
@ -1353,6 +1265,180 @@
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticText" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer"></property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position"></property>
|
||||||
|
<property name="aui_row"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Plugin Info:</property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_staticTextInfo</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
<event name="OnChar"></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 class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxTextCtrl" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer"></property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position"></property>
|
||||||
|
<property name="aui_row"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="maxlength"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_Messages</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style">wxTE_MULTILINE|wxTE_READONLY</property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="value"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnChar"></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="OnText"></event>
|
||||||
|
<event name="OnTextEnter"></event>
|
||||||
|
<event name="OnTextMaxLen"></event>
|
||||||
|
<event name="OnTextURL"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -44,7 +44,6 @@ class DIALOG_BOM_BASE : public DIALOG_SHIM
|
||||||
void _wxFB_OnCancelClick( wxCommandEvent& event ){ OnCancelClick( event ); }
|
void _wxFB_OnCancelClick( wxCommandEvent& event ){ OnCancelClick( event ); }
|
||||||
void _wxFB_OnHelp( wxCommandEvent& event ){ OnHelp( event ); }
|
void _wxFB_OnHelp( wxCommandEvent& event ){ OnHelp( event ); }
|
||||||
void _wxFB_OnAddPlugin( wxCommandEvent& event ){ OnAddPlugin( event ); }
|
void _wxFB_OnAddPlugin( wxCommandEvent& event ){ OnAddPlugin( event ); }
|
||||||
void _wxFB_OnChoosePlugin( wxCommandEvent& event ){ OnChoosePlugin( event ); }
|
|
||||||
void _wxFB_OnRemovePlugin( wxCommandEvent& event ){ OnRemovePlugin( event ); }
|
void _wxFB_OnRemovePlugin( wxCommandEvent& event ){ OnRemovePlugin( event ); }
|
||||||
void _wxFB_OnEditPlugin( wxCommandEvent& event ){ OnEditPlugin( event ); }
|
void _wxFB_OnEditPlugin( wxCommandEvent& event ){ OnEditPlugin( event ); }
|
||||||
void _wxFB_OnCommandLineEdited( wxCommandEvent& event ){ OnCommandLineEdited( event ); }
|
void _wxFB_OnCommandLineEdited( wxCommandEvent& event ){ OnCommandLineEdited( event ); }
|
||||||
|
@ -57,7 +56,6 @@ class DIALOG_BOM_BASE : public DIALOG_SHIM
|
||||||
ID_CREATE_BOM,
|
ID_CREATE_BOM,
|
||||||
ID_HELP,
|
ID_HELP,
|
||||||
ID_ADD_PLUGIN,
|
ID_ADD_PLUGIN,
|
||||||
wxID_BROWSE_PLUGINS,
|
|
||||||
ID_REMOVEL_PLUGIN,
|
ID_REMOVEL_PLUGIN,
|
||||||
ID_CMDLINE
|
ID_CMDLINE
|
||||||
};
|
};
|
||||||
|
@ -71,11 +69,12 @@ class DIALOG_BOM_BASE : public DIALOG_SHIM
|
||||||
wxButton* m_buttonHelp;
|
wxButton* m_buttonHelp;
|
||||||
wxStaticLine* m_staticline2;
|
wxStaticLine* m_staticline2;
|
||||||
wxButton* m_buttonAddPlugin;
|
wxButton* m_buttonAddPlugin;
|
||||||
wxButton* m_buttonBrowsePlugin;
|
|
||||||
wxButton* m_buttonDelPlugin;
|
wxButton* m_buttonDelPlugin;
|
||||||
wxButton* m_buttonEdit;
|
wxButton* m_buttonEdit;
|
||||||
wxStaticText* m_staticTextCmd;
|
wxStaticText* m_staticTextCmd;
|
||||||
wxTextCtrl* m_textCtrlCommand;
|
wxTextCtrl* m_textCtrlCommand;
|
||||||
|
wxStaticText* m_staticTextInfo;
|
||||||
|
wxTextCtrl* m_Messages;
|
||||||
|
|
||||||
// Virtual event handlers, overide them in your derived class
|
// Virtual event handlers, overide them in your derived class
|
||||||
virtual void OnPluginSelected( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnPluginSelected( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
@ -84,7 +83,6 @@ class DIALOG_BOM_BASE : public DIALOG_SHIM
|
||||||
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnHelp( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnAddPlugin( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnAddPlugin( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnChoosePlugin( wxCommandEvent& event ) { event.Skip(); }
|
|
||||||
virtual void OnRemovePlugin( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnRemovePlugin( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnEditPlugin( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnEditPlugin( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnCommandLineEdited( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnCommandLineEdited( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
@ -92,7 +90,7 @@ class DIALOG_BOM_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_BOM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Bill of Material"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 404,315 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_BOM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Bill of Material"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 409,393 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
~DIALOG_BOM_BASE();
|
~DIALOG_BOM_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,210 +1,262 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<HTML>
|
<html>
|
||||||
<HEAD>
|
<head>
|
||||||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252"/>
|
||||||
<TITLE>kicad help</TITLE>
|
<title>kicad help</title>
|
||||||
<META NAME="GENERATOR" CONTENT="LibreOffice 4.0.2.2 (Windows)">
|
<meta name="generator" content="LibreOffice 4.3.4.1 (Windows)"/>
|
||||||
<META NAME="CREATED" CONTENT="0;0">
|
<meta name="created" content="00:00:00"/>
|
||||||
<META NAME="CHANGED" CONTENT="20130614;10225357">
|
<meta name="changed" content="2014-12-03T20:04:24.723000000"/>
|
||||||
<STYLE TYPE="text/css">
|
<meta name="created" content="00:00:00">
|
||||||
<!--
|
<meta name="changed" content="2014-12-03T20:04:06.003000000">
|
||||||
|
<meta name="created" content="00:00:00">
|
||||||
|
<meta name="changed" content="2014-12-03T19:59:24.882000000">
|
||||||
|
<style type="text/css">
|
||||||
@page { margin: 2cm }
|
@page { margin: 2cm }
|
||||||
P { margin-bottom: 0.21cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto }
|
p { margin-bottom: 0.21cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto }
|
||||||
P.western { font-family: "Arial", sans-serif; font-size: 10pt; so-language: en-US }
|
p.western { font-family: "Arial", sans-serif; font-size: 10pt; so-language: en-US }
|
||||||
A:link { color: #004586; text-decoration: none }
|
a:link { color: #004586; text-decoration: none }
|
||||||
A.western:link { font-family: "Liberation Sans", sans-serif; so-language: zxx; font-style: italic }
|
a.western:link { font-family: "Liberation Sans", sans-serif; so-language: zxx; font-style: italic }
|
||||||
A.sdfootnotesym-western { font-family: "DejaVu Serif", serif }
|
a.sdfootnotesym-western { font-family: "DejaVu Serif", serif }
|
||||||
-->
|
</style>
|
||||||
</STYLE>
|
</head>
|
||||||
</HEAD>
|
<body lang="en-AU" link="#004586" dir="ltr">
|
||||||
<BODY LANG="en-AU" LINK="#004586" DIR="LTR">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto"><a name="__RefHeading__2925_482973253"></a>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto"><A NAME="__RefHeading__2925_482973253"></A>
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>1
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><B>1 - Full
|
- Full documentation:</b></font></font></p>
|
||||||
documentation:</B></FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>The
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><SPAN LANG="en-US"><B>The
|
</b></font></font><font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><i><b>Eeschema
|
||||||
</B></SPAN></FONT></FONT><FONT FACE="Times New Roman, serif"><FONT SIZE=3><SPAN LANG="en-US"><I><B>Eeschema
|
documentation, chapter 14</b></i></font></font> <font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>describes
|
||||||
documentation, chapter 14</B></I></SPAN></FONT></FONT><FONT FACE="Times New Roman, serif"><FONT SIZE=3><SPAN LANG="en-US"><B>
|
this intermediate netlist and gives examples<br>See also
|
||||||
describes this intermediate netlist and gives examples<BR>See also
|
</b></font></font><font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><i><b>https://answers.launchpad.net/kicad/+faq/2265</b></i></font></font></p>
|
||||||
</B></SPAN></FONT></FONT><FONT FACE="Times New Roman, serif"><FONT SIZE=3><SPAN LANG="en-US"><I><B>https://answers.launchpad.net/kicad/+faq/2265</B></I></SPAN></FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b><i>2
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><B><I>2 - </I>The
|
- </i>The intermediate Netlist File</b></font></font></p>
|
||||||
intermediate Netlist File</B></FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">BOM
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>BOM files (and
|
files (and netlist files) can be created from an Intermediate netlist
|
||||||
netlist files) can be created from an Intermediate netlist file
|
file created by Eeschema.</font></font></p>
|
||||||
created by Eeschema.</FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">This
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>This file uses XML
|
file uses XML syntax and is called the intermediate netlist. The
|
||||||
syntax and is called the intermediate netlist. The intermediate
|
intermediate netlist includes a large amount of data about your board
|
||||||
netlist includes a large amount of data about your board and because
|
and because of this, it can be used with post-processing to create a
|
||||||
of this, it can be used with post-processing to create a BOM or other
|
BOM or other reports.</font></font></p>
|
||||||
reports.</FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Depending
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>Depending on the
|
on the output (BOM or netlist), different subsets of the complete
|
||||||
output (BOM or netlist), different subsets of the complete
|
Intermediate Netlist file will be used in the post-processing.</font></font></p>
|
||||||
Intermediate Netlist file will be used in the post-processing.</FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>3
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><B>3 - Conversion to
|
- Conversion to a new format</b></font></font></p>
|
||||||
a new format</B></FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">By
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>By applying a
|
applying a post-processing filter to the Intermediate netlist file
|
||||||
post-processing filter to the Intermediate netlist file you can
|
you can generate foreign netlist files as well as BOM files. Because
|
||||||
generate foreign netlist files as well as BOM files. Because this
|
this conversion is a text to text transformation.</font></font></p>
|
||||||
conversion is a text to text transformation.</FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">this
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>this post-processing
|
post-processing filter can be written using Python, XSLT, or any
|
||||||
filter can be written using Python, XSLT, or any other tool capable
|
other tool capable of taking XML as input.</font></font></p>
|
||||||
of taking XML as input.</FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">XSLT
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">XSLT
|
|
||||||
itself is a XML language very suitable for XML transformations. There
|
itself is a XML language very suitable for XML transformations. There
|
||||||
is a free program called </SPAN></SPAN></SPAN><I><SPAN STYLE="font-weight: normal">xsltproc</SPAN></I><SPAN STYLE="font-variant: normal">
|
is a free program called </span></span></span><i><span style="font-weight: normal">xsltproc</span></i><span style="font-variant: normal">
|
||||||
</SPAN><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">that
|
</span><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">that
|
||||||
you can download and install. The</SPAN></SPAN></SPAN><SPAN STYLE="font-variant: normal">
|
you can download and install. The</span></span></span><span style="font-variant: normal">
|
||||||
</SPAN><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">xsltproc
|
</span><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">xsltproc
|
||||||
program can be used to read the Intermediate XML netlist input file,
|
program can be used to read the Intermediate XML netlist input file,
|
||||||
apply</SPAN></SPAN></SPAN><SPAN STYLE="font-variant: normal"> </SPAN><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">a
|
apply</span></span></span><span style="font-variant: normal"> </span><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">a
|
||||||
style-sheet to transform the input, and save the results in an output
|
style-sheet to transform the input, and save the results in an output
|
||||||
file. Use of xsltproc requires a style-sheet file using XSLT
|
file. Use of xsltproc requires a style-sheet file using XSLT
|
||||||
conventions. The full conversion process is handled</SPAN></SPAN></SPAN><SPAN STYLE="font-variant: normal">
|
conventions. The full conversion process is handled</span></span></span><span style="font-variant: normal">
|
||||||
</SPAN><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">by
|
</span><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">by
|
||||||
Eeschema, after it is configured once to run xsltproc in a specific
|
Eeschema, after it is configured once to run xsltproc in a specific
|
||||||
way.</SPAN></SPAN></SPAN></FONT></FONT></P>
|
way.</span></span></span></font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><B>4 -
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4
|
||||||
Initialization of the dialog window</B></FONT></FONT></P>
|
- Initialization of the dialog window</b></font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>You should add a new
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">You
|
||||||
pluging (a script) in plugin list by clicking on the Add Plugin
|
should add a new pluging (a script) in plugin list by clicking on the
|
||||||
button.</FONT></FONT></P>
|
Add Plugin button.</font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><B>4.1 - Plugin
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.1
|
||||||
Configuration Parameters</B></FONT></FONT></P>
|
- Plugin Configuration Parameters</b></font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>The Eeschema plug-in
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
||||||
configuration dialog requires the following information:</FONT></FONT></P>
|
Eeschema plug-in configuration dialog requires the following
|
||||||
<UL>
|
information:</font></font></p>
|
||||||
<LI><P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<ul>
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>The title: for
|
<li/>
|
||||||
instance, the name of the netlist format.</FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<LI><P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>The command line to
|
title: for instance, the name of the netlist format.</font></font></p>
|
||||||
launch the converter (usually a script).</FONT></FONT></P>
|
<li/>
|
||||||
</UL>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>Once you click on
|
command line to launch the converter (usually a script).</font></font></p>
|
||||||
the generate button the following will happen:</FONT></FONT></P>
|
</ul>
|
||||||
<OL>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<LI><P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Once
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>Eeschema creates an
|
you click on the generate button the following will happen:</font></font></p>
|
||||||
intermediate netlist file *.xml, for instance <I>test.xml.</I></FONT></FONT></P>
|
<ol>
|
||||||
<LI><P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<li/>
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>Eeschema runs the
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
script from the command line to create the final output file.</FONT></FONT></P>
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Eeschema
|
||||||
</OL>
|
creates an intermediate netlist file *.xml, for instance <i>test.xml.</i></font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<li/>
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><B>4.2 - Generate
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
netlist files with the command line</B></FONT></FONT></P>
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Eeschema
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
runs the script from the command line to create the final output
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>Assuming we are
|
file.</font></font></p>
|
||||||
using the program <I>xsltproc.exe</I><SPAN STYLE="font-variant: normal">
|
</ol>
|
||||||
</SPAN><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal">to
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
apply the sheet style to the intermediate file, </SPAN></SPAN><I>xsltproc.exe</I><SPAN STYLE="font-variant: normal">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.2
|
||||||
</SPAN><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal">is
|
- Generate netlist files with the command line</b></font></font></p>
|
||||||
executed with the following command.</SPAN></SPAN></FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Assuming
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>xsltproc.exe -o <
|
we are using the program <i>xsltproc.exe</i><span style="font-variant: normal">
|
||||||
output filename > < style-sheet filename > < input XML
|
</span><span style="font-variant: normal"><span style="font-style: normal">to
|
||||||
file to convert ></FONT></FONT></P>
|
apply the sheet style to the intermediate file, </span></span><i>xsltproc.exe</i><span style="font-variant: normal">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
</span><span style="font-variant: normal"><span style="font-style: normal">is
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><FONT SIZE=2 STYLE="font-size: 11pt">On</FONT>
|
executed with the following command.</span></span></font></font></p>
|
||||||
<FONT SIZE=2 STYLE="font-size: 11pt">Windows the command line is the
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
following.<BR></FONT><FONT SIZE=2 STYLE="font-size: 11pt"><I>f:/kicad/bin/xsltproc.exe
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">xsltproc.exe
|
||||||
-o “%O” f:/kicad/bin/plugins/myconverter.xsl “%I”</I></FONT></FONT></FONT></P>
|
-o < output filename > < style-sheet filename > <
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
input XML file to convert ></font></font></p>
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><FONT SIZE=2 STYLE="font-size: 11pt">On</FONT>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT SIZE=2 STYLE="font-size: 11pt">Linux the command becomes as
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><font size="2" style="font-size: 11pt">On</font>
|
||||||
following.<BR></FONT><FONT SIZE=2 STYLE="font-size: 11pt"><I>xsltproc
|
<font size="2" style="font-size: 11pt">Windows the command line is
|
||||||
|
the following.<br></font><font size="2" style="font-size: 11pt"><i>f:/kicad/bin/xsltproc.exe
|
||||||
|
-o “%O” f:/kicad/bin/plugins/myconverter.xsl “%I”</i></font></font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><font size="2" style="font-size: 11pt">On</font>
|
||||||
|
<font size="2" style="font-size: 11pt">Linux the command becomes as
|
||||||
|
following.<br></font><font size="2" style="font-size: 11pt"><i>xsltproc
|
||||||
-o “%O” /usr/local/kicad/bin/plugins/myconverter .xsl
|
-o “%O” /usr/local/kicad/bin/plugins/myconverter .xsl
|
||||||
“%I”</I></FONT></FONT></FONT></P>
|
“%I”</i></font></font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><SPAN STYLE="font-variant: normal"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">Where
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">Where
|
||||||
</SPAN></SPAN></FONT></SPAN><SPAN STYLE="font-variant: normal"><FONT SIZE=2 STYLE="font-size: 11pt"><I><SPAN STYLE="font-weight: normal">myconverter</SPAN></I></FONT></SPAN><FONT SIZE=2 STYLE="font-size: 11pt"><I><SPAN STYLE="font-weight: normal">.xsl</SPAN></I></FONT><SPAN STYLE="font-variant: normal">
|
</span></span></font></span><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><i><span style="font-weight: normal">myconverter</span></i></font></span><font size="2" style="font-size: 11pt"><i><span style="font-weight: normal">.xsl</span></i></font><span style="font-variant: normal">
|
||||||
</SPAN><SPAN STYLE="font-variant: normal"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">is
|
</span><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">is
|
||||||
the style-sheet that you are applying. Do not forget the double
|
the style-sheet that you are applying. Do not forget the double
|
||||||
quotes</SPAN></SPAN></FONT></SPAN><SPAN STYLE="font-variant: normal">
|
quotes</span></span></font></span><span style="font-variant: normal">
|
||||||
</SPAN><SPAN STYLE="font-variant: normal"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">around
|
</span><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">around
|
||||||
the file names, this allows them to have spaces after the
|
the file names, this allows them to have spaces after the
|
||||||
substitution by Eeschema.</SPAN></SPAN></FONT></SPAN></FONT></FONT></P>
|
substitution by Eeschema.</span></span></font></span></font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>The command line
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
||||||
format accepts parameters for filenames:</FONT></FONT></P>
|
command line format accepts parameters for filenames:</font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>The supported
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
||||||
formatting parameters are.</FONT></FONT></P>
|
supported formatting parameters are.</font></font></p>
|
||||||
<UL>
|
<ul>
|
||||||
<LI><P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<li/>
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>%B => base
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
filename and path of selected output file, minus path and extension.</FONT></FONT></P>
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">%B
|
||||||
<LI><P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
=> base filename and path of selected output file, minus path and
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>%I => complete
|
extension.</font></font></p>
|
||||||
filename and path of the temporary input file (the intermediate net
|
<li/>
|
||||||
file).</FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<LI><P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">%I
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>%O => complete
|
=> complete filename and path of the temporary input file (the
|
||||||
filename and path of the user chosen output file.</FONT></FONT></P>
|
intermediate net file).</font></font></p>
|
||||||
</UL>
|
<li/>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>%I will be replaced
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">%O
|
||||||
by the actual intermediate file name<BR><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">%O
|
=> complete filename and path (but without extension) of the user
|
||||||
will be replaced by the actual output file name.</SPAN></SPAN></SPAN></FONT></FONT></P>
|
chosen output file.</font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
</ul>
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><B>4.3 - Command
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
line format: example for <SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal">xsltproc</SPAN></SPAN></B></FONT></FONT></P>
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">%I
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
will be replaced by the actual intermediate file name<br><span style="font-variant: normal"><span style="font-style: normal"><span style="font-weight: normal">%O
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal">The
|
will be replaced by the actual output file name.</span></span></span></font></font></p>
|
||||||
command line format for xsltproc is the following:<BR>< path of
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
</SPAN></SPAN>xsltproc > <SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal">xsltproc
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.3
|
||||||
< </SPAN></SPAN>xsltproc parameters ></FONT></FONT></P>
|
- Command line format: example for <span style="font-variant: normal"><span style="font-style: normal">xsltproc</span></span></b></font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; font-variant: normal; font-style: normal; widows: 0; orphans: 0">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>On
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.3.1
|
||||||
Windows:<BR><I><B>f:/kicad/bin/xsltproc.exe -o “%O”
|
- Command line</b></font></font></p>
|
||||||
f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl “%I”</B></I></FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><span style="font-variant: normal"><span style="font-style: normal">The
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><FONT SIZE=2 STYLE="font-size: 11pt">On</FONT>
|
command line format for xsltproc is the following:<br>< path of
|
||||||
<FONT SIZE=2 STYLE="font-size: 11pt">Linux:<BR></FONT><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>xsltproc
|
</span></span>xsltproc > <span style="font-variant: normal"><span style="font-style: normal">xsltproc
|
||||||
|
< </span></span>xsltproc parameters ></font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">On
|
||||||
|
Windows:<br><i><b>f:/kicad/bin/xsltproc.exe -o “%O”
|
||||||
|
f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl “%I”</b></i></font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><font size="2" style="font-size: 11pt">On</font>
|
||||||
|
<font size="2" style="font-size: 11pt">Linux:<br></font><font size="2" style="font-size: 11pt"><i><b>xsltproc
|
||||||
-o “%O”
|
-o “%O”
|
||||||
/usr/local/kicad/bin/plugins/netlist_form_pads-pcb.xsl “%I”</B></I></FONT></FONT></FONT></P>
|
/usr/local/kicad/bin/plugins/netlist_form_pads-pcb.xsl “%I”</b></i></font></font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><SPAN STYLE="font-variant: normal"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">The
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">The
|
||||||
above examples assume</SPAN></SPAN></FONT></SPAN><SPAN STYLE="font-variant: normal">
|
above examples assume</span></span></font></span><span style="font-variant: normal">
|
||||||
</SPAN><SPAN STYLE="font-variant: normal"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-style: normal"><SPAN STYLE="font-weight: normal">xsltproc
|
</span><span style="font-variant: normal"><font size="2" style="font-size: 11pt"><span style="font-style: normal"><span style="font-weight: normal">xsltproc
|
||||||
is installed on your PC under Windows and all files located in
|
is installed on your PC under Windows and all files located in
|
||||||
kicad/bin.</SPAN></SPAN></FONT></SPAN></FONT></FONT></P>
|
kicad/bin.</span></span></font></span></font></font></p>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; font-variant: normal; font-style: normal; widows: 0; orphans: 0">
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3><B>4.4 - Command
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.3.2
|
||||||
line format: example fo<SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal">r
|
- Remark:</b></font></font></p>
|
||||||
python scripts</SPAN></SPAN></B></FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Most
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>The command line
|
of time, the created file must have an extension, depending on its
|
||||||
format for python is something like:<BR><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal">python</SPAN></SPAN><SPAN STYLE="font-variant: normal">
|
type.<br>Therefore you have to add to the option <i><b>%O</b></i> the
|
||||||
</SPAN><SPAN STYLE="font-variant: normal"><SPAN STYLE="font-style: normal"><
|
right file extension.</font></font></p>
|
||||||
script file name </SPAN></SPAN>> < input filename > <
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||||
output filename ></FONT></FONT></P>
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">For
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
instance <i><b>%O.csv</b></i> to create a .csv file (comma separated
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>On
|
value file).</font></font></p>
|
||||||
Windows:<BR><I><B>python.exe f:/kicad/python/my_python_script.py</B></I>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||||
“<I><B>%I” “%O”</B></I></FONT></FONT></P>
|
<br/>
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>On Linux:<BR><I><B>python</B></I>
|
</p>
|
||||||
<I><B>/usr/local/kicad/python/my_python_script.py</B></I> “<I><B>%I”
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
“%O”</B></I></FONT></FONT></P>
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.4
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
- Command line format: example fo<span style="font-variant: normal"><span style="font-style: normal">r
|
||||||
<FONT FACE="Times New Roman, serif"><FONT SIZE=3>Assuming python is
|
python scripts</span></span></b></font></font></p>
|
||||||
installed on your PC.</FONT></FONT></P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; font-variant: normal; font-style: normal; widows: 0; orphans: 0">
|
||||||
<P LANG="en-US" CLASS="western" STYLE="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto"><A NAME="__RefHeading__1787_435485510"></A>
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.4.1
|
||||||
<BR>
|
- Command line</b></font></font></p>
|
||||||
</P>
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
</BODY>
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">The
|
||||||
</HTML>
|
command line format for python is something like:<br><span style="font-variant: normal"><span style="font-style: normal">python</span></span><span style="font-variant: normal">
|
||||||
|
</span><span style="font-variant: normal"><span style="font-style: normal"><
|
||||||
|
script file name </span></span>> < input filename > <
|
||||||
|
output filename ></font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">On
|
||||||
|
Windows:<br><i><b>python.exe f:/kicad/python/my_python_script.py</b></i>
|
||||||
|
“<i><b>%I” “%O”</b></i></font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">On
|
||||||
|
Linux:<br><i><b>python</b></i>
|
||||||
|
<i><b>/usr/local/kicad/python/my_python_script.py</b></i> “<i><b>%I”
|
||||||
|
“%O”</b></i></font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Assuming
|
||||||
|
python is installed on your PC.</font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; font-variant: normal; font-style: normal; widows: 0; orphans: 0"><a name="__RefHeading__1787_435485510"></a>
|
||||||
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>4.4.2
|
||||||
|
- Remark:</b></font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||||
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">Most
|
||||||
|
of time, the created file must have an extension, depending on its
|
||||||
|
type.<br>Therefore you have to add to the option <i><b>%O</b></i> the
|
||||||
|
right file extension.</font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||||
|
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">For
|
||||||
|
instance <i><b>%O.html</b></i> to create a .html file.</font></font></p>
|
||||||
|
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -381,7 +381,7 @@ bool SCH_EDIT_FRAME::WriteNetListFile( NETLIST_OBJECT_LIST * aConnectedItemsList
|
||||||
|
|
||||||
NETLIST_EXPORT_TOOL helper( aConnectedItemsList, Prj().SchLibs() );
|
NETLIST_EXPORT_TOOL helper( aConnectedItemsList, Prj().SchLibs() );
|
||||||
|
|
||||||
bool open_file = aFormat < NET_TYPE_CUSTOM1;
|
bool open_file = (aFormat < NET_TYPE_CUSTOM1) && (aFormat >= 0);
|
||||||
if( (aFormat == NET_TYPE_PCBNEW) && (aNetlistOptions & NET_PCBNEW_USE_NEW_FORMAT ) )
|
if( (aFormat == NET_TYPE_PCBNEW) && (aNetlistOptions & NET_PCBNEW_USE_NEW_FORMAT ) )
|
||||||
open_file = false;
|
open_file = false;
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ bool SCH_EDIT_FRAME::WriteNetListFile( NETLIST_OBJECT_LIST * aConnectedItemsList
|
||||||
if( ( f = wxFopen( aFullFileName, wxT( "wt" ) ) ) == NULL )
|
if( ( f = wxFopen( aFullFileName, wxT( "wt" ) ) ) == NULL )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "Failed to create file <%s>" ),
|
msg.Printf( _( "Failed to create file '%s'" ),
|
||||||
GetChars( aFullFileName ) );
|
GetChars( aFullFileName ) );
|
||||||
DisplayError( this, msg );
|
DisplayError( this, msg );
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -19,6 +19,14 @@
|
||||||
in the filename.
|
in the filename.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
@package
|
||||||
|
Generate a Tab delimited list (csv file type).
|
||||||
|
One component per line
|
||||||
|
Fields are
|
||||||
|
Ref,Value, Footprint, Datasheet, Field5, Field4, price
|
||||||
|
-->
|
||||||
|
|
||||||
<!DOCTYPE xsl:stylesheet [
|
<!DOCTYPE xsl:stylesheet [
|
||||||
<!ENTITY nl "
"> <!--new line CR, LF, or LF, your choice -->
|
<!ENTITY nl "
"> <!--new line CR, LF, or LF, your choice -->
|
||||||
]>
|
]>
|
||||||
|
|
|
@ -7,6 +7,14 @@
|
||||||
How to use:
|
How to use:
|
||||||
Eeschema.pdf: chapter 14
|
Eeschema.pdf: chapter 14
|
||||||
-->
|
-->
|
||||||
|
<!--
|
||||||
|
@package
|
||||||
|
Generate a comma separated value BOM list (csv file type).
|
||||||
|
Components are sorted by value
|
||||||
|
One component per line
|
||||||
|
Fields are
|
||||||
|
Quantity, 'Part name', Description, lib
|
||||||
|
-->
|
||||||
|
|
||||||
<!DOCTYPE xsl:stylesheet [
|
<!DOCTYPE xsl:stylesheet [
|
||||||
<!ENTITY nl "
"> <!--new line CR, LF -->
|
<!ENTITY nl "
"> <!--new line CR, LF -->
|
||||||
|
@ -18,20 +26,18 @@
|
||||||
<!-- for each component -->
|
<!-- for each component -->
|
||||||
<xsl:template match="libpart">
|
<xsl:template match="libpart">
|
||||||
|
|
||||||
<!--
|
<!-- -->
|
||||||
<xsl:value-of select="count(//comp/libsource/@part[@part])"/><xsl:text>,</xsl:text>
|
<xsl:value-of select="count(//comp/libsource/@part[@part])"/><xsl:text>,"</xsl:text>
|
||||||
-->
|
<xsl:value-of select="@part"/><xsl:text>","</xsl:text>
|
||||||
|
<xsl:value-of select="description"/><xsl:text>","</xsl:text>
|
||||||
<xsl:value-of select="@part"/><xsl:text>,</xsl:text>
|
|
||||||
<xsl:value-of select="description"/><xsl:text>,</xsl:text>
|
|
||||||
<xsl:value-of select="@lib"/>
|
<xsl:value-of select="@lib"/>
|
||||||
|
|
||||||
<xsl:text>&nl;</xsl:text>
|
<xsl:text>"&nl;</xsl:text>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="/export">
|
<xsl:template match="/export">
|
||||||
<xsl:text>qty,partname,description,lib&nl;</xsl:text>
|
<xsl:text>Qty,partname,description,lib&nl;</xsl:text>
|
||||||
<xsl:apply-templates select="libparts/libpart"/>
|
<xsl:apply-templates select="libparts/libpart"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
|
@ -90,9 +90,6 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
|
||||||
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
|
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
|
||||||
EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
|
EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
|
||||||
|
|
||||||
EVT_TOOL( wxID_CUT, GERBVIEW_FRAME::Process_Special_Functions )
|
|
||||||
EVT_TOOL( wxID_COPY, GERBVIEW_FRAME::Process_Special_Functions )
|
|
||||||
EVT_TOOL( wxID_PASTE, GERBVIEW_FRAME::Process_Special_Functions )
|
|
||||||
EVT_TOOL( wxID_UNDO, GERBVIEW_FRAME::Process_Special_Functions )
|
EVT_TOOL( wxID_UNDO, GERBVIEW_FRAME::Process_Special_Functions )
|
||||||
EVT_TOOL( wxID_PRINT, GERBVIEW_FRAME::ToPrinter )
|
EVT_TOOL( wxID_PRINT, GERBVIEW_FRAME::ToPrinter )
|
||||||
EVT_COMBOBOX( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
|
EVT_COMBOBOX( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
|
||||||
|
@ -145,9 +142,6 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
|
|
||||||
switch( id )
|
switch( id )
|
||||||
{
|
{
|
||||||
case wxID_CUT:
|
|
||||||
case wxID_COPY:
|
|
||||||
case ID_POPUP_DELETE_BLOCK:
|
|
||||||
case ID_POPUP_PLACE_BLOCK:
|
case ID_POPUP_PLACE_BLOCK:
|
||||||
case ID_POPUP_ZOOM_BLOCK:
|
case ID_POPUP_ZOOM_BLOCK:
|
||||||
break;
|
break;
|
||||||
|
@ -219,12 +213,6 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
HandleBlockEnd( &dc );
|
HandleBlockEnd( &dc );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_DELETE_BLOCK:
|
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_DELETE );
|
|
||||||
GetScreen()->m_BlockLocate.SetMessageBlock( this );
|
|
||||||
HandleBlockEnd( &dc );
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( wxT( "GERBVIEW_FRAME::Process_Special_Functions error" ) );
|
wxFAIL_MSG( wxT( "GERBVIEW_FRAME::Process_Special_Functions error" ) );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -80,7 +80,7 @@ void GERBVIEW_FRAME::Files_io( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_GERBVIEW_ERASE_ALL:
|
case ID_GERBVIEW_ERASE_ALL:
|
||||||
Clear_DrawLayers( true );
|
Clear_DrawLayers( false );
|
||||||
Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
ClearMsgPanel();
|
ClearMsgPanel();
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
#include <class_drawpanel.h>
|
#include <class_drawpanel.h>
|
||||||
#include <confirm.h>
|
|
||||||
#include <id.h>
|
#include <id.h>
|
||||||
|
|
||||||
#include <gerbview.h>
|
#include <gerbview.h>
|
||||||
|
@ -75,8 +74,6 @@ bool GERBVIEW_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||||
PopMenu->AppendSeparator();
|
PopMenu->AppendSeparator();
|
||||||
AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK,
|
AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK,
|
||||||
_( "Place Block" ), KiBitmap( checked_ok_xpm ) );
|
_( "Place Block" ), KiBitmap( checked_ok_xpm ) );
|
||||||
AddMenuItem( PopMenu, ID_POPUP_DELETE_BLOCK,
|
|
||||||
_( "Delete Block (ctrl + drag mouse)" ), KiBitmap( delete_xpm ) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,7 @@ enum DSN_SYNTAX_T {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class DLEXER
|
* Class DSNLEXER
|
||||||
* implements a lexical analyzer for the SPECCTRA DSN file format. It
|
* implements a lexical analyzer for the SPECCTRA DSN file format. It
|
||||||
* reads lexical tokens from the current LINE_READER through the NextTok()
|
* reads lexical tokens from the current LINE_READER through the NextTok()
|
||||||
* function.
|
* function.
|
||||||
|
@ -215,6 +215,16 @@ public:
|
||||||
|
|
||||||
virtual ~DSNLEXER();
|
virtual ~DSNLEXER();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Useable only for DSN lexers which share the same LINE_READER
|
||||||
|
* Synchronizes the pointers handling the data read by the LINE_READER
|
||||||
|
* Allows 2 DNSLEXER to share the same current line, when switching from a
|
||||||
|
* DNSLEXER to an other DNSLEXER
|
||||||
|
* @param aLexer = the model
|
||||||
|
* @return true if the sync can be made ( at least the same line reader )
|
||||||
|
*/
|
||||||
|
bool SyncLineReaderWith( DSNLEXER& aLexer );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SetSpecctraMode
|
* Function SetSpecctraMode
|
||||||
* changes the behavior of this lexer into or out of "specctra mode". If
|
* changes the behavior of this lexer into or out of "specctra mode". If
|
||||||
|
|
|
@ -580,7 +580,10 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( CPOLYGONS_LIST& aCornerBuffer
|
||||||
ClipperLib::Paths shapeWithClearance;
|
ClipperLib::Paths shapeWithClearance;
|
||||||
|
|
||||||
for( int ii = 0; ii < 4; ii++ )
|
for( int ii = 0; ii < 4; ii++ )
|
||||||
|
{
|
||||||
|
corners[ii] += PadShapePos;
|
||||||
outline << ClipperLib::IntPoint( corners[ii].x, corners[ii].y );
|
outline << ClipperLib::IntPoint( corners[ii].x, corners[ii].y );
|
||||||
|
}
|
||||||
|
|
||||||
ClipperLib::ClipperOffset offset_engine;
|
ClipperLib::ClipperOffset offset_engine;
|
||||||
// Prepare an offset (inflate) transform, with edges connected by arcs
|
// Prepare an offset (inflate) transform, with edges connected by arcs
|
||||||
|
@ -600,19 +603,7 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( CPOLYGONS_LIST& aCornerBuffer
|
||||||
offset_engine.Execute( shapeWithClearance, rounding_radius );
|
offset_engine.Execute( shapeWithClearance, rounding_radius );
|
||||||
|
|
||||||
// get new outline (only one polygon is expected)
|
// get new outline (only one polygon is expected)
|
||||||
// For info, ClipperLib uses long long to handle integer coordinates
|
aCornerBuffer.ImportFrom( shapeWithClearance );
|
||||||
ClipperLib::Path& polygon = shapeWithClearance[0];
|
|
||||||
|
|
||||||
for( unsigned jj = 0; jj < polygon.size(); jj++ )
|
|
||||||
{
|
|
||||||
corner_position.x = int( polygon[jj].X );
|
|
||||||
corner_position.y = int( polygon[jj].Y );
|
|
||||||
corner_position += PadShapePos;
|
|
||||||
CPolyPt polypoint( corner_position.x, corner_position.y );
|
|
||||||
aCornerBuffer.Append( polypoint );
|
|
||||||
}
|
|
||||||
|
|
||||||
aCornerBuffer.CloseLastContour();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1008,7 +999,6 @@ void CreateThermalReliefPadPolygon( CPOLYGONS_LIST& aCornerBuffer,
|
||||||
|
|
||||||
double angle = aPad.GetOrientation();
|
double angle = aPad.GetOrientation();
|
||||||
int rounding_radius = KiROUND( aThermalGap * aCorrectionFactor ); // Corner rounding radius
|
int rounding_radius = KiROUND( aThermalGap * aCorrectionFactor ); // Corner rounding radius
|
||||||
double angle_pg; // Polygon increment angle
|
|
||||||
|
|
||||||
for( int i = 0; i < aCircleToSegmentsCount / 4 + 1; i++ )
|
for( int i = 0; i < aCircleToSegmentsCount / 4 + 1; i++ )
|
||||||
{
|
{
|
||||||
|
@ -1016,7 +1006,7 @@ void CreateThermalReliefPadPolygon( CPOLYGONS_LIST& aCornerBuffer,
|
||||||
|
|
||||||
// Start at half increment offset
|
// Start at half increment offset
|
||||||
RotatePoint( &corner_position, 1800.0 / aCircleToSegmentsCount );
|
RotatePoint( &corner_position, 1800.0 / aCircleToSegmentsCount );
|
||||||
angle_pg = i * delta;
|
double angle_pg = i * delta;
|
||||||
|
|
||||||
RotatePoint( &corner_position, angle_pg ); // Rounding vector rotation
|
RotatePoint( &corner_position, angle_pg ); // Rounding vector rotation
|
||||||
corner_position -= aPad.GetSize() / 2; // Rounding vector + Pad corner offset
|
corner_position -= aPad.GetSize() / 2; // Rounding vector + Pad corner offset
|
||||||
|
|
|
@ -898,3 +898,14 @@ wxString ZONE_CONTAINER::GetSelectMenuText() const
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Copy polygons stored in aKiPolyList to m_FilledPolysList
|
||||||
|
* The previous m_FilledPolysList contents is replaced.
|
||||||
|
*/
|
||||||
|
void ZONE_CONTAINER::CopyPolygonsFromClipperPathsToFilledPolysList(
|
||||||
|
ClipperLib::Paths& aClipperPolyList )
|
||||||
|
{
|
||||||
|
m_FilledPolysList.RemoveAllContours();
|
||||||
|
m_FilledPolysList.ImportFrom( aClipperPolyList );
|
||||||
|
}
|
||||||
|
|
|
@ -305,6 +305,14 @@ public:
|
||||||
*/
|
*/
|
||||||
void CopyPolygonsFromKiPolygonListToFilledPolysList( KI_POLYGON_SET& aKiPolyList );
|
void CopyPolygonsFromKiPolygonListToFilledPolysList( KI_POLYGON_SET& aKiPolyList );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function CopyPolygonsFromClipperPathsToFilledPolysList
|
||||||
|
* Copy polygons stored in aKiPolyList to m_FilledPolysList
|
||||||
|
* The previous m_FilledPolysList contents is replaced.
|
||||||
|
* @param aClipperPolyList = a ClipperLib::Paths containing polygons.
|
||||||
|
*/
|
||||||
|
void CopyPolygonsFromClipperPathsToFilledPolysList( ClipperLib::Paths& aClipperPolyList );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function CopyPolygonsFromFilledPolysListToKiPolygonList
|
* Function CopyPolygonsFromFilledPolysListToKiPolygonList
|
||||||
* Copy polygons from m_FilledPolysList to aKiPolyList
|
* Copy polygons from m_FilledPolysList to aKiPolyList
|
||||||
|
|
|
@ -1938,14 +1938,39 @@ void EAGLE_PLUGIN::packageWire( MODULE* aModule, CPTREE& aTree ) const
|
||||||
wxPoint end( kicad_x( w.x2 ), kicad_y( w.y2 ) );
|
wxPoint end( kicad_x( w.x2 ), kicad_y( w.y2 ) );
|
||||||
int width = kicad( w.width );
|
int width = kicad( w.width );
|
||||||
|
|
||||||
EDGE_MODULE* dwg = new EDGE_MODULE( aModule, S_SEGMENT );
|
EDGE_MODULE* dwg;
|
||||||
aModule->GraphicalItems().PushBack( dwg );
|
if( !w.curve )
|
||||||
|
{
|
||||||
|
dwg = new EDGE_MODULE( aModule, S_SEGMENT );
|
||||||
|
|
||||||
dwg->SetStart0( start );
|
dwg->SetStart0( start );
|
||||||
dwg->SetEnd0( end );
|
dwg->SetEnd0( end );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dwg = new EDGE_MODULE( aModule, S_ARC );
|
||||||
|
// Eagle give us start and end.
|
||||||
|
// S_ARC wants start to give the centre, and end to give the start
|
||||||
|
double dx = end.x - start.x, dy = end.y - start.y;
|
||||||
|
wxPoint mid = (start + end) / 2;
|
||||||
|
|
||||||
|
double dlen = sqrt( dx*dx + dy*dy );
|
||||||
|
double dist = dlen / ( 2 * tan( DEG2RAD( *w.curve ) / 2 ) );
|
||||||
|
|
||||||
|
wxPoint centre(
|
||||||
|
mid.x + dist * ( dy / dlen ),
|
||||||
|
mid.y - dist * ( dx / dlen )
|
||||||
|
);
|
||||||
|
|
||||||
|
dwg->SetStart0( centre );
|
||||||
|
dwg->SetEnd0( start );
|
||||||
|
dwg->SetAngle( *w.curve * -10.0 ); // KiCad rotates the other way
|
||||||
|
}
|
||||||
|
|
||||||
dwg->SetLayer( layer );
|
dwg->SetLayer( layer );
|
||||||
dwg->SetWidth( width );
|
dwg->SetWidth( width );
|
||||||
|
|
||||||
|
aModule->GraphicalItems().PushBack( dwg );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -541,6 +541,9 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_PCB_DELETE_ZONE_CONTAINER:
|
case ID_POPUP_PCB_DELETE_ZONE_CONTAINER:
|
||||||
|
// Force the main contour selection, to remove the entire zone:
|
||||||
|
((ZONE_CONTAINER*) GetCurItem())->SetSelectedCorner( 0 );
|
||||||
|
// Fall through
|
||||||
case ID_POPUP_PCB_DELETE_ZONE_CUTOUT:
|
case ID_POPUP_PCB_DELETE_ZONE_CUTOUT:
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,9 +41,7 @@
|
||||||
#include <class_module.h>
|
#include <class_module.h>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/* Event handler for tracks and vias size selection (and some options)
|
||||||
* Function Tracks_and_Vias_Size_Event
|
|
||||||
* Event handler for tracks and vias size selection (and some options)
|
|
||||||
* relative to toolbars and popup events
|
* relative to toolbars and popup events
|
||||||
*/
|
*/
|
||||||
void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
|
void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
|
||||||
|
@ -142,5 +140,7 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
|
||||||
}*/
|
}*/
|
||||||
//+hp
|
//+hp
|
||||||
//Refresh canvas, that we can see changes instantly. I use this because it dont,t throw mouse up-left corner.
|
//Refresh canvas, that we can see changes instantly. I use this because it dont,t throw mouse up-left corner.
|
||||||
|
|
||||||
|
if( m_canvas->IsMouseCaptured() )
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,6 +126,10 @@ static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL Canvas" ),
|
||||||
static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo Canvas" ),
|
static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo Canvas" ),
|
||||||
HK_CANVAS_CAIRO, WXK_F12 );
|
HK_CANVAS_CAIRO, WXK_F12 );
|
||||||
|
|
||||||
|
static EDA_HOTKEY HkZoneFillOrRefill( wxT( "Fill or Refill All Zones" ),
|
||||||
|
HK_ZONE_FILL_OR_REFILL, 'B' );
|
||||||
|
static EDA_HOTKEY HkZoneRemoveFilled( wxT( "Remove Filled Areas in All Zones" ),
|
||||||
|
HK_ZONE_REMOVE_FILLED, 'N' );
|
||||||
/* Fit on Screen */
|
/* Fit on Screen */
|
||||||
#if !defined( __WXMAC__ )
|
#if !defined( __WXMAC__ )
|
||||||
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
|
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
|
||||||
|
@ -289,6 +293,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] =
|
||||||
&HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9,
|
&HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9,
|
||||||
&HkSwitchHighContrastMode,
|
&HkSwitchHighContrastMode,
|
||||||
&HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL,
|
&HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL,
|
||||||
|
&HkZoneFillOrRefill, &HkZoneRemoveFilled,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,9 @@ enum hotkey_id_commnand {
|
||||||
HK_CANVAS_OPENGL,
|
HK_CANVAS_OPENGL,
|
||||||
HK_CANVAS_CAIRO,
|
HK_CANVAS_CAIRO,
|
||||||
HK_LEFT_CLICK,
|
HK_LEFT_CLICK,
|
||||||
HK_LEFT_DCLICK
|
HK_LEFT_DCLICK,
|
||||||
|
HK_ZONE_FILL_OR_REFILL,
|
||||||
|
HK_ZONE_REMOVE_FILLED
|
||||||
};
|
};
|
||||||
|
|
||||||
// Full list of hotkey descriptors for board editor and footprint editor
|
// Full list of hotkey descriptors for board editor and footprint editor
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include <pcbnew.h>
|
#include <pcbnew.h>
|
||||||
#include <pcbnew_id.h>
|
#include <pcbnew_id.h>
|
||||||
#include <hotkeys.h>
|
#include <hotkeys.h>
|
||||||
|
#include <class_zone.h>
|
||||||
|
|
||||||
/* How to add a new hotkey:
|
/* How to add a new hotkey:
|
||||||
* see hotkeys.cpp
|
* see hotkeys.cpp
|
||||||
|
@ -566,6 +567,13 @@ bool PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
||||||
case HK_CANVAS_DEFAULT:
|
case HK_CANVAS_DEFAULT:
|
||||||
evt_type = ID_MENU_CANVAS_DEFAULT;
|
evt_type = ID_MENU_CANVAS_DEFAULT;
|
||||||
break;
|
break;
|
||||||
|
case HK_ZONE_FILL_OR_REFILL:
|
||||||
|
evt_type = ID_POPUP_PCB_FILL_ALL_ZONES;
|
||||||
|
break;
|
||||||
|
case HK_ZONE_REMOVE_FILLED:
|
||||||
|
evt_type = ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_ALL_ZONES;
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( evt_type != 0 )
|
if( evt_type != 0 )
|
||||||
|
|
|
@ -319,10 +319,14 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
||||||
if( GetBoard()->m_ZoneDescriptorList.size() > 0 )
|
if( GetBoard()->m_ZoneDescriptorList.size() > 0 )
|
||||||
{
|
{
|
||||||
aPopMenu->AppendSeparator();
|
aPopMenu->AppendSeparator();
|
||||||
|
msg = AddHotkeyName( _( "Fill or Refill All Zones" ),
|
||||||
|
g_Board_Editor_Hokeys_Descr, HK_ZONE_FILL_OR_REFILL );
|
||||||
AddMenuItem( aPopMenu, ID_POPUP_PCB_FILL_ALL_ZONES,
|
AddMenuItem( aPopMenu, ID_POPUP_PCB_FILL_ALL_ZONES,
|
||||||
_( "Fill or Refill All Zones" ), KiBitmap( fill_zone_xpm ) );
|
msg, KiBitmap( fill_zone_xpm ) );
|
||||||
|
msg = AddHotkeyName( _( "Remove Filled Areas in All Zones" ),
|
||||||
|
g_Board_Editor_Hokeys_Descr, HK_ZONE_REMOVE_FILLED );
|
||||||
AddMenuItem( aPopMenu, ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_ALL_ZONES,
|
AddMenuItem( aPopMenu, ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_ALL_ZONES,
|
||||||
_( "Remove Filled Areas in All Zones" ), KiBitmap( zone_unfill_xpm ) );
|
msg, KiBitmap( zone_unfill_xpm ) );
|
||||||
aPopMenu->AppendSeparator();
|
aPopMenu->AppendSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1135,12 +1135,14 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR )
|
||||||
{
|
{
|
||||||
PCB_PLOT_PARAMS plotParams;
|
PCB_PLOT_PARAMS plotParams;
|
||||||
PCB_PLOT_PARAMS_PARSER parser( reader );
|
PCB_PLOT_PARAMS_PARSER parser( reader );
|
||||||
|
// parser must share the same current line as our current PCB parser
|
||||||
|
// synchronize it.
|
||||||
|
parser.SyncLineReaderWith( *this );
|
||||||
|
|
||||||
plotParams.Parse( &parser );
|
plotParams.Parse( &parser );
|
||||||
m_board->SetPlotOptions( plotParams );
|
SyncLineReaderWith( parser );
|
||||||
|
|
||||||
// I don't know why but this seems to fix a problem in PCB_PLOT_PARAMS::Parse().
|
m_board->SetPlotOptions( plotParams );
|
||||||
NextTok();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wx/wx.h>
|
//#include <wx/wx.h>
|
||||||
#include <pcb_plot_params_parser.h>
|
#include <pcb_plot_params_parser.h>
|
||||||
#include <pcb_plot_params.h>
|
#include <pcb_plot_params.h>
|
||||||
#include <layers_id_colors_and_visibility.h>
|
#include <layers_id_colors_and_visibility.h>
|
||||||
|
|
|
@ -773,12 +773,25 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter,
|
||||||
|
|
||||||
zone->TransformOutlinesShapeWithClearanceToPolygon( bufferPolys,
|
zone->TransformOutlinesShapeWithClearanceToPolygon( bufferPolys,
|
||||||
inflate, true );
|
inflate, true );
|
||||||
|
zone->TransformOutlinesShapeWithClearanceToPolygon( initialPolys,
|
||||||
|
0, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// To avoid a lot of code, use a ZONE_CONTAINER
|
||||||
|
// to handle and plot polygons, because our polygons look exactly like
|
||||||
|
// filled areas in zones
|
||||||
|
// Note, also this code is not optimized: it creates a lot of copy/duplicate data
|
||||||
|
// However it is not complex, and fast enough for plot purposes (copy/convert data
|
||||||
|
// is only a very small calculation time for these calculations)
|
||||||
|
ZONE_CONTAINER zone( aBoard );
|
||||||
|
zone.SetArcSegmentCount( 32 );
|
||||||
|
zone.SetMinThickness( 0 ); // trace polygons only
|
||||||
|
zone.SetLayer ( layer );
|
||||||
|
|
||||||
// Now:
|
// Now:
|
||||||
// 1 - merge areas which are intersecting, i.e. remove gaps
|
// 1 - merge polygons which are intersecting, i.e. remove gaps
|
||||||
// having a thickness < aMinThickness
|
// having a thickness < aMinThickness
|
||||||
// 2 - deflate resulting areas by aMinThickness/2
|
// 2 - deflate resulting polygons by aMinThickness/2
|
||||||
KI_POLYGON_SET areasToMerge;
|
KI_POLYGON_SET areasToMerge;
|
||||||
bufferPolys.ExportTo( areasToMerge );
|
bufferPolys.ExportTo( areasToMerge );
|
||||||
KI_POLYGON_SET initialAreas;
|
KI_POLYGON_SET initialAreas;
|
||||||
|
@ -788,29 +801,44 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter,
|
||||||
// = aMinThickness/2, shapes too close ( dist < aMinThickness )
|
// = aMinThickness/2, shapes too close ( dist < aMinThickness )
|
||||||
// will be merged, because they are overlapping
|
// will be merged, because they are overlapping
|
||||||
KI_POLYGON_SET areas;
|
KI_POLYGON_SET areas;
|
||||||
areas |= areasToMerge;
|
areas |= areasToMerge; // Populates with merged polygons
|
||||||
|
|
||||||
// Deflate: remove the extra margin, to create the actual shapes
|
// Deflate: remove the extra margin, to create the actual shapes
|
||||||
// Here I am using polygon:resize, because this function creates better shapes
|
// Here I am using polygon:resize, because this function creates better shapes
|
||||||
// than deflate algo.
|
// than deflate algo.
|
||||||
// Use here deflate with arc creation and 18 segments per circle to create arcs
|
// Use here deflate made by Clipper, because:
|
||||||
// In boost polygon (at least v 1.54 and previous) in very rare cases resize crashes
|
// Clipper is (by far) faster and better, event using arcs to deflate shapes
|
||||||
// with 16 segments (perhaps related to 45 degrees pads). So using 18 segments
|
// boost::polygon < 1.56 polygon resize function sometimes crashes when deflating using arcs
|
||||||
// is a workaround to try to avoid these crashes
|
// boost::polygon >=1.56 polygon resize function just does not work
|
||||||
areas = resize( areas, -inflate , true, 18 );
|
// Note also we combine polygons using boost::polygon, which works better than Clipper,
|
||||||
|
// especially with zones using holes linked to main outlines by overlapping segments
|
||||||
|
CPOLYGONS_LIST tmp;
|
||||||
|
tmp.ImportFrom( areas );
|
||||||
|
|
||||||
// Resize slightly changes shapes. So *ensure* initial shapes are kept
|
// Deflate area using Clipper, better than boost::polygon
|
||||||
|
ClipperLib::Paths areasDeflate;
|
||||||
|
tmp.ExportTo( areasDeflate );
|
||||||
|
|
||||||
|
// Deflate areas: they will have the right size after deflate
|
||||||
|
ClipperLib::ClipperOffset offset_engine;
|
||||||
|
circleToSegmentsCount = 16;
|
||||||
|
offset_engine.ArcTolerance = (double)inflate / 3.14 / circleToSegmentsCount;
|
||||||
|
offset_engine.AddPaths( areasDeflate, ClipperLib::jtRound, ClipperLib::etClosedPolygon );
|
||||||
|
offset_engine.Execute( areasDeflate, -inflate );
|
||||||
|
|
||||||
|
// Combine the current areas to initial areas. This is mandatory because
|
||||||
|
// inflate/deflate transform is not perfect, and we want the initial areas perfectly kept
|
||||||
|
tmp.RemoveAllContours();
|
||||||
|
tmp.ImportFrom( areasDeflate );
|
||||||
|
areas.clear();
|
||||||
|
tmp.ExportTo( areas );
|
||||||
|
|
||||||
|
// Resize slightly changes shapes (the transform is not perfect).
|
||||||
|
// So *ensure* initial shapes are kept
|
||||||
areas |= initialAreas;
|
areas |= initialAreas;
|
||||||
|
|
||||||
// To avoid a lot of code, use a ZONE_CONTAINER
|
|
||||||
// to plot polygons, because they are exactly like
|
|
||||||
// filled areas in zones
|
|
||||||
ZONE_CONTAINER zone( aBoard );
|
|
||||||
zone.SetArcSegmentCount( 32 );
|
|
||||||
zone.SetMinThickness( 0 ); // trace polygons only
|
|
||||||
zone.SetLayer ( layer );
|
|
||||||
|
|
||||||
zone.CopyPolygonsFromKiPolygonListToFilledPolysList( areas );
|
zone.CopyPolygonsFromKiPolygonListToFilledPolysList( areas );
|
||||||
|
|
||||||
itemplotter.PlotFilledAreas( &zone );
|
itemplotter.PlotFilledAreas( &zone );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
//#include <pgm_base.h>
|
|
||||||
#include <kiface_i.h>
|
#include <kiface_i.h>
|
||||||
#include <class_drawpanel.h>
|
#include <class_drawpanel.h>
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@ from sys import argv,exit
|
||||||
|
|
||||||
if len(argv)<2:
|
if len(argv)<2:
|
||||||
print "usage:"
|
print "usage:"
|
||||||
print " fixswigimports.py file.py"
|
print " fix_swig_imports.py file.py"
|
||||||
print ""
|
print ""
|
||||||
print " will fix the swig import code for working inside KiCad"
|
print " will fix the swig import code for working inside KiCad"
|
||||||
print " where it happended that the external _pcbnew.so/dll was"
|
print " where it happended that the external _pcbnew.so/dll was"
|
||||||
|
@ -52,7 +52,7 @@ if doneOk:
|
||||||
print "swig_import_helper fixed for",filename
|
print "swig_import_helper fixed for",filename
|
||||||
else:
|
else:
|
||||||
print "Error: the swig import helper was not fixed, check",filename
|
print "Error: the swig import helper was not fixed, check",filename
|
||||||
print " and fix this script: fixswigimports.py"
|
print " and fix this script: fix_swig_imports.py"
|
||||||
exit(2)
|
exit(2)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
bom_?.py are some python scripts which read a generic xml netlist from eeschema,
|
bom_?.py are some python scripts which read a generic xml netlist from eeschema,
|
||||||
and create a bom.
|
and create a bom.
|
||||||
|
|
||||||
All examples use ky_generic_netlist_reader.py, which is a python utility to read
|
All examples use ky_netlist_reader.py, which is a python utility to read
|
||||||
and parse this generic xml netlist and create the corresponding data
|
and parse this generic xml netlist and create the corresponding data
|
||||||
used to build the bom.
|
used to build the bom.
|
||||||
|
|
||||||
|
@ -12,3 +12,27 @@ python bom_example?.py <netlist name> <bom list netname>
|
||||||
|
|
||||||
See Eeschema doc, chapter 14 for info about the generic xml netlist format,
|
See Eeschema doc, chapter 14 for info about the generic xml netlist format,
|
||||||
and how to run a script from Eeschema to create a customized netlist or BOM.
|
and how to run a script from Eeschema to create a customized netlist or BOM.
|
||||||
|
|
||||||
|
If the python comment
|
||||||
|
"""
|
||||||
|
@package
|
||||||
|
some comments
|
||||||
|
"""
|
||||||
|
is added to the begining of the python script, the comment will be displayed
|
||||||
|
in Eescheam, in the BOM dialog
|
||||||
|
|
||||||
|
For instance:
|
||||||
|
"""
|
||||||
|
@package
|
||||||
|
Generate a HTML BOM list.
|
||||||
|
Components are sorted and grouped by value
|
||||||
|
Fields are (if exist)
|
||||||
|
Ref, Quantity, Value, Part, Datasheet, Description, Vendor
|
||||||
|
"""
|
||||||
|
|
||||||
|
displays:
|
||||||
|
Generate a HTML BOM list.
|
||||||
|
Components are sorted and grouped by value
|
||||||
|
Fields are (if exist)
|
||||||
|
Ref, Quantity, Value, Part, Datasheet, Description, Vendor
|
||||||
|
in BOM dialog
|
||||||
|
|
|
@ -4,6 +4,15 @@
|
||||||
# Example: Sorted and Grouped HTML BOM with more advanced grouping
|
# Example: Sorted and Grouped HTML BOM with more advanced grouping
|
||||||
#
|
#
|
||||||
|
|
||||||
|
"""
|
||||||
|
@package
|
||||||
|
Generate a HTML BOM list.
|
||||||
|
Components are sorted and grouped by value
|
||||||
|
Fields are (if exist)
|
||||||
|
Ref, Quantity, Value, Part, Datasheet, Description, Vendor
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
# Import the KiCad python helper module and the csv formatter
|
# Import the KiCad python helper module and the csv formatter
|
||||||
|
@ -74,8 +83,9 @@ net = kicad_netlist_reader.netlist(sys.argv[1])
|
||||||
try:
|
try:
|
||||||
f = open(sys.argv[2], 'w')
|
f = open(sys.argv[2], 'w')
|
||||||
except IOError:
|
except IOError:
|
||||||
|
e = "Can't open output file for writing: " + sys.argv[2]
|
||||||
print(__file__, ":", e, file=sys.stderr)
|
print(__file__, ":", e, file=sys.stderr)
|
||||||
f = stdout
|
f = sys.stdout
|
||||||
|
|
||||||
# Output a set of rows for a header providing general information
|
# Output a set of rows for a header providing general information
|
||||||
html = html.replace('<!--SOURCE-->', net.getSource())
|
html = html.replace('<!--SOURCE-->', net.getSource())
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
#
|
#
|
||||||
# Example python script to generate a BOM from a KiCad generic netlist
|
# Example python script to generate a BOM from a KiCad generic netlist
|
||||||
#
|
#
|
||||||
# Example: Tab delimited list (The same as std output) Ungrouped
|
"""
|
||||||
#
|
@package
|
||||||
|
Generate a csv list file.
|
||||||
|
Components are sorted by ref and grouped by value
|
||||||
|
One component per line
|
||||||
|
Fields are (if exist)
|
||||||
|
Ref, Quantity, value, Part, footprint, 'Description', 'Vendor'
|
||||||
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
@ -20,8 +26,9 @@ net = kicad_netlist_reader.netlist(sys.argv[1])
|
||||||
try:
|
try:
|
||||||
f = open(sys.argv[2], 'w')
|
f = open(sys.argv[2], 'w')
|
||||||
except IOError:
|
except IOError:
|
||||||
print(__file__, ":", e, file=sys.stderr)
|
e = "Can't open output file for writing: " + sys.argv[2]
|
||||||
f = stdout
|
print(__file__, ":", e, sys.stderr)
|
||||||
|
f = sys.stdout
|
||||||
|
|
||||||
# Create a new csv writer object to use as the output formatter, although we
|
# Create a new csv writer object to use as the output formatter, although we
|
||||||
# are created a tab delimited list instead!
|
# are created a tab delimited list instead!
|
||||||
|
|
|
@ -4,6 +4,15 @@
|
||||||
# Example: Ungrouped (One component per row) CSV output
|
# Example: Ungrouped (One component per row) CSV output
|
||||||
#
|
#
|
||||||
|
|
||||||
|
"""
|
||||||
|
@package
|
||||||
|
Generate a csv list file.
|
||||||
|
Components are sorted by ref and grouped by value
|
||||||
|
One component per line
|
||||||
|
Fields are (if exist)
|
||||||
|
Ref, value, Part, footprint, Datasheet, Manufacturer, Vendor
|
||||||
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
# Import the KiCad python helper module
|
# Import the KiCad python helper module
|
||||||
|
@ -20,8 +29,9 @@ net = kicad_netlist_reader.netlist(sys.argv[1])
|
||||||
try:
|
try:
|
||||||
f = open(sys.argv[2], 'w')
|
f = open(sys.argv[2], 'w')
|
||||||
except IOError:
|
except IOError:
|
||||||
print(__file__, ":", e, file=sys.stderr)
|
e = "Can't open output file for writing: " + sys.argv[2]
|
||||||
f = stdout
|
print( __file__, ":", e, sys.stderr )
|
||||||
|
f = sys.stdout
|
||||||
|
|
||||||
# Create a new csv writer object to use as the output formatter
|
# Create a new csv writer object to use as the output formatter
|
||||||
out = csv.writer(f, lineterminator='\n', delimiter=',', quotechar="\"", quoting=csv.QUOTE_ALL)
|
out = csv.writer(f, lineterminator='\n', delimiter=',', quotechar="\"", quoting=csv.QUOTE_ALL)
|
||||||
|
|
|
@ -27,7 +27,7 @@ try:
|
||||||
f = open(sys.argv[2], 'w')
|
f = open(sys.argv[2], 'w')
|
||||||
except IOError:
|
except IOError:
|
||||||
e = "Can't open output file for writing: " + sys.argv[2]
|
e = "Can't open output file for writing: " + sys.argv[2]
|
||||||
print(__file__, ":", e, file=sys.stderr)
|
print( __file__, ":", e, sys.stderr )
|
||||||
f = sys.stdout
|
f = sys.stdout
|
||||||
|
|
||||||
# subset the components to those wanted in the BOM, controlled
|
# subset the components to those wanted in the BOM, controlled
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
#
|
||||||
|
# Example python script to generate a BOM from a KiCad generic netlist
|
||||||
|
#
|
||||||
|
# Example: Sorted and Grouped CSV BOM
|
||||||
|
#
|
||||||
|
|
||||||
|
"""
|
||||||
|
@package
|
||||||
|
Generate a Tab delimited list (csv file type).
|
||||||
|
Components are sorted by ref and grouped by value
|
||||||
|
Fields are (if exist)
|
||||||
|
'Ref', 'Qnty', 'Value', 'Sch lib name', 'footprint', 'Description', 'Vendor'
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Import the KiCad python helper module and the csv formatter
|
||||||
|
import kicad_netlist_reader
|
||||||
|
import csv
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Generate an instance of a generic netlist, and load the netlist tree from
|
||||||
|
# the command line option. If the file doesn't exist, execution will stop
|
||||||
|
net = kicad_netlist_reader.netlist(sys.argv[1])
|
||||||
|
|
||||||
|
# Open a file to write to, if the file cannot be opened output to stdout
|
||||||
|
# instead
|
||||||
|
try:
|
||||||
|
f = open(sys.argv[2], 'w')
|
||||||
|
except IOError:
|
||||||
|
e = "Can't open output file for writing: " + sys.argv[2]
|
||||||
|
print(__file__, ":", e, sys.stderr)
|
||||||
|
f = sys.stdout
|
||||||
|
|
||||||
|
# Create a new csv writer object to use as the output formatter
|
||||||
|
out = csv.writer(f, lineterminator='\n', delimiter=',', quotechar='\"', quoting=csv.QUOTE_ALL)
|
||||||
|
|
||||||
|
# Output a set of rows for a header providing general information
|
||||||
|
out.writerow(['Source:', net.getSource()])
|
||||||
|
out.writerow(['Date:', net.getDate()])
|
||||||
|
out.writerow(['Tool:', net.getTool()])
|
||||||
|
out.writerow(['Component Count:', len(net.components)])
|
||||||
|
out.writerow(['Ref', 'Qnty', 'Value', 'Sch lib name', 'footprint', 'Description', 'Vendor'])
|
||||||
|
|
||||||
|
# Get all of the components in groups of matching parts + values
|
||||||
|
# (see ky_generic_netlist_reader.py)
|
||||||
|
grouped = net.groupComponents()
|
||||||
|
|
||||||
|
# Output all of the component information
|
||||||
|
for group in grouped:
|
||||||
|
refs = ""
|
||||||
|
|
||||||
|
# Add the reference of every component in the group and keep a reference
|
||||||
|
# to the component so that the other data can be filled in once per group
|
||||||
|
for component in group:
|
||||||
|
refs += component.getRef() + ", "
|
||||||
|
c = component
|
||||||
|
|
||||||
|
# Fill in the component groups common data
|
||||||
|
out.writerow([refs, len(group), c.getValue(), c.getLibName() + "/" + c.getPartName(), c.getFootprint(),
|
||||||
|
c.getDescription(), c.getField("Vendor")])
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,15 @@
|
||||||
# Example: Sorted and Grouped HTML BOM with more advanced grouping
|
# Example: Sorted and Grouped HTML BOM with more advanced grouping
|
||||||
#
|
#
|
||||||
|
|
||||||
|
"""
|
||||||
|
@package
|
||||||
|
Generate a HTML BOM list.
|
||||||
|
Components are sorted and grouped by ref
|
||||||
|
Fields are (if exist)
|
||||||
|
Ref, Quantity, Value, Part, Datasheet, Description, Vendor
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
# Import the KiCad python helper module and the csv formatter
|
# Import the KiCad python helper module and the csv formatter
|
||||||
|
@ -74,8 +83,9 @@ net = kicad_netlist_reader.netlist(sys.argv[1])
|
||||||
try:
|
try:
|
||||||
f = open(sys.argv[2], 'w')
|
f = open(sys.argv[2], 'w')
|
||||||
except IOError:
|
except IOError:
|
||||||
print(__file__, ":", e, file=sys.stderr)
|
e = "Can't open output file for writing: " + sys.argv[2]
|
||||||
f = stdout
|
print( __file__, ":", e, sys.stderr )
|
||||||
|
f = sys.stdout
|
||||||
|
|
||||||
components = net.getInterestingComponents()
|
components = net.getInterestingComponents()
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,13 @@
|
||||||
#
|
#
|
||||||
# Example: Sorted and Grouped HTML BOM
|
# Example: Sorted and Grouped HTML BOM
|
||||||
#
|
#
|
||||||
|
"""
|
||||||
|
@package
|
||||||
|
Generate a HTML BOM list.
|
||||||
|
Components are sorted by ref and grouped by value
|
||||||
|
Fields are (if exist)
|
||||||
|
Ref, Quantity, Value, Part, Datasheet, Description, Vendor
|
||||||
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
@ -39,8 +46,9 @@ net = kicad_netlist_reader.netlist(sys.argv[1])
|
||||||
try:
|
try:
|
||||||
f = open(sys.argv[2], 'w')
|
f = open(sys.argv[2], 'w')
|
||||||
except IOError:
|
except IOError:
|
||||||
|
e = "Can't open output file for writing: " + sys.argv[2]
|
||||||
print(__file__, ":", e, file=sys.stderr)
|
print(__file__, ":", e, file=sys.stderr)
|
||||||
f = stdout
|
f = sys.stdout
|
||||||
|
|
||||||
components = net.getInterestingComponents()
|
components = net.getInterestingComponents()
|
||||||
|
|
||||||
|
@ -51,7 +59,8 @@ html = html.replace('<!--TOOL-->', net.getTool())
|
||||||
html = html.replace('<!--COMPCOUNT-->', "<b>Component Count:</b>" + \
|
html = html.replace('<!--COMPCOUNT-->', "<b>Component Count:</b>" + \
|
||||||
str(len(components)))
|
str(len(components)))
|
||||||
|
|
||||||
row = "<tr><th style='width:640px'>Ref</th>" + "<th>Qnty</th>"
|
row = "<tr><th style='width:640px'>Ref</th>"
|
||||||
|
row += "<th>Qnty</th>"
|
||||||
row += "<th>Value</th>" + "<th>Part</th>" + "<th>Datasheet</th>"
|
row += "<th>Value</th>" + "<th>Part</th>" + "<th>Datasheet</th>"
|
||||||
row += "<th>Description</th>" + "<th>Vendor</th></tr>"
|
row += "<th>Description</th>" + "<th>Vendor</th></tr>"
|
||||||
|
|
||||||
|
@ -74,10 +83,11 @@ for group in grouped:
|
||||||
c = component
|
c = component
|
||||||
|
|
||||||
row = "<tr><td>" + refs +"</td><td>" + str(len(group))
|
row = "<tr><td>" + refs +"</td><td>" + str(len(group))
|
||||||
row += "</td><td>" + c.getValue() + "</td><td>" + c.getLibName() + ":"
|
row += "</td><td>" + c.getValue()
|
||||||
row += c.getPartName() + "</td><td>" + c.getDatasheet() + "</td><td>"
|
row += "</td><td>" + c.getLibName() + ":" + c.getPartName()
|
||||||
row += c.getDescription() + "</td><td>" + c.getField("Vendor")
|
row += "</td><td>" + c.getDatasheet()
|
||||||
row += "</td></tr>"
|
row += "</td><td>" + c.getDescription()
|
||||||
|
row += "</td><td>" + c.getField("Vendor")+ "</td></tr>"
|
||||||
|
|
||||||
html = html.replace('<!--TABLEROW-->', row + "<!--TABLEROW-->")
|
html = html.replace('<!--TABLEROW-->', row + "<!--TABLEROW-->")
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,15 @@
|
||||||
# is due to be deprecated in 3.0+ soon
|
# is due to be deprecated in 3.0+ soon
|
||||||
#
|
#
|
||||||
|
|
||||||
|
"""
|
||||||
|
@package
|
||||||
|
Generate a HTML BOM list.
|
||||||
|
Components are sorted and grouped by value
|
||||||
|
Fields are (if exist)
|
||||||
|
Ref, Quantity, Value, Part, Datasheet, Description, Vendor
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import sys
|
import sys
|
||||||
import xml.sax as sax
|
import xml.sax as sax
|
||||||
|
|
|
@ -21,7 +21,8 @@ net = kicad_netlist_reader.netlist(sys.argv[1])
|
||||||
try:
|
try:
|
||||||
f = open(sys.argv[2], 'w')
|
f = open(sys.argv[2], 'w')
|
||||||
except IOError:
|
except IOError:
|
||||||
print( __file__, ":", e, file=sys.stderr)
|
e = "Can't open output file for writing: " + sys.argv[2]
|
||||||
f = stdout
|
print( __file__, ":", e, sys.stderr)
|
||||||
|
f = sys.stdout
|
||||||
|
|
||||||
print(net.formatXML(), file=f)
|
print(net.formatXML(), file=f)
|
||||||
|
|
|
@ -64,8 +64,9 @@ net = kicad_netlist_reader.netlist(sys.argv[1])
|
||||||
try:
|
try:
|
||||||
f = open(sys.argv[2], 'w')
|
f = open(sys.argv[2], 'w')
|
||||||
except IOError:
|
except IOError:
|
||||||
|
e = "Can't open output file for writing: " + sys.argv[2]
|
||||||
print(__file__, ":", e, file=sys.stderr)
|
print(__file__, ":", e, file=sys.stderr)
|
||||||
f = stdout
|
f = sys.stdout
|
||||||
|
|
||||||
for c in net.components:
|
for c in net.components:
|
||||||
c.checkvalue()
|
c.checkvalue()
|
||||||
|
|
Loading…
Reference in New Issue