Browse Source

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
7.0
Jeff Young 3 years ago
parent
commit
375fdb7a49
  1. 4
      pcbnew/drc/drc_test_provider.cpp
  2. 4
      pcbnew/drc/drc_test_provider_edge_clearance.cpp

4
pcbnew/drc/drc_test_provider.cpp

@ -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 );

4
pcbnew/drc/drc_test_provider_edge_clearance.cpp

@ -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

Loading…
Cancel
Save