mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Disable pad-hole-not-fully-inside-copper for board-level testing.
Also fixes the error string for it.
This commit is contained in:
parent
a41a9ea51f
commit
c2818dcb29
pcbnew
@ -1400,7 +1400,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
|
||||
wxArrayString error_msgs;
|
||||
wxArrayString warning_msgs;
|
||||
|
||||
m_previewPad->CheckPad( m_parentFrame,
|
||||
m_previewPad->CheckPad( m_parentFrame, true,
|
||||
[&]( int errorCode, const wxString& msg )
|
||||
{
|
||||
if( errorCode == DRCE_PADSTACK_INVALID )
|
||||
|
@ -3278,7 +3278,7 @@ void FOOTPRINT::CheckPads( UNITS_PROVIDER* aUnitsProvider,
|
||||
|
||||
for( PAD* pad: Pads() )
|
||||
{
|
||||
pad->CheckPad( aUnitsProvider,
|
||||
pad->CheckPad( aUnitsProvider, false,
|
||||
[&]( int errorCode, const wxString& msg )
|
||||
{
|
||||
aErrorHandler( pad, errorCode, msg );
|
||||
|
@ -2159,14 +2159,15 @@ std::vector<PCB_SHAPE*> PAD::Recombine( bool aIsDryRun, int maxError )
|
||||
}
|
||||
|
||||
|
||||
void PAD::CheckPad( UNITS_PROVIDER* aUnitsProvider,
|
||||
void PAD::CheckPad( UNITS_PROVIDER* aUnitsProvider, bool aForPadProperties,
|
||||
const std::function<void( int aErrorCode,
|
||||
const wxString& aMsg )>& aErrorHandler ) const
|
||||
{
|
||||
Padstack().ForEachUniqueLayer( [&]( PCB_LAYER_ID aLayer )
|
||||
{
|
||||
doCheckPad( aLayer, aUnitsProvider, aErrorHandler );
|
||||
} );
|
||||
Padstack().ForEachUniqueLayer(
|
||||
[&]( PCB_LAYER_ID aLayer )
|
||||
{
|
||||
doCheckPad( aLayer, aUnitsProvider, aForPadProperties, aErrorHandler );
|
||||
} );
|
||||
|
||||
LSET padlayers_mask = GetLayerSet();
|
||||
VECTOR2I drill_size = GetDrillSize();
|
||||
@ -2274,7 +2275,7 @@ void PAD::CheckPad( UNITS_PROVIDER* aUnitsProvider,
|
||||
}
|
||||
|
||||
|
||||
void PAD::doCheckPad( PCB_LAYER_ID aLayer, UNITS_PROVIDER* aUnitsProvider,
|
||||
void PAD::doCheckPad( PCB_LAYER_ID aLayer, UNITS_PROVIDER* aUnitsProvider, bool aForPadProperties,
|
||||
const std::function<void( int aErrorCode,
|
||||
const wxString& aMsg )>& aErrorHandler ) const
|
||||
{
|
||||
@ -2322,13 +2323,15 @@ void PAD::doCheckPad( PCB_LAYER_ID aLayer, UNITS_PROVIDER* aUnitsProvider,
|
||||
{
|
||||
aErrorHandler( DRCE_PADSTACK, _( "(PTH pad hole leaves no copper)" ) );
|
||||
}
|
||||
else
|
||||
else if( aForPadProperties )
|
||||
{
|
||||
// Test if the pad hole is fully inside the copper area
|
||||
// Test if the pad hole is fully inside the copper area. Note that we only run
|
||||
// this check for pad properties because we run the more complete annular ring
|
||||
// checker on the board (which handles multiple pads with the same name).
|
||||
holeOutline.BooleanSubtract( padOutline );
|
||||
|
||||
if( !holeOutline.IsEmpty() )
|
||||
aErrorHandler( DRCE_PADSTACK, _( "(PTH pad hole non fully inside copper)" ) );
|
||||
aErrorHandler( DRCE_PADSTACK, _( "(PTH pad hole not fully inside copper)" ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -882,7 +882,7 @@ public:
|
||||
|
||||
void SetZoneLayerOverride( PCB_LAYER_ID aLayer, ZONE_LAYER_OVERRIDE aOverride );
|
||||
|
||||
void CheckPad( UNITS_PROVIDER* aUnitsProvider,
|
||||
void CheckPad( UNITS_PROVIDER* aUnitsProvider, bool aForPadProperties,
|
||||
const std::function<void( int aErrorCode,
|
||||
const wxString& aMsg )>& aErrorHandler ) const;
|
||||
|
||||
@ -904,7 +904,7 @@ private:
|
||||
void addPadPrimitivesToPolygon( PCB_LAYER_ID aLayer, SHAPE_POLY_SET* aMergedPolygon, int aError,
|
||||
ERROR_LOC aErrorLoc ) const;
|
||||
|
||||
void doCheckPad( PCB_LAYER_ID aLayer, UNITS_PROVIDER* aUnitsProvider,
|
||||
void doCheckPad( PCB_LAYER_ID aLayer, UNITS_PROVIDER* aUnitsProvider, bool aForPadProperties,
|
||||
const std::function<void( int aErrorCode,
|
||||
const wxString& aMsg )>& aErrorHandler ) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user