Eeschema: bug 880132 : partial fix.
Pcbnew: remove useless code. Doc: remobe obsolete reference to MINIZIP (which do not exist now)
This commit is contained in:
parent
fc7189e6f4
commit
4221c3619a
|
@ -215,8 +215,6 @@ One of these 2 option *must* be set to ON:
|
||||||
|
|
||||||
CMAKE_INSTALL_PREFIX (OPTIONAL)
|
CMAKE_INSTALL_PREFIX (OPTIONAL)
|
||||||
|
|
||||||
KICAD_MINIZIP ON/OFF
|
|
||||||
|
|
||||||
USE_WX_GRAPHICS_CONTEXT ON/OFF (OPTIONAL)
|
USE_WX_GRAPHICS_CONTEXT ON/OFF (OPTIONAL)
|
||||||
*Experimental* advanced drawing library code using wxGraphicsContext (for tests only).
|
*Experimental* advanced drawing library code using wxGraphicsContext (for tests only).
|
||||||
Under Windows, a very recent version of mingw is needed.
|
Under Windows, a very recent version of mingw is needed.
|
||||||
|
|
|
@ -33,7 +33,7 @@ dpatch cat-all >>patch-stampT
|
||||||
mv -f patch-stampT patch-stamp
|
mv -f patch-stampT patch-stamp
|
||||||
mkdir -p /home/david/Desktop/KICAD_SVN/build/kicad
|
mkdir -p /home/david/Desktop/KICAD_SVN/build/kicad
|
||||||
mkdir -p /home/david/Desktop/KICAD_SVN/build/bitmaps
|
mkdir -p /home/david/Desktop/KICAD_SVN/build/bitmaps
|
||||||
cd /home/david/Desktop/KICAD_SVN/build/kicad && cmake -DKICAD_MINIZIP=0 \
|
cd /home/david/Desktop/KICAD_SVN/build/kicad && cmake \
|
||||||
|
|
||||||
-DKICAD_DEMOS=/home/david/Desktop/KICAD_SVN/debian/kicad-common/usr/share/doc/ki\
|
-DKICAD_DEMOS=/home/david/Desktop/KICAD_SVN/debian/kicad-common/usr/share/doc/ki\
|
||||||
cad/demos ../../kicad \
|
cad/demos ../../kicad \
|
||||||
|
|
|
@ -71,7 +71,7 @@ dpatch cat-all >>patch-stampT
|
||||||
mv -f patch-stampT patch-stamp
|
mv -f patch-stampT patch-stamp
|
||||||
mkdir -p /home/david/Desktop/KICAD_SVN/build/kicad
|
mkdir -p /home/david/Desktop/KICAD_SVN/build/kicad
|
||||||
mkdir -p /home/david/Desktop/KICAD_SVN/build/bitmaps
|
mkdir -p /home/david/Desktop/KICAD_SVN/build/bitmaps
|
||||||
cd /home/david/Desktop/KICAD_SVN/build/kicad && cmake -DKICAD_MINIZIP=0 \
|
cd /home/david/Desktop/KICAD_SVN/build/kicad && cmake \
|
||||||
|
|
||||||
-DKICAD_DEMOS=/home/david/Desktop/KICAD_SVN/debian/kicad-common/usr/share/doc/ki\
|
-DKICAD_DEMOS=/home/david/Desktop/KICAD_SVN/debian/kicad-common/usr/share/doc/ki\
|
||||||
cad/demos ../../kicad \
|
cad/demos ../../kicad \
|
||||||
|
|
|
@ -178,9 +178,6 @@ configured and builded with "--enable-monolithic --disable-shared" parameters.
|
||||||
For building dinamically linked executables. Can be used only if wxWidgets
|
For building dinamically linked executables. Can be used only if wxWidgets
|
||||||
configured and builded with "--disable-monolithic --enable-shared" parameters.
|
configured and builded with "--disable-monolithic --enable-shared" parameters.
|
||||||
|
|
||||||
-DKICAD_MINIZIP=ON
|
|
||||||
Build the "minizip" executable. Use OFF to disable it building.
|
|
||||||
|
|
||||||
-DwxUSE_UNICODE=ON
|
-DwxUSE_UNICODE=ON
|
||||||
Require on locale utf8 for build the KiCad with cyrillic fonts support.
|
Require on locale utf8 for build the KiCad with cyrillic fonts support.
|
||||||
|
|
||||||
|
|
|
@ -320,12 +320,12 @@ void LIB_FIELD::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& a
|
||||||
/* Set to one (1) to draw bounding box around field text to validate
|
/* Set to one (1) to draw bounding box around field text to validate
|
||||||
* bounding box calculation. */
|
* bounding box calculation. */
|
||||||
#if 0
|
#if 0
|
||||||
wxString tmp = m_Text;
|
|
||||||
m_Text = *text;
|
|
||||||
EDA_RECT bBox = GetBoundingBox();
|
EDA_RECT bBox = GetBoundingBox();
|
||||||
m_Text = tmp;
|
EDA_RECT grBox;
|
||||||
bBox.Inflate( 1, 1 );
|
grBox.SetOrigin( aTransform.TransformCoordinate( bBox.GetOrigin() ) );
|
||||||
GRRect( &aPanel->m_ClipBox, aDC, bBox, 0, LIGHTMAGENTA );
|
grBox.SetEnd( aTransform.TransformCoordinate( bBox.GetEnd() ) );
|
||||||
|
grBox.Move( aOffset );
|
||||||
|
GRRect( &aPanel->m_ClipBox, aDC, grBox, 0, LIGHTMAGENTA );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,18 +511,21 @@ wxString LIB_FIELD::GetFullText( int unit )
|
||||||
|
|
||||||
EDA_RECT LIB_FIELD::GetBoundingBox() const
|
EDA_RECT LIB_FIELD::GetBoundingBox() const
|
||||||
{
|
{
|
||||||
EDA_RECT rect = GetTextBox();
|
/* Y coordinates for LIB_ITEMS are bottom to top, so we must invert the Y position when
|
||||||
rect.m_Pos.y *= -1;
|
* calling GetTextBox() that works using top to bottom Y axis orientation.
|
||||||
rect.m_Pos.y -= rect.GetHeight();
|
*/
|
||||||
|
EDA_RECT rect = GetTextBox( -1, -1, true );
|
||||||
|
|
||||||
wxPoint orig = rect.GetOrigin();
|
wxPoint orig = rect.GetOrigin();
|
||||||
wxPoint end = rect.GetEnd();
|
wxPoint end = rect.GetEnd();
|
||||||
wxPoint center = rect.Centre();
|
NEGATE( orig.y);
|
||||||
|
NEGATE( end.y);
|
||||||
|
|
||||||
RotatePoint( &orig, center, m_Orient );
|
RotatePoint( &orig, m_Pos, -m_Orient );
|
||||||
RotatePoint( &end, center, m_Orient );
|
RotatePoint( &end, m_Pos, -m_Orient );
|
||||||
rect.SetOrigin( orig );
|
rect.SetOrigin( orig );
|
||||||
rect.SetEnd( end );
|
rect.SetEnd( end );
|
||||||
|
rect.Normalize();
|
||||||
|
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
|
@ -343,8 +343,6 @@ int LIB_TEXT::GetPenSize() const
|
||||||
void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
|
void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
|
||||||
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform )
|
int aColor, int aDrawMode, void* aData, const TRANSFORM& aTransform )
|
||||||
{
|
{
|
||||||
wxPoint pos1, pos2;
|
|
||||||
|
|
||||||
int color = GetDefaultColor();
|
int color = GetDefaultColor();
|
||||||
|
|
||||||
if( aColor < 0 ) // Used normal color or selected color
|
if( aColor < 0 ) // Used normal color or selected color
|
||||||
|
@ -357,8 +355,6 @@ void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aO
|
||||||
color = aColor;
|
color = aColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos1 = aTransform.TransformCoordinate( m_Pos ) + aOffset;
|
|
||||||
|
|
||||||
GRSetDrawMode( aDC, aDrawMode );
|
GRSetDrawMode( aDC, aDrawMode );
|
||||||
|
|
||||||
/* Calculate the text orientation, according to the component
|
/* Calculate the text orientation, according to the component
|
||||||
|
@ -386,15 +382,12 @@ void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aO
|
||||||
* and use GetBoundaryBox to know the text coordinate considered as centered
|
* and use GetBoundaryBox to know the text coordinate considered as centered
|
||||||
*/
|
*/
|
||||||
EDA_RECT bBox = GetBoundingBox();
|
EDA_RECT bBox = GetBoundingBox();
|
||||||
pos1 = bBox.Centre(); // this is the coordinates of the graphic text relative to the
|
wxPoint txtpos = bBox.Centre();
|
||||||
// component position in schematic Y axis orientation.
|
|
||||||
|
|
||||||
/* convert y coordinate from schematic to library Y axis orientation
|
// Calculate pos accordint to mirror/rotation.
|
||||||
* because we want to call TransformCoordinate to calculate real coordinates
|
txtpos = aTransform.TransformCoordinate( txtpos ) + aOffset;
|
||||||
*/
|
|
||||||
NEGATE( pos1.y );
|
DrawGraphicText( aPanel, aDC, txtpos, (EDA_Colors) color, m_Text, orient, m_Size,
|
||||||
pos1 = aTransform.TransformCoordinate( pos1 ) + aOffset;
|
|
||||||
DrawGraphicText( aPanel, aDC, pos1, (EDA_Colors) color, m_Text, orient, m_Size,
|
|
||||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, GetPenSize(),
|
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, GetPenSize(),
|
||||||
m_Italic, m_Bold );
|
m_Italic, m_Bold );
|
||||||
|
|
||||||
|
@ -404,13 +397,10 @@ void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aO
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 0
|
||||||
EDA_RECT grBox;
|
EDA_RECT grBox;
|
||||||
bBox.SetY( -bBox.GetY() );
|
|
||||||
bBox.SetHeight( -bBox.GetHeight());
|
|
||||||
grBox.SetOrigin( aTransform.TransformCoordinate( bBox.GetOrigin() ) );
|
grBox.SetOrigin( aTransform.TransformCoordinate( bBox.GetOrigin() ) );
|
||||||
grBox.SetEnd( aTransform.TransformCoordinate( bBox.GetEnd() ) );
|
grBox.SetEnd( aTransform.TransformCoordinate( bBox.GetEnd() ) );
|
||||||
grBox.Move( aOffset );
|
grBox.Move( aOffset );
|
||||||
GRRect( &aPanel->m_ClipBox, aDC, grBox.GetOrigin().x, grBox.GetOrigin().y,
|
GRRect( &aPanel->m_ClipBox, aDC, grBox, 0, LIGHTMAGENTA );
|
||||||
grBox.GetEnd().x, grBox.GetEnd().y, 0, LIGHTMAGENTA );
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -436,13 +426,15 @@ EDA_RECT LIB_TEXT::GetBoundingBox() const
|
||||||
|
|
||||||
wxPoint orig = rect.GetOrigin();
|
wxPoint orig = rect.GetOrigin();
|
||||||
wxPoint end = rect.GetEnd();
|
wxPoint end = rect.GetEnd();
|
||||||
wxPoint center = rect.Centre();
|
NEGATE( orig.y);
|
||||||
|
NEGATE( end.y);
|
||||||
|
|
||||||
RotatePoint( &orig, center, m_Orient );
|
RotatePoint( &orig, m_Pos, -m_Orient );
|
||||||
RotatePoint( &end, center, m_Orient );
|
RotatePoint( &end, m_Pos, -m_Orient );
|
||||||
rect.SetOrigin( orig );
|
rect.SetOrigin( orig );
|
||||||
rect.SetEnd( end );
|
rect.SetEnd( end );
|
||||||
rect.Normalize();
|
rect.Normalize();
|
||||||
|
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -357,14 +357,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void Compile_Ratsnest( wxDC* aDC, bool aDisplayStatus );
|
void Compile_Ratsnest( wxDC* aDC, bool aDisplayStatus );
|
||||||
|
|
||||||
/**
|
|
||||||
* Function TestOneRatsNest
|
|
||||||
* Compute the ratsnest relative to the net "net_code"
|
|
||||||
* @param aDC - Device context to draw on.
|
|
||||||
* @param aNetCode = netcode used to compute the ratsnest.
|
|
||||||
*/
|
|
||||||
int TestOneRatsNest( wxDC* aDC, int aNetCode );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function build_ratsnest_module
|
* Function build_ratsnest_module
|
||||||
* Build a ratsnest relative to one footprint. This is a simplified computation
|
* Build a ratsnest relative to one footprint. This is a simplified computation
|
||||||
|
|
|
@ -65,6 +65,20 @@ public:
|
||||||
m_NetCode = aNetCode;
|
m_NetCode = aNetCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsVisible()
|
||||||
|
{
|
||||||
|
return (m_Status & CH_VISIBLE) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsActive()
|
||||||
|
{
|
||||||
|
return (m_Status & CH_ACTIF) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsLocal()
|
||||||
|
{
|
||||||
|
return (m_Status & LOCAL_RATSNEST_ITEM) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Draw
|
* Function Draw
|
||||||
|
|
|
@ -593,13 +593,22 @@ void PCB_BASE_FRAME::TestNetConnection( wxDC* aDC, int aNetCode )
|
||||||
|
|
||||||
Merge_SubNets_Connected_By_CopperAreas( m_Pcb, aNetCode );
|
Merge_SubNets_Connected_By_CopperAreas( m_Pcb, aNetCode );
|
||||||
|
|
||||||
/* Test the ratsnest for this net */
|
/* rebuild the active ratsnest for this net */
|
||||||
int nb_net_noconnect = TestOneRatsNest( aDC, aNetCode );
|
DrawGeneralRatsnest( aDC, aNetCode );
|
||||||
|
TestForActiveLinksInRatsnest( aNetCode );
|
||||||
|
DrawGeneralRatsnest( aDC, aNetCode );
|
||||||
|
|
||||||
/* Display results */
|
/* Display results */
|
||||||
|
int net_notconnected_count = 0;
|
||||||
|
NETINFO_ITEM* net = m_Pcb->FindNet( aNetCode );
|
||||||
|
for( unsigned ii = net->m_RatsnestStartIdx; ii < net->m_RatsnestEndIdx; ii++ )
|
||||||
|
{
|
||||||
|
if( m_Pcb->m_FullRatsnest[ii].IsActive() )
|
||||||
|
net_notconnected_count++;
|
||||||
|
}
|
||||||
msg.Printf( wxT( "links %d nc %d net:nc %d" ),
|
msg.Printf( wxT( "links %d nc %d net:nc %d" ),
|
||||||
m_Pcb->GetRatsnestsCount(), m_Pcb->GetNoconnectCount(),
|
m_Pcb->GetRatsnestsCount(), m_Pcb->GetNoconnectCount(),
|
||||||
nb_net_noconnect );
|
net_notconnected_count );
|
||||||
|
|
||||||
SetStatusText( msg );
|
SetStatusText( msg );
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -459,8 +459,8 @@ void DRC::testPad2Pad()
|
||||||
#include <wx/progdlg.h>
|
#include <wx/progdlg.h>
|
||||||
/* Function testTracks
|
/* Function testTracks
|
||||||
* performs the DRC on all tracks.
|
* performs the DRC on all tracks.
|
||||||
* because this test can take a while, a progrsse bar can be displayed
|
* because this test can take a while, a progress bar can be displayed
|
||||||
* (Note: it is shown only if there are many tracks
|
* (Note: it is shown only if there are many tracks)
|
||||||
*/
|
*/
|
||||||
void DRC::testTracks( bool aShowProgressBar )
|
void DRC::testTracks( bool aShowProgressBar )
|
||||||
{
|
{
|
||||||
|
|
|
@ -266,9 +266,9 @@ private:
|
||||||
/**
|
/**
|
||||||
* Function testTracks
|
* Function testTracks
|
||||||
* performs the DRC on all tracks.
|
* performs the DRC on all tracks.
|
||||||
* because this test can take a while, a progrsse bar can be displayed
|
* because this test can take a while, a progress bar can be displayed
|
||||||
* @param aShowProgressBar = true to show a progrsse bar
|
* @param aShowProgressBar = true to show a progrsse bar
|
||||||
* (Note: it is shown only if there are many tracks
|
* (Note: it is shown only if there are many tracks)
|
||||||
*/
|
*/
|
||||||
void testTracks( bool aShowProgressBar );
|
void testTracks( bool aShowProgressBar );
|
||||||
|
|
||||||
|
|
|
@ -487,22 +487,12 @@ void PCB_BASE_FRAME::TestForActiveLinksInRatsnest( int aNetCode )
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < m_Pcb->GetRatsnestsCount(); ii++ )
|
for( unsigned ii = 0; ii < m_Pcb->GetRatsnestsCount(); ii++ )
|
||||||
{
|
{
|
||||||
if( m_Pcb->m_FullRatsnest[ii].m_Status & CH_ACTIF )
|
if( m_Pcb->m_FullRatsnest[ii].IsActive() )
|
||||||
m_Pcb->m_NbNoconnect++;
|
m_Pcb->m_NbNoconnect++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int PCB_BASE_FRAME::TestOneRatsNest( wxDC* aDC, int aNetCode )
|
|
||||||
{
|
|
||||||
DrawGeneralRatsnest( aDC, aNetCode );
|
|
||||||
TestForActiveLinksInRatsnest( aNetCode );
|
|
||||||
DrawGeneralRatsnest( aDC, aNetCode );
|
|
||||||
|
|
||||||
return m_Pcb->GetRatsnestsCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule )
|
void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule )
|
||||||
{
|
{
|
||||||
// for local ratsnest calculation when moving a footprint:
|
// for local ratsnest calculation when moving a footprint:
|
||||||
|
@ -853,7 +843,7 @@ void PCB_BASE_FRAME::BuildAirWiresTargetsList( BOARD_CONNECTED_ITEM* aItemRef,
|
||||||
{
|
{
|
||||||
if( aPosition != track->m_Start )
|
if( aPosition != track->m_Start )
|
||||||
s_TargetsLocations.push_back( track->m_Start );
|
s_TargetsLocations.push_back( track->m_Start );
|
||||||
if( aPosition != track->m_End )
|
if( aPosition != track->m_End && track->m_Start != track->m_End )
|
||||||
s_TargetsLocations.push_back( track->m_End );
|
s_TargetsLocations.push_back( track->m_End );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue