Commit 6e78a592 authored by Dick Hollenbeck's avatar Dick Hollenbeck

more amazing free eagle_plugin work

parent afdf5258
......@@ -84,8 +84,6 @@ MODULE::MODULE( BOARD* parent ) :
MODULE::MODULE( const MODULE& aModule ) :
BOARD_ITEM( aModule )
{
BOARD_ITEM* newItem;
m_Pos = aModule.m_Pos;
m_LibRef = aModule.m_LibRef;
m_Layer = aModule.m_Layer;
......@@ -116,7 +114,7 @@ MODULE::MODULE( const MODULE& aModule ) :
m_Value->SetParent( this );
// Copy auxiliary data: Pads
m_Pads.DeleteAll();
// m_Pads.DeleteAll();
for( D_PAD* pad = aModule.m_Pads; pad; pad = pad->Next() )
{
......@@ -126,10 +124,12 @@ MODULE::MODULE( const MODULE& aModule ) :
}
// Copy auxiliary data: Drawings
m_Drawings.DeleteAll();
// m_Drawings.DeleteAll();
for( BOARD_ITEM* item = aModule.m_Drawings; item; item = item->Next() )
{
BOARD_ITEM* newItem;
switch( item->Type() )
{
case PCB_MODULE_TEXT_T:
......@@ -146,7 +146,7 @@ MODULE::MODULE( const MODULE& aModule ) :
}
// Copy auxiliary data: 3D_Drawings info
m_3D_Drawings.DeleteAll();
// m_3D_Drawings.DeleteAll();
for( S3D_MASTER* item = aModule.m_3D_Drawings; item; item = item->Next() )
{
......
......@@ -100,6 +100,7 @@ public:
D_PAD( MODULE* parent );
// Do not create a copy constructor. The one generated by the compiler is adequate.
// D_PAD( const D_PAD& o );
void Copy( D_PAD* source );
......@@ -478,7 +479,8 @@ private:
double m_LocalSolderPasteMarginRatio; ///< Local solder mask margin ratio value of pad size
///< The final margin is the sum of these 2 values
ZoneConnection m_ZoneConnection;
int m_ThermalWidth, m_ThermalGap;
int m_ThermalWidth;
int m_ThermalGap;
};
#endif // PAD_H_
This diff is collapsed.
......@@ -34,13 +34,30 @@
#include <boost/property_tree/ptree_fwd.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#include <time.h>
#include <map>
class MODULE;
typedef boost::ptr_map< std::string, MODULE > MODULE_MAP;
struct ENET
{
int netcode;
std::string netname;
ENET( int aNetCode, const std::string& aNetName ) :
netcode( aNetCode ),
netname( aNetName )
{}
ENET() :
netcode( 0 )
{}
};
typedef std::map< std::string, ENET > NET_MAP;
/*
#include
namespace boost {
......@@ -79,6 +96,9 @@ public:
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe, PROPERTIES* aProperties = NULL );
const wxString& GetFileExtension() const;
/*
void Save( const wxString& aFileName, BOARD* aBoard, PROPERTIES* aProperties = NULL );
wxArrayString FootprintEnumerate( const wxString& aLibraryPath, PROPERTIES* aProperties = NULL);
......@@ -94,8 +114,7 @@ public:
void FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProperties = NULL );
bool IsFootprintLibWritable( const wxString& aLibraryPath );
const wxString& GetFileExtension() const;
*/
//-----</PUBLIC PLUGIN API>-------------------------------------------------
......@@ -106,6 +125,8 @@ public:
private:
NET_MAP m_pads_to_nets;
MODULE_MAP m_templates; ///< is part of a MODULE factory that operates
///< using copy construction.
///< lookup key is libname.packagename
......
......@@ -1892,7 +1892,8 @@ void LEGACY_PLUGIN::loadTrackList( TRACK* aInsertBeforeMe, int aStructType )
{
// read two lines per loop iteration, each loop is one TRACK or VIA
// example first line:
// "Po 0 23994 28800 24400 28800 150 -1\r\n"
// e.g. "Po 0 23994 28800 24400 28800 150 -1" for a track
// e.g. "Po 3 21086 17586 21086 17586 180 -1" for a via (uses sames start and end)
const char* data;
char* line = m_reader->Line();
......@@ -1943,6 +1944,7 @@ void LEGACY_PLUGIN::loadTrackList( TRACK* aInsertBeforeMe, int aStructType )
int layer, type, flags, net_code;
// parse the 2nd line to determine the type of object
// e.g. "De 15 1 7 0 0" for a via
sscanf( line + SZ( "De" ), " %d %d %d %lX %X", &layer, &type, &net_code, &timeStamp, &flags );
if( aStructType==PCB_TRACE_T && type==1 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment