Commit 63eac42d authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Fix a minor error in class D_PAD: void D_PAD::Flip( int Y ) changed to virtual...

Fix a minor error in class D_PAD: void D_PAD::Flip( int Y ) changed to virtual void D_PAD::Flip( const wxPoint& aCentre ) (as defined in BOARD_ITEM)
Scripting: fix compatibility current pcbnew version in 2 examples and the default extension of board files  in board.i (was .kicad_brd, now is .kicad_pcb)
parent 3329ed26
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -138,9 +138,17 @@ bzr branch lp:kicad/stable kicad_src
Components and Footprints libraries
Components and Footprints libraries
all (schematic libs, 3D shapes ...) but new footprints libraries (use Download zip tool)
all (schematic libs, 3D shapes ...) but new footprints libraries (use Download zip tool)
https://github.com/KiCad/kicad-library/
https://github.com/KiCad/kicad-library/

New footprints libraries (use Download zip tool for each lib you want)
New footprints libraries (use Download zip tool for each lib you want)
https://github.com/KiCad/ for footprint libs (*.pretty folders)
https://github.com/KiCad/ for footprint libs (*.pretty folders)


A mirror of github is available, using bzr:
(schematic libs, 3D shapes ... all but new footprints libraries)
bzr checkout lp:~kicad-product-committers/kicad/library

Old legacy libraries:
bzr checkout lp:~dickelbeck/kicad/library-read-only

Note also Kicad is able to read on github.com/KiCad/ the *.pretty folders
Note also Kicad is able to read on github.com/KiCad/ the *.pretty folders
without download, using github plugin.
without download, using github plugin.
(however the time to read them can be long)
(however the time to read them can be long)
+1 −1
Original line number Original line Diff line number Diff line
@@ -799,7 +799,7 @@ void MODULE::Flip( const wxPoint& aCentre )


    // Mirror pads to other side of board about the x axis, i.e. vertically.
    // Mirror pads to other side of board about the x axis, i.e. vertically.
    for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
    for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
        pad->Flip( m_Pos.y );
        pad->Flip( m_Pos );


    // Mirror reference.
    // Mirror reference.
    text = m_Reference;
    text = m_Reference;
+3 −3
Original line number Original line Diff line number Diff line
@@ -214,13 +214,13 @@ void D_PAD::SetOrientation( double aAngle )
}
}




void D_PAD::Flip( int aTranslationY )
void D_PAD::Flip( const wxPoint& aCentre )
{
{
    int y = GetPosition().y - aTranslationY;
    int y = GetPosition().y - aCentre.y;


    y = -y;         // invert about x axis.
    y = -y;         // invert about x axis.


    y += aTranslationY;
    y += aCentre.y;


    SetY( y );
    SetY( y );


+1 −1
Original line number Original line Diff line number Diff line
@@ -167,7 +167,7 @@ public:
    void SetOffset( const wxPoint& aOffset )    { m_Offset = aOffset; }
    void SetOffset( const wxPoint& aOffset )    { m_Offset = aOffset; }
    const wxPoint& GetOffset() const            { return m_Offset; }
    const wxPoint& GetOffset() const            { return m_Offset; }


    void Flip( int aTranslationY );
    void Flip( const wxPoint& aCentre );        // Virtual function


    /**
    /**
     * Function SetOrientation
     * Function SetOrientation
+17 −17
Original line number Original line Diff line number Diff line
@@ -48,7 +48,7 @@
        str_filename = str(filename)
        str_filename = str(filename)
        if str_filename.endswith(".brd"):
        if str_filename.endswith(".brd"):
          format = IO_MGR.LEGACY
          format = IO_MGR.LEGACY
        if str_filename.endswith(".kicad_brd"):
        if str_filename.endswith(".kicad_pcb"):
          format = IO_MGR.KICAD
          format = IO_MGR.KICAD
      return SaveBoard(filename,self,format)
      return SaveBoard(filename,self,format)


Loading