drc_test_provider_mechanical_clearance: add missing handling of SHAPE_T::RECT

test_ee_item.cpp: add missing call to ClearFieldsAutoplaced();
This commit is contained in:
jean-pierre charras 2022-01-08 10:49:47 +01:00
parent 563e8817a2
commit 33dbe92deb
2 changed files with 16 additions and 1 deletions

View File

@ -337,6 +337,20 @@ bool DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::Run()
break;
}
case SHAPE_T::RECT:
{
SHAPE_LINE_CHAIN asPoly;
std::vector<VECTOR2I> pts = shape->GetRectCorners();
asPoly.Append( pts[0] );
asPoly.Append( pts[1] );
asPoly.Append( pts[2] );
asPoly.Append( pts[3] );
asPoly.SetClosed( true );
testShapeLineChain( asPoly, shape->GetWidth(), layer, item, c );
break;
}
default:
UNIMPLEMENTED_FOR( shape->SHAPE_T_asString() );
}

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2021 KiCad Developers, see AUTHORS.TXT for contributors.
* Copyright (C) 2022 KiCad Developers, see AUTHORS.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -244,6 +244,7 @@ BOOST_AUTO_TEST_CASE( Rotate )
if( schItem != nullptr )
{
schItem->ClearFieldsAutoplaced();
schItem->Rotate( aRef );
schItem->Rotate( aRef );
schItem->Rotate( aRef );