Commit 701fa6b0 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

intermediate check in to show progress on new nanometer file loader PLUGIN

parent 2515a806
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -88,7 +88,7 @@ INPUT_ENCODING = UTF-8
FILE_PATTERNS          = *.h \
FILE_PATTERNS          = *.h \
                         *.cpp
                         *.cpp
RECURSIVE              = YES
RECURSIVE              = YES
EXCLUDE                = include\boost
EXCLUDE                = include/boost polygon/kbool
EXCLUDE_SYMLINKS       = NO
EXCLUDE_SYMLINKS       = NO
EXCLUDE_PATTERNS       =
EXCLUDE_PATTERNS       =
EXCLUDE_SYMBOLS        =
EXCLUDE_SYMBOLS        =

include/class_via_dimension.h

deleted100644 → 0
+0 −41
Original line number Original line Diff line number Diff line
/**
 * @file class_via_dimension.h
 * @brief Class via dimension.
 */

#ifndef CLASS_VIA_DIMENSION_H
#define CLASS_VIA_DIMENSION_H

#include "lengthpcb.h"
/** a small helper class to handle a stock of specific vias diameter and drill pair
 * in the BOARD class
 */
class VIA_DIMENSION
{
public:
    LENGTH_PCB m_Diameter;     // <= 0 means use Netclass via diameter
    LENGTH_PCB m_Drill;        // <= 0 means use Netclass via drill

    VIA_DIMENSION()
    {
        m_Diameter = FROM_LEGACY_LU( 0 );
        m_Drill    = FROM_LEGACY_LU( 0 );
    }


    bool operator ==( const VIA_DIMENSION& other ) const
    {
        return (m_Diameter == other.m_Diameter) && (m_Drill == other.m_Drill);
    }


    bool operator <( const VIA_DIMENSION& other ) const
    {
        if( m_Diameter != other.m_Diameter )
            return m_Diameter < other.m_Diameter;

        return m_Drill < other.m_Drill;
    }
};

#endif /* CLASS_VIA_DIMENSION_H */
 No newline at end of file
+15 −2
Original line number Original line Diff line number Diff line
@@ -217,7 +217,7 @@ extern int g_GhostColor;
 *  This is wrapper to the C setlocale( LC_NUMERIC, "C" ) function,
 *  This is wrapper to the C setlocale( LC_NUMERIC, "C" ) function,
 *  but could make more easier an optional use of locale in KiCad
 *  but could make more easier an optional use of locale in KiCad
 */
 */
void SetLocaleTo_C_standard( void );
void SetLocaleTo_C_standard();


/**
/**
 * Function SetLocaleTo_Default
 * Function SetLocaleTo_Default
@@ -230,8 +230,21 @@ void SetLocaleTo_C_standard( void );
 *  This is wrapper to the C setlocale( LC_NUMERIC, "" ) function,
 *  This is wrapper to the C setlocale( LC_NUMERIC, "" ) function,
 *  but could make more easier an optional use of locale in KiCad
 *  but could make more easier an optional use of locale in KiCad
 */
 */
void SetLocaleTo_Default( void );
void SetLocaleTo_Default();


/**
 * Class LOCALE_IO
 * is a class that can be instantiated within a scope in which you are expecting
 * exceptions to be thrown.  Its constructor calls SetLocaleTo_C_Standard().
 * Its destructor insures that the default locale is restored if an exception
 * is thrown, or not.
 */
class LOCALE_IO
{
public:
    LOCALE_IO()     { SetLocaleTo_C_standard(); }
    ~LOCALE_IO()    { SetLocaleTo_Default(); }
};


/**
/**
 * Function EnsureTextCtrlWidth
 * Function EnsureTextCtrlWidth
+14 −8
Original line number Original line Diff line number Diff line
@@ -80,27 +80,33 @@ struct LAYER
};
};




/** a small helper class to handle a stock of specific vias diameter and drill pair
/**
 * in the BOARD class
 * Struct VIA_DIMENSION
 * is a small helper container to handle a stock of specific vias each with
 * unique diameter and drill sizes in the BOARD class.
 */
 */
class VIA_DIMENSION
struct VIA_DIMENSION
{
{
public:
    int m_Diameter;     // <= 0 means use Netclass via diameter
    int m_Diameter;     // <= 0 means use Netclass via diameter
    int m_Drill;        // <= 0 means use Netclass via drill
    int m_Drill;        // <= 0 means use Netclass via drill


    VIA_DIMENSION()
    VIA_DIMENSION()
    {
    {
        m_Diameter = 0; m_Drill = 0;
        m_Diameter = 0;
        m_Drill    = 0;
    }
    }


    VIA_DIMENSION( int aDiameter, int aDrill )
    {
        m_Diameter = aDiameter;
        m_Drill    = aDrill;
    }


    bool operator == ( const VIA_DIMENSION& other ) const
    bool operator == ( const VIA_DIMENSION& other ) const
    {
    {
        return (m_Diameter == other.m_Diameter) && (m_Drill == other.m_Drill);
        return (m_Diameter == other.m_Diameter) && (m_Drill == other.m_Drill);
    }
    }



    bool operator < ( const VIA_DIMENSION& other ) const
    bool operator < ( const VIA_DIMENSION& other ) const
    {
    {
        if( m_Diameter != other.m_Diameter )
        if( m_Diameter != other.m_Diameter )
+32 −9
Original line number Original line Diff line number Diff line
@@ -3,8 +3,8 @@
 * @brief Class to handle a graphic segment.
 * @brief Class to handle a graphic segment.
 */
 */


#ifndef CLASS_DRAWSEGMENT_H
#ifndef CLASS_DRAWSEGMENT_H_
#define CLASS_DRAWSEGMENT_H
#define CLASS_DRAWSEGMENT_H_




#include "class_board_item.h"
#include "class_board_item.h"
@@ -40,6 +40,21 @@ public:
    DRAWSEGMENT* Next() const { return (DRAWSEGMENT*) Pnext; }
    DRAWSEGMENT* Next() const { return (DRAWSEGMENT*) Pnext; }
    DRAWSEGMENT* Back() const { return (DRAWSEGMENT*) Pback; }
    DRAWSEGMENT* Back() const { return (DRAWSEGMENT*) Pback; }


    void SetWidth( int aWidth ) { m_Width = aWidth; }

    void SetStart( const wxPoint& aStart ) { m_Start = aStart; }

    void SetEnd( const wxPoint& aEnd ) { m_End = aEnd; }

    void SetAngle( double aAngle ) { m_Angle = (int) aAngle; }

    void SetType( int aType ) { m_Type = aType; }

    void SetShape( int aShape ) { m_Shape = aShape; }

    void SetBezControl1( const wxPoint& aPoint ) { m_BezierC1 = aPoint; }
    void SetBezControl2( const wxPoint& aPoint ) { m_BezierC2 = aPoint; }

    /**
    /**
     * Function GetPosition
     * Function GetPosition
     * returns the position of this object.
     * returns the position of this object.
@@ -85,6 +100,16 @@ public:
    std::vector<wxPoint>& GetBezierPoints() { return m_BezierPoints; };
    std::vector<wxPoint>& GetBezierPoints() { return m_BezierPoints; };
    std::vector<wxPoint>& GetPolyPoints()   { return m_PolyPoints; };
    std::vector<wxPoint>& GetPolyPoints()   { return m_PolyPoints; };


    void SetBezierPoints( std::vector<wxPoint>& aPoints )
    {
        m_BezierPoints = aPoints;
    }

    void SetPolyPoints( std::vector<wxPoint>& aPoints )
    {
        m_PolyPoints = aPoints;
    }

    /**
    /**
     * Function Save
     * Function Save
     * writes the data structures for this object out to a FILE in "*.brd" format.
     * writes the data structures for this object out to a FILE in "*.brd" format.
@@ -158,7 +183,7 @@ public:
    {
    {
        wxPoint delta = GetEnd() - GetStart();
        wxPoint delta = GetEnd() - GetStart();


        return hypot( delta.x, delta.y );
        return hypot( double( delta.x ), double( delta.y ) );
    }
    }




@@ -212,9 +237,7 @@ public:


#if defined(DEBUG)
#if defined(DEBUG)
    void Show( int nestLevel, std::ostream& os );
    void Show( int nestLevel, std::ostream& os );

#endif
#endif
};
};



#endif  // CLASS_DRAWSEGMENT_H_
#endif      // #ifndef CLASS_DRAWSEGMENT_H
Loading