more eagle plugin work
This commit is contained in:
parent
43caa734ac
commit
76765f2269
|
@ -140,14 +140,14 @@ public:
|
||||||
MODULE* GetParentModule() const;
|
MODULE* GetParentModule() const;
|
||||||
|
|
||||||
const std::vector<wxPoint>& GetBezierPoints() const { return m_BezierPoints; };
|
const std::vector<wxPoint>& GetBezierPoints() const { return m_BezierPoints; };
|
||||||
const std::vector<wxPoint>& GetPolyPoints() const { return m_PolyPoints; };
|
const std::vector<wxPoint>& GetPolyPoints() const { return m_PolyPoints; };
|
||||||
|
|
||||||
void SetBezierPoints( std::vector<wxPoint>& aPoints )
|
void SetBezierPoints( const std::vector<wxPoint>& aPoints )
|
||||||
{
|
{
|
||||||
m_BezierPoints = aPoints;
|
m_BezierPoints = aPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetPolyPoints( std::vector<wxPoint>& aPoints )
|
void SetPolyPoints( const std::vector<wxPoint>& aPoints )
|
||||||
{
|
{
|
||||||
m_PolyPoints = aPoints;
|
m_PolyPoints = aPoints;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -34,6 +34,8 @@
|
||||||
|
|
||||||
#include <boost/property_tree/ptree_fwd.hpp>
|
#include <boost/property_tree/ptree_fwd.hpp>
|
||||||
#include <boost/ptr_container/ptr_map.hpp>
|
#include <boost/ptr_container/ptr_map.hpp>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
|
||||||
class MODULE;
|
class MODULE;
|
||||||
typedef boost::ptr_map< std::string, MODULE > MODULE_MAP;
|
typedef boost::ptr_map< std::string, MODULE > MODULE_MAP;
|
||||||
|
@ -56,9 +58,12 @@ typedef boost::property_tree::ptree PTREE;
|
||||||
typedef const PTREE CPTREE;
|
typedef const PTREE CPTREE;
|
||||||
|
|
||||||
struct EWIRE;
|
struct EWIRE;
|
||||||
|
struct EVIA;
|
||||||
struct EROT;
|
struct EROT;
|
||||||
struct EATTR;
|
struct EATTR;
|
||||||
struct ECIRCLE;
|
struct ECIRCLE;
|
||||||
|
struct ETEXT;
|
||||||
|
struct ERECT;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,6 +122,8 @@ private:
|
||||||
int kicad( double d ) const;
|
int kicad( double d ) const;
|
||||||
int kicad_y( double y ) const { return -kicad( y ); }
|
int kicad_y( double y ) const { return -kicad( y ); }
|
||||||
int kicad_x( double x ) const { return kicad( x ); }
|
int kicad_x( double x ) const { return kicad( x ); }
|
||||||
|
wxSize kicad_fontz( double d ) const;
|
||||||
|
|
||||||
|
|
||||||
static int kicad_layer( int aLayer );
|
static int kicad_layer( int aLayer );
|
||||||
|
|
||||||
|
@ -126,49 +133,6 @@ private:
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/**
|
|
||||||
* Function dblParse
|
|
||||||
* parses an ASCII decimal floating point value and reports any error by throwing
|
|
||||||
* an exception using the xpath in the error message text.
|
|
||||||
*
|
|
||||||
* @param aValue is the ASCII value in C locale form with possible leading whitespace
|
|
||||||
*
|
|
||||||
* @param aXpath tells where the value is within the XML document.
|
|
||||||
*
|
|
||||||
* @return double - aValue in binary, not scaled.
|
|
||||||
*/
|
|
||||||
static double dblParse( const char* aValue, const std::string& aXpath );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function biuParse
|
|
||||||
* parses an ASCII decimal floating point value and scales it into a BIU
|
|
||||||
* according to the current mm_per_biu. This fuction is the complement of
|
|
||||||
* fmtBIU(). One has to know what the other is doing.
|
|
||||||
*
|
|
||||||
* @param aValue is the ASCII value in C locale form with possible leading whitespace
|
|
||||||
*
|
|
||||||
* @param aXpath tells where the value is within the XML document.
|
|
||||||
*
|
|
||||||
* @return BIU - the converted Board Internal Unit.
|
|
||||||
*/
|
|
||||||
BIU biuParse( const char* aValue, const std::string& aXpath );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function degParse
|
|
||||||
* parses an ASCII decimal floating point value which is certainly an angle. This
|
|
||||||
* is a dedicated function for encapsulating support for the migration from
|
|
||||||
* tenths of degrees to degrees in floating point. This function is the complement of
|
|
||||||
* fmtDEG(). One has to know what the other is doing.
|
|
||||||
*
|
|
||||||
* @param aValue is the ASCII value in C locale form with possible leading whitespace
|
|
||||||
*
|
|
||||||
* @param nptrptr may be NULL, but if not, then it tells where to put a
|
|
||||||
* pointer to the next unconsumed input text. See "man strtod" for more information.
|
|
||||||
*
|
|
||||||
* @return double - the string converted to a primitive double type
|
|
||||||
*/
|
|
||||||
double degParse( const char* aValue, const char** nptrptr = NULL );
|
|
||||||
|
|
||||||
/// encapsulate the BIU formatting tricks in one place.
|
/// encapsulate the BIU formatting tricks in one place.
|
||||||
int biuSprintf( char* buf, BIU aValue ) const;
|
int biuSprintf( char* buf, BIU aValue ) const;
|
||||||
|
|
||||||
|
@ -199,7 +163,7 @@ private:
|
||||||
|
|
||||||
void loadPlain( CPTREE& aPlain, const std::string& aXpath );
|
void loadPlain( CPTREE& aPlain, const std::string& aXpath );
|
||||||
|
|
||||||
void loadNetsAndTracks( CPTREE& aSignals, const std::string& aXpath );
|
void loadSignals( CPTREE& aSignals, const std::string& aXpath );
|
||||||
|
|
||||||
void loadLibraries( CPTREE& aLibs, const std::string& aXpath );
|
void loadLibraries( CPTREE& aLibs, const std::string& aXpath );
|
||||||
|
|
||||||
|
@ -212,7 +176,11 @@ private:
|
||||||
*/
|
*/
|
||||||
EWIRE ewire( CPTREE& aWire ) const;
|
EWIRE ewire( CPTREE& aWire ) const;
|
||||||
|
|
||||||
|
EVIA evia( CPTREE& aVia ) const;
|
||||||
|
|
||||||
ECIRCLE ecircle( CPTREE& aCircle ) const;
|
ECIRCLE ecircle( CPTREE& aCircle ) const;
|
||||||
|
ETEXT etext( CPTREE& aText ) const;
|
||||||
|
ERECT erect( CPTREE& aRect ) const;
|
||||||
|
|
||||||
EROT erot( const std::string& aRot ) const;
|
EROT erot( const std::string& aRot ) const;
|
||||||
|
|
||||||
|
@ -238,14 +206,14 @@ private:
|
||||||
*/
|
*/
|
||||||
MODULE* makeModule( CPTREE& aPackage, const std::string& aPkgName ) const;
|
MODULE* makeModule( CPTREE& aPackage, const std::string& aPkgName ) const;
|
||||||
|
|
||||||
void packageWire( MODULE* aModule, CPTREE aTree ) const;
|
void packageWire( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
void packagePad( MODULE* aModule, CPTREE aTree ) const;
|
void packagePad( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
void packageText( MODULE* aModule, CPTREE aTree ) const;
|
void packageText( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
void packageRectangle( MODULE* aModule, CPTREE aTree ) const;
|
void packageRectangle( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
void packagePolygon( MODULE* aModule, CPTREE aTree ) const;
|
void packagePolygon( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
void packageCircle( MODULE* aModule, CPTREE aTree ) const;
|
void packageCircle( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
void packageHole( MODULE* aModule, CPTREE aTree ) const;
|
void packageHole( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
void packageSMD( MODULE* aModule, CPTREE aTree ) const;
|
void packageSMD( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1786,14 +1786,14 @@ void LEGACY_PLUGIN::loadPCB_TEXT()
|
||||||
|
|
||||||
if( TESTLINE( "Te" ) ) // Text line (or first line for multi line texts)
|
if( TESTLINE( "Te" ) ) // Text line (or first line for multi line texts)
|
||||||
{
|
{
|
||||||
ReadDelimitedText( text, line + 2, sizeof(text) );
|
ReadDelimitedText( text, line + SZ( "Te" ), sizeof(text) );
|
||||||
pcbtxt->SetText( FROM_UTF8( text ) );
|
pcbtxt->SetText( FROM_UTF8( text ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( TESTLINE( "nl" ) ) // next line of the current text
|
else if( TESTLINE( "nl" ) ) // next line of the current text
|
||||||
{
|
{
|
||||||
ReadDelimitedText( text, line + SZ( "nl" ), sizeof(text) );
|
ReadDelimitedText( text, line + SZ( "nl" ), sizeof(text) );
|
||||||
pcbtxt->SetText( pcbtxt->GetText() + '\n' + FROM_UTF8( text ) );
|
pcbtxt->SetText( pcbtxt->GetText() + wxChar( '\n' ) + FROM_UTF8( text ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( TESTLINE( "Po" ) )
|
else if( TESTLINE( "Po" ) )
|
||||||
|
@ -1874,7 +1874,6 @@ void LEGACY_PLUGIN::loadPCB_TEXT()
|
||||||
layer = LAST_NO_COPPER_LAYER;
|
layer = LAST_NO_COPPER_LAYER;
|
||||||
|
|
||||||
pcbtxt->SetLayer( layer );
|
pcbtxt->SetLayer( layer );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( TESTLINE( "$EndTEXTPCB" ) )
|
else if( TESTLINE( "$EndTEXTPCB" ) )
|
||||||
|
|
Loading…
Reference in New Issue