Commit 577a79bc authored by jean-pierre charras's avatar jean-pierre charras

removed in drawpanel an erroneous change (was made only for a test, not for...

removed in drawpanel an erroneous change (was made only for a test, not for commit). drc code cleaning. cmakelist.txt changes in minizip.
parents f7af38a6 5738d296
......@@ -866,7 +866,7 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
wxMemoryDC tmpDC;
wxBitmap tmpBM( 1, screenSize.y );
tmpDC.SelectObject( tmpBM );
GRSetColorPen( &tmpDC, WHITE/*g_DrawBgColor*/ );
GRSetColorPen( &tmpDC, g_DrawBgColor );
tmpDC.DrawLine( 0, 0, 0, screenSize.y-1 ); // init background
GRSetColorPen( &tmpDC, m_Parent->GetGridColor() );
for( jj = 0; ; jj++ ) // draw grid points
......
......@@ -8,8 +8,10 @@ else(ZLIB_FOUND)
# include files are in ${wxWidgets_ROOT_DIR}/src/zlib
# and the corresponding library is libwxzlib-<version>.a (like libwxzlib-2.8.a)
# and we try to use it
find_path(ZLIB_INCLUDE_DIR zlib.h PATHS ${wxWidgets_ROOT_DIR}/src/zlib/ DOC "location of zlib include files")
set(ZLIB_LIBRARIES ${wxWidgets_ROOT_DIR}/lib/libwxzlib-2.8.a)
# Unfortunately, we have no way to know exactlty the path of zlib.h becuase this file
# is in wxWidgets sources, not in wxWidgets include path.
find_path(ZLIB_INCLUDE_DIR PATHS ${wxWidgets_ROOT_DIR}/../src/zlib/ ${wxWidgets_ROOT_DIR}/src/zlib/ DOC "location of zlib include files")
find_file(ZLIB_LIBRARIES NAMES ${wxWidgets_LIB_DIR}/libwxzlib-2.8.a ZLIB_LIBRARIES NAMES ${wxWidgets_LIB_DIR}/libwxzlib-2.9.a libwxzlib.a PATHS ${wxWidgets_ROOT_DIR}/lib/ PATH_SUFFIXES gcc_dll DOC "location of wxzlib library file")
endif(ZLIB_FOUND)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
......
......@@ -869,10 +869,13 @@ void BOARD::DisplayInfo( WinEDA_DrawFrame* frame )
frame->ClearMsgPanel();
int viasCount = 0;
int trackSegmentsCount = 0;
for( BOARD_ITEM* item = m_Track; item; item = item->Next() )
{
if( item->Type() == TYPE_VIA )
viasCount++;
else
trackSegmentsCount++;
}
txt.Printf( wxT( "%d" ), GetPadsCount() );
......@@ -881,6 +884,9 @@ void BOARD::DisplayInfo( WinEDA_DrawFrame* frame )
txt.Printf( wxT( "%d" ), viasCount );
frame->AppendMsgPanel( _( "Vias" ), txt, DARKGREEN );
txt.Printf( wxT( "%d" ), trackSegmentsCount );
frame->AppendMsgPanel( _( "trackSegm" ), txt, DARKGREEN );
txt.Printf( wxT( "%d" ), GetNodesCount() );
frame->AppendMsgPanel( _( "Nodes" ), txt, DARKCYAN );
......
......@@ -30,6 +30,7 @@
#include "common.h"
#include "pcbnew.h"
#include "drc_stuff.h"
wxString DRC_ITEM::GetErrorText() const
{
......
......@@ -6,8 +6,7 @@
#define CLASS_MARKER_PCB_H
#include "base_struct.h"
#include "drc_stuff.h"
#include "class_marker_base.h"
class MARKER_PCB : public BOARD_ITEM, public MARKER_BASE
{
......
This diff is collapsed.
......@@ -27,7 +27,7 @@
#include "fctsys.h"
#include "class_marker_base.h"
#include "class_marker_pcb.h"
#define OK_DRC 0
......@@ -67,9 +67,9 @@
#define DRCE_NETCLASS_TRACKWIDTH 30 ///< netclass has TrackWidth < board.m_designSettings->m_TrackMinWidth
#define DRCE_NETCLASS_CLEARANCE 31 ///< netclass has Clearance < board.m_designSettings->m_TrackClearance
#define DRCE_NETCLASS_VIASIZE 32 ///< netclass has ViaSize < board.m_designSettings->m_ViasMinSize
#define DRCE_NETCLASS_VIADRILLSIZE 33 ///< netclass has ViaDrillSize < board.m_designSettings->m_ViaDrill
#define DRCE_NETCLASS_uVIASIZE 34
#define DRCE_NETCLASS_uVIADRILLSIZE 35
#define DRCE_NETCLASS_VIADRILLSIZE 33 ///< netclass has ViaDrillSize < board.m_designSettings->m_ViasMinDrill
#define DRCE_NETCLASS_uVIASIZE 34 ///< netclass has ViaSize < board.m_designSettings->m_MicroViasMinSize
#define DRCE_NETCLASS_uVIADRILLSIZE 35 ///< netclass has ViaSize < board.m_designSettings->m_MicroViasMinDrill
class WinEDA_DrawPanel;
......@@ -154,18 +154,29 @@ private:
bool m_aboartDRC;
bool m_drcInProgress;
int m_spotcx;
int m_spotcy;
int m_finx;
int m_finy; // coord relatives de l'extremite du segm de reference
int m_segmAngle; // angle d'inclinaison du segment de reference en 0,1 degre
/* In DRC functions, many calculations are using coordinates relative
* to the position of the segment under test (segm to segm DRC, segm to pad DRC
* Next variables store coordinates relative to the start point of this segment
*/
wxPoint m_padToTestPos; // Position of the pad to compare in drc test segm to pad or pad to pad
wxPoint m_segmEnd; // End point of the reference segment (start point = (0,0) )
/* Some functions are comparing the ref segm to pads or others segments using
* coordinates relative to the ref segment considered as the X axis
* so we store the ref segment length (the end point relative to these axis)
* and the segment orientation (used to rotate other coordinates)
*/
int m_segmAngle; // Ref segm orientation in 0,1 degre
int m_segmLength; // length of the reference segment
/* variables used in checkLine to test DRC segm to segm:
* define the area relative to the ref segment that does not contains anu other segment
*/
int m_xcliplo;
int m_ycliplo;
int m_xcliphi;
int m_ycliphi; // coord de la surface de securite du segment a comparer
int m_ycliphi;
WinEDA_PcbFrame* m_mainWindow;
WinEDA_DrawPanel* m_drawPanel;
......@@ -201,7 +212,7 @@ private:
MARKER_PCB* fillMarker( D_PAD* aPad, D_PAD* bPad, int aErrorCode, MARKER_PCB* fillMe );
MARKER_PCB* fillMarker( ZONE_CONTAINER * aArea, int aErrorCode, MARKER_PCB* fillMe );
MARKER_PCB* fillMarker( ZONE_CONTAINER* aArea, int aErrorCode, MARKER_PCB* fillMe );
/**
* Function fillMarker
......@@ -215,7 +226,10 @@ private:
* @param fillMe A MARKER_PCB* which is to be filled in, or NULL if one is to
* first be allocated, then filled.
*/
MARKER_PCB* fillMarker( const ZONE_CONTAINER * aArea, const wxPoint & aPos, int aErrorCode, MARKER_PCB* fillMe );
MARKER_PCB* fillMarker( const ZONE_CONTAINER* aArea,
const wxPoint& aPos,
int aErrorCode,
MARKER_PCB* fillMe );
/**
* Function fillMarker
......@@ -244,7 +258,7 @@ private:
void testUnconnected();
void testZones(bool adoTestFillSegments);
void testZones( bool adoTestFillSegments );
//-----<single "item" tests>-----------------------------------------
......@@ -284,7 +298,7 @@ private:
* @param aCornerIndex The first corner of the segment to test.
* @return bool - false if DRC error or true if OK
*/
bool doEdgeZoneDrc( ZONE_CONTAINER * aArea, int aCornerIndex );
bool doEdgeZoneDrc( ZONE_CONTAINER* aArea, int aCornerIndex );
//-----<single tests>----------------------------------------------
......@@ -368,7 +382,7 @@ public:
* @param CornerIndex The starting point of the segment to test.
* @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK
*/
int Drc( ZONE_CONTAINER * aArea, int CornerIndex );
int Drc( ZONE_CONTAINER* aArea, int CornerIndex );
/**
* Function DrcBlind
......@@ -385,6 +399,7 @@ public:
return doTrackDrc( aRefSeg, aList ) ? OK_DRC : BAD_DRC;
}
/**
* Function ShowDialog
* opens a dialog and prompts the user, then if a test run button is
......@@ -421,13 +436,14 @@ public:
m_doCreateRptFile = aSaveReport;
}
/**
* Function RunTests
* will actually run all the tests specified with a previous call to
* SetSettings()
* @param aMessages = a wxTextControl where to display some activity messages. Can be NULL
*/
void RunTests(wxTextCtrl * aMessages = NULL);
void RunTests( wxTextCtrl* aMessages = NULL );
/**
* Function ListUnconnectedPad
......
......@@ -11,6 +11,7 @@
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "class_board_design_settings.h"
#include "drc_stuff.h"
#include "protos.h"
......
......@@ -10,6 +10,7 @@
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "class_board_design_settings.h"
#include "drc_stuff.h"
#include "protos.h"
......
......@@ -11,6 +11,7 @@
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "trigo.h"
#include "drc_stuff.h"
#include "drag.h"
#include "pcbnew_id.h"
......
......@@ -15,6 +15,7 @@
#include "pcbnew_id.h"
#include "protos.h"
#include "zones_functions_for_undo_redo.h"
#include "drc_stuff.h"
bool s_Verbose = false; // false if zone outline diags must not be shown
......
......@@ -11,11 +11,11 @@
#include "common.h"
#include "confirm.h"
#include "pcbnew.h"
#include "drc_stuff.h"
bool bDontShowSelfIntersectionArcsWarning;
bool bDontShowSelfIntersectionWarning;
bool bDontShowIntersectionArcsWarning;
bool bDontShowIntersectionWarning;
static bool bDontShowSelfIntersectionArcsWarning;
static bool bDontShowSelfIntersectionWarning;
static bool bDontShowIntersectionArcsWarning;
/** Function AddArea
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment