Exact clearance is allowed; less than clearance is an error.

Also fixes a bug where the units weren't shown for extra precision
numbers.

Fixes https://gitlab.com/kicad/code/kicad/issues/13262
This commit is contained in:
Jeff Young 2023-01-04 00:02:25 +00:00
parent 13d196c509
commit 375fdb7a49
2 changed files with 6 additions and 2 deletions

View File

@ -371,8 +371,8 @@ wxString DRC_TEST_PROVIDER::formatMsg( const wxString& aFormatString, const wxSt
if( constraint_str == actual_str )
{
// Use more precise formatting if the message-text strings were equal.
constraint_str = StringFromValue( aConstraint );
actual_str = StringFromValue( aActual );
constraint_str = StringFromValue( aConstraint, true );
actual_str = StringFromValue( aActual, true );
}
return wxString::Format( aFormatString, aSource, constraint_str, actual_str );

View File

@ -102,6 +102,10 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::testAgainstEdge( BOARD_ITEM* item, SHAPE*
{
if( itemShape->Collide( shape.get(), minClearance, &actual, &pos ) )
{
// Exact clearance is allowed
if( minClearance > 0 && actual == minClearance )
return true;
if( item->Type() == PCB_TRACE_T || item->Type() == PCB_ARC_T )
{
// Edge collisions are allowed inside the holes of castellated pads