DRC: Add test for via drill size

This test is only run when the via size itself is acceptable, to avoid
bigger changes to the codebase.
This commit is contained in:
Simon Richter 2016-08-25 03:16:27 +02:00 committed by Chris Pavlina
parent 260b0f6b5f
commit 3a92db4312
3 changed files with 30 additions and 12 deletions

View File

@ -89,6 +89,10 @@ wxString DRC_ITEM::GetErrorText() const
return wxString( _( "Too small via size" ) );
case DRCE_TOO_SMALL_MICROVIA:
return wxString( _( "Too small micro via size" ) );
case DRCE_TOO_SMALL_VIA_DRILL:
return wxString( _( "Too small via drill" ) );
case DRCE_TOO_SMALL_MICROVIA_DRILL:
return wxString( _( "Too small micro via drill" ) );
// use < since this is text ultimately embedded in HTML
case DRCE_NETCLASS_TRACKWIDTH:

View File

@ -169,6 +169,12 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
DRCE_TOO_SMALL_MICROVIA, m_currentMarker );
return false;
}
if( refvia->GetDrill() < dsnSettings.m_MicroViasMinDrill )
{
m_currentMarker = fillMarker( refvia, NULL,
DRCE_TOO_SMALL_MICROVIA_DRILL, m_currentMarker );
return false;
}
}
else
{
@ -178,6 +184,12 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
DRCE_TOO_SMALL_VIA, m_currentMarker );
return false;
}
if( refvia->GetDrill() < dsnSettings.m_ViasMinDrill )
{
m_currentMarker = fillMarker( refvia, NULL,
DRCE_TOO_SMALL_VIA_DRILL, m_currentMarker );
return false;
}
}
// test if via's hole is bigger than its diameter

View File

@ -66,18 +66,20 @@
#define DRCE_TOO_SMALL_TRACK_WIDTH 27 ///< Too small track width
#define DRCE_TOO_SMALL_VIA 28 ///< Too small via size
#define DRCE_TOO_SMALL_MICROVIA 29 ///< Too small micro via size
#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_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
#define DRCE_VIA_INSIDE_KEEPOUT 36 ///< Via in inside a keepout area
#define DRCE_TRACK_INSIDE_KEEPOUT 37 ///< Track in inside a keepout area
#define DRCE_PAD_INSIDE_KEEPOUT 38 ///< Pad in inside a keepout area
#define DRCE_VIA_INSIDE_TEXT 39 ///< Via in inside a text area
#define DRCE_TRACK_INSIDE_TEXT 40 ///< Track in inside a text area
#define DRCE_PAD_INSIDE_TEXT 41 ///< Pad in inside a text area
#define DRCE_TOO_SMALL_VIA_DRILL 30 ///< Too small via drill
#define DRCE_TOO_SMALL_MICROVIA_DRILL 31 ///< Too small micro via drill
#define DRCE_NETCLASS_TRACKWIDTH 32 ///< netclass has TrackWidth < board.m_designSettings->m_TrackMinWidth
#define DRCE_NETCLASS_CLEARANCE 33 ///< netclass has Clearance < board.m_designSettings->m_TrackClearance
#define DRCE_NETCLASS_VIASIZE 34 ///< netclass has ViaSize < board.m_designSettings->m_ViasMinSize
#define DRCE_NETCLASS_VIADRILLSIZE 35 ///< netclass has ViaDrillSize < board.m_designSettings->m_ViasMinDrill
#define DRCE_NETCLASS_uVIASIZE 36 ///< netclass has ViaSize < board.m_designSettings->m_MicroViasMinSize
#define DRCE_NETCLASS_uVIADRILLSIZE 37 ///< netclass has ViaSize < board.m_designSettings->m_MicroViasMinDrill
#define DRCE_VIA_INSIDE_KEEPOUT 38 ///< Via in inside a keepout area
#define DRCE_TRACK_INSIDE_KEEPOUT 39 ///< Track in inside a keepout area
#define DRCE_PAD_INSIDE_KEEPOUT 40 ///< Pad in inside a keepout area
#define DRCE_VIA_INSIDE_TEXT 41 ///< Via in inside a text area
#define DRCE_TRACK_INSIDE_TEXT 42 ///< Track in inside a text area
#define DRCE_PAD_INSIDE_TEXT 43 ///< Pad in inside a text area
class EDA_DRAW_PANEL;