fixed a serious bug in zone filling, for pads with drill but not on all layers
This commit is contained in:
parent
af7c26e8be
commit
c580d5d72c
|
@ -81,7 +81,7 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx )
|
||||||
|
|
||||||
out << " <start " << m_Start << "/> <end " << m_End << "/>\n";
|
out << " <start " << m_Start << "/> <end " << m_End << "/>\n";
|
||||||
|
|
||||||
if( m_Label )
|
if( !m_Label.IsEmpty() )
|
||||||
out << " <label>" << m_Label.mb_str() << "</label>\n";
|
out << " <label>" << m_Label.mb_str() << "</label>\n";
|
||||||
|
|
||||||
if( m_Comp )
|
if( m_Comp )
|
||||||
|
|
|
@ -174,8 +174,11 @@ static int MinimalReq[PIN_NMAX][PIN_NMAX] =
|
||||||
/** Function TestDuplicateSheetNames( )
|
/** Function TestDuplicateSheetNames( )
|
||||||
* inside a given sheet, one cannot have sheets with duplicate names (file
|
* inside a given sheet, one cannot have sheets with duplicate names (file
|
||||||
* names can be duplicated).
|
* names can be duplicated).
|
||||||
|
* @return the error count
|
||||||
|
* @param aCreateMarker: true = create error markers in schematic,
|
||||||
|
* false = calculate error count only
|
||||||
*/
|
*/
|
||||||
int TestDuplicateSheetNames()
|
int TestDuplicateSheetNames(bool aCreateMarker)
|
||||||
{
|
{
|
||||||
int err_count = 0;
|
int err_count = 0;
|
||||||
EDA_ScreenList ScreenList; // Created the list of screen
|
EDA_ScreenList ScreenList; // Created the list of screen
|
||||||
|
@ -203,17 +206,20 @@ int TestDuplicateSheetNames()
|
||||||
( ( SCH_SHEET* ) item_to_test )-> m_SheetName )
|
( ( SCH_SHEET* ) item_to_test )-> m_SheetName )
|
||||||
== 0 )
|
== 0 )
|
||||||
{
|
{
|
||||||
/* Create a new marker type ERC error*/
|
if( aCreateMarker )
|
||||||
SCH_MARKER* Marker = new SCH_MARKER();
|
{
|
||||||
Marker->m_TimeStamp = GetTimeStamp();
|
/* Create a new marker type ERC error*/
|
||||||
Marker->SetData( ERCE_DUPLICATE_SHEET_NAME,
|
SCH_MARKER* Marker = new SCH_MARKER();
|
||||||
( (SCH_SHEET*) item_to_test )->m_Pos,
|
Marker->m_TimeStamp = GetTimeStamp();
|
||||||
_( "Duplicate Sheet name" ),
|
Marker->SetData( ERCE_DUPLICATE_SHEET_NAME,
|
||||||
( (SCH_SHEET*) item_to_test )->m_Pos );
|
( (SCH_SHEET*) item_to_test )->m_Pos,
|
||||||
Marker->SetMarkerType( MARK_ERC );
|
_( "Duplicate Sheet name" ),
|
||||||
Marker->SetErrorLevel( ERR );
|
( (SCH_SHEET*) item_to_test )->m_Pos );
|
||||||
Marker->SetNext( Screen->EEDrawList );
|
Marker->SetMarkerType( MARK_ERC );
|
||||||
Screen->EEDrawList = Marker;
|
Marker->SetErrorLevel( ERR );
|
||||||
|
Marker->SetNext( Screen->EEDrawList );
|
||||||
|
Screen->EEDrawList = Marker;
|
||||||
|
}
|
||||||
err_count++;
|
err_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -279,9 +285,8 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
|
||||||
* inside a given sheet, one cannot have sheets with duplicate names (file
|
* inside a given sheet, one cannot have sheets with duplicate names (file
|
||||||
* names can be duplicated).
|
* names can be duplicated).
|
||||||
*/
|
*/
|
||||||
int errcnt = TestDuplicateSheetNames();
|
int errcnt = TestDuplicateSheetNames( true );
|
||||||
g_EESchemaVar.NbErrorErc += errcnt;
|
g_EESchemaVar.NbErrorErc += errcnt;
|
||||||
g_EESchemaVar.NbWarningErc += errcnt;
|
|
||||||
|
|
||||||
m_Parent->BuildNetListBase();
|
m_Parent->BuildNetListBase();
|
||||||
|
|
||||||
|
@ -290,7 +295,6 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
|
||||||
for( unsigned ii = 0; ii < g_NetObjectslist.size(); ii++ )
|
for( unsigned ii = 0; ii < g_NetObjectslist.size(); ii++ )
|
||||||
g_NetObjectslist[ii]->m_FlagOfConnection = UNCONNECTED;
|
g_NetObjectslist[ii]->m_FlagOfConnection = UNCONNECTED;
|
||||||
|
|
||||||
|
|
||||||
StartNet = OldItem = 0;
|
StartNet = OldItem = 0;
|
||||||
NetNbItems = 0;
|
NetNbItems = 0;
|
||||||
MinConn = NOC;
|
MinConn = NOC;
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
#include "netlist_control.h"
|
#include "netlist_control.h"
|
||||||
|
|
||||||
|
//Imported function:
|
||||||
|
int TestDuplicateSheetNames(bool aCreateMarker);
|
||||||
|
|
||||||
// ID for configuration:
|
// ID for configuration:
|
||||||
#define CUSTOM_NETLIST_TITLE wxT( "CustomNetlistTitle" )
|
#define CUSTOM_NETLIST_TITLE wxT( "CustomNetlistTitle" )
|
||||||
|
@ -492,6 +494,13 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Test duplicate sheet names:
|
||||||
|
if( TestDuplicateSheetNames(false ) > 0 )
|
||||||
|
{
|
||||||
|
if( !IsOK( this, _( "Error: duplicate sheet names. Continue?" ) ) )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Cleanup the entire hierarchy */
|
/* Cleanup the entire hierarchy */
|
||||||
EDA_ScreenList ScreenList;
|
EDA_ScreenList ScreenList;
|
||||||
for( SCH_SCREEN* screen = ScreenList.GetFirst();
|
for( SCH_SCREEN* screen = ScreenList.GetFirst();
|
||||||
|
|
|
@ -216,11 +216,12 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
|
||||||
have_poly_to_substract = false;
|
have_poly_to_substract = false;
|
||||||
|
|
||||||
D_PAD dummyPad((MODULE*)NULL);
|
D_PAD dummyPad((MODULE*)NULL);
|
||||||
|
D_PAD * nextpad;
|
||||||
for( MODULE* module = aPcb->m_Modules; module; module = module->Next() )
|
for( MODULE* module = aPcb->m_Modules; module; module = module->Next() )
|
||||||
{
|
{
|
||||||
for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() )
|
for( D_PAD* pad = module->m_Pads; pad != NULL; pad = nextpad )
|
||||||
{
|
{
|
||||||
|
nextpad = pad->Next(); // pad pointer can be modified by next code, so calculate the next pad here
|
||||||
if( !pad->IsOnLayer( GetLayer() ) )
|
if( !pad->IsOnLayer( GetLayer() ) )
|
||||||
{ /* Test fo pads that are on top or bottom only and have a hole.
|
{ /* Test fo pads that are on top or bottom only and have a hole.
|
||||||
* There are curious pads but they can be used for some components that are inside the
|
* There are curious pads but they can be used for some components that are inside the
|
||||||
|
|
Loading…
Reference in New Issue