Loading include/convert_to_biu.h 0 → 100644 +38 −0 Original line number Diff line number Diff line #ifndef CONVERT_TO_BIU_H #define CONVERT_TO_BIU_H #include <config.h> // USE_PCBNEW_NANOMETRES is defined here /** * @file convert_to_biu.h */ /** * @brief inline convert functions to convert a value in decimils (or mils) * to the internal unit used in pcbnew or cvpcb(nanometer or decimil) * depending on compil option */ /// Convert mils to PCBNEW internal units (iu). inline int Mils2iu( int mils ) { #if defined( USE_PCBNEW_NANOMETRES ) return int( mils * 25.4e3 + 0.5 ); #else return mils * 10; #endif } /// Convert deci-mils to PCBNEW internal units (iu). inline int DMils2iu( int dmils ) { #if defined( USE_PCBNEW_NANOMETRES ) return int( dmils * 25.4e2 + 0.5 ); #else return dmils; #endif } #endif // #define CONVERT_TO_BIU_H pcbnew/class_board.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -71,13 +71,6 @@ BOARD::BOARD() : BOARD::~BOARD() { /* @todo NO! this has nothing to do with a BOARD Do this in the UI, not in the storage container please. if( m_PcbFrame && m_PcbFrame->GetScreen() ) m_PcbFrame->GetScreen()->ClearUndoRedoList(); */ while( m_ZoneDescriptorList.size() ) { ZONE_CONTAINER* area_to_remove = m_ZoneDescriptorList[0]; Loading pcbnew/class_board.h +8 −0 Original line number Diff line number Diff line Loading @@ -272,6 +272,14 @@ public: */ static wxString GetDefaultLayerName( int aLayerNumber ); /** * Function ReturnFlippedLayerNumber * @return the layer number after flipping an item * some (not all) layers: external copper, Mask, Paste, and solder * are swapped between front and back sides */ static int ReturnFlippedLayerNumber( int oldlayer ); /** * Function Add * adds the given item to this BOARD and takes ownership of its memory. Loading pcbnew/class_dimension.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ #include <class_drawpanel.h> #include <colors_selection.h> #include <kicad_string.h> #include <protos.h> #include <richio.h> #include <class_board.h> Loading Loading @@ -200,7 +199,7 @@ void DIMENSION::Rotate( const wxPoint& aRotCentre, double aAngle ) void DIMENSION::Flip( const wxPoint& aCentre ) { Mirror( aCentre ); SetLayer( ChangeSideNumLayer( GetLayer() ) ); SetLayer( BOARD::ReturnFlippedLayerNumber( GetLayer() ) ); } Loading pcbnew/class_drawsegment.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ void DRAWSEGMENT::Flip( const wxPoint& aCentre ) NEGATE( m_Angle ); } SetLayer( ChangeSideNumLayer( GetLayer() ) ); SetLayer( BOARD::ReturnFlippedLayerNumber( GetLayer() ) ); } Loading Loading
include/convert_to_biu.h 0 → 100644 +38 −0 Original line number Diff line number Diff line #ifndef CONVERT_TO_BIU_H #define CONVERT_TO_BIU_H #include <config.h> // USE_PCBNEW_NANOMETRES is defined here /** * @file convert_to_biu.h */ /** * @brief inline convert functions to convert a value in decimils (or mils) * to the internal unit used in pcbnew or cvpcb(nanometer or decimil) * depending on compil option */ /// Convert mils to PCBNEW internal units (iu). inline int Mils2iu( int mils ) { #if defined( USE_PCBNEW_NANOMETRES ) return int( mils * 25.4e3 + 0.5 ); #else return mils * 10; #endif } /// Convert deci-mils to PCBNEW internal units (iu). inline int DMils2iu( int dmils ) { #if defined( USE_PCBNEW_NANOMETRES ) return int( dmils * 25.4e2 + 0.5 ); #else return dmils; #endif } #endif // #define CONVERT_TO_BIU_H
pcbnew/class_board.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -71,13 +71,6 @@ BOARD::BOARD() : BOARD::~BOARD() { /* @todo NO! this has nothing to do with a BOARD Do this in the UI, not in the storage container please. if( m_PcbFrame && m_PcbFrame->GetScreen() ) m_PcbFrame->GetScreen()->ClearUndoRedoList(); */ while( m_ZoneDescriptorList.size() ) { ZONE_CONTAINER* area_to_remove = m_ZoneDescriptorList[0]; Loading
pcbnew/class_board.h +8 −0 Original line number Diff line number Diff line Loading @@ -272,6 +272,14 @@ public: */ static wxString GetDefaultLayerName( int aLayerNumber ); /** * Function ReturnFlippedLayerNumber * @return the layer number after flipping an item * some (not all) layers: external copper, Mask, Paste, and solder * are swapped between front and back sides */ static int ReturnFlippedLayerNumber( int oldlayer ); /** * Function Add * adds the given item to this BOARD and takes ownership of its memory. Loading
pcbnew/class_dimension.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ #include <class_drawpanel.h> #include <colors_selection.h> #include <kicad_string.h> #include <protos.h> #include <richio.h> #include <class_board.h> Loading Loading @@ -200,7 +199,7 @@ void DIMENSION::Rotate( const wxPoint& aRotCentre, double aAngle ) void DIMENSION::Flip( const wxPoint& aCentre ) { Mirror( aCentre ); SetLayer( ChangeSideNumLayer( GetLayer() ) ); SetLayer( BOARD::ReturnFlippedLayerNumber( GetLayer() ) ); } Loading
pcbnew/class_drawsegment.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ void DRAWSEGMENT::Flip( const wxPoint& aCentre ) NEGATE( m_Angle ); } SetLayer( ChangeSideNumLayer( GetLayer() ) ); SetLayer( BOARD::ReturnFlippedLayerNumber( GetLayer() ) ); } Loading