Commit a37fdd97 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

First working version of KICAD_PLUGIN::Load(), short of some globals and minor conflicts

parents 0fb4954f 343e55b0
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -221,6 +221,14 @@ wxPoint DRAWSEGMENT::GetEnd() const
}


void DRAWSEGMENT::SetAngle( double aAngle )
{
    NORMALIZE_ANGLE_360( aAngle );

    m_Angle = (int) aAngle;
}


MODULE* DRAWSEGMENT::GetParentModule() const
{
    if( m_Parent->Type() != PCB_MODULE_T )
+6 −1
Original line number Diff line number Diff line
@@ -46,7 +46,12 @@ public:

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

    void SetAngle( double aAngle ) { m_Angle = (int) aAngle; }
    /**
     * Function SetAngle
     * sets the angle for arcs, and normalizes it within the range 0 - 360 degrees.
     * @param aAngle is tenths of degrees, but will soon be degrees.
     */
    void SetAngle( double aAngle );     // encapsulates the transition to degrees

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

+0 −1
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ public:
     */
    void DisplayInfo( EDA_DRAW_FRAME* frame );


    /**
     * Function GetClass
     * returns the class name.
+11 −0
Original line number Diff line number Diff line
@@ -185,6 +185,17 @@ void D_PAD::SetPadName( const wxString& name )
        m_Padname[ii] = 0;
}

void D_PAD::SetPadName( const char* aName )
{
    unsigned i;

    for( i=0; i<sizeof(m_Padname) && *aName;  ++i )
        m_Padname[i] = *aName++;

    while( i < sizeof(m_Padname) )
        m_Padname[i++] = 0;
}


/**
 * Function SetNetname
+15 −1
Original line number Diff line number Diff line
@@ -183,7 +183,20 @@ public:
    void SetDelta( const wxSize& aSize )        { m_DeltaSize = aSize; }
    void SetDrillSize( const wxSize& aSize )    { m_Drill = aSize; }
    void SetOffset( const wxSize& aOffset )     { m_Offset = aOffset; }
    void SetOrientation( int aAngle )           { m_Orient = aAngle; }

    /**
     * Function SetOrientation
     * sets the rotation angle of the pad.
     * @param aAngle is tenths of degrees, but will soon be degrees.
     */
    void SetOrientation( double aAngle )        { m_Orient = (int) aAngle; }    // manage migration to degrees

    /**
     * Function GetOrientation
     * returns the rotation angle of the pad in tenths of degress, but soon degress.
     */
    double  GetOrientation() const { return m_Orient; }

    void SetDrillShape( int aDrillShape )       { m_DrillShape = aDrillShape; }
    void SetLayerMask( int aLayerMask )         { m_layerMask = aLayerMask; }
    void SetAttribute( int aAttribute )         { m_Attribut = aAttribute; }
@@ -313,6 +326,7 @@ public:

    // others
    void SetPadName( const wxString& name );    // Change pad name
    void SetPadName( const char* aName );

    wxString ReturnStringPadName() const;           // Return pad name as string in a wxString

Loading