drc_proto: working on progress reporting
This commit is contained in:
parent
91ce549e63
commit
b107c4a025
|
@ -296,14 +296,12 @@ void test::DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances()
|
||||||
|
|
||||||
for( auto seg_it = m_board->Tracks().begin(); seg_it != m_board->Tracks().end(); seg_it++ )
|
for( auto seg_it = m_board->Tracks().begin(); seg_it != m_board->Tracks().end(); seg_it++ )
|
||||||
{
|
{
|
||||||
if( ii++ > delta )
|
if( (ii % delta) == 0)
|
||||||
{
|
{
|
||||||
ii = 0;
|
ReportProgress( (double) ii / (double) m_board->Tracks().size() );
|
||||||
count++;
|
|
||||||
|
|
||||||
ReportProgress( (double) ii / (double ) count );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ii++;
|
||||||
// Test new segment against tracks and pads, optionally against copper zones
|
// Test new segment against tracks and pads, optionally against copper zones
|
||||||
doTrackDrc( *seg_it, seg_it + 1, m_board->Tracks().end(), false /*fixme: control for copper zones*/ );
|
doTrackDrc( *seg_it, seg_it + 1, m_board->Tracks().end(), false /*fixme: control for copper zones*/ );
|
||||||
}
|
}
|
||||||
|
@ -611,8 +609,8 @@ bool test::DRC_TEST_PROVIDER_COPPER_CLEARANCE::doPadToPadsDrc( D_PAD* aRefPad, D
|
||||||
{
|
{
|
||||||
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_SHORTING_ITEMS );
|
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_SHORTING_ITEMS );
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( drcItem->GetErrorText() + _( " (nets %s and %s)" ),
|
msg.Printf( drcItem->GetErrorText() + _( " (nets %d and %d)" ),
|
||||||
pad->GetNetCode(), aRefPad->GetNetCode() );
|
(int) pad->GetNetCode(), (int) aRefPad->GetNetCode() );
|
||||||
|
|
||||||
drcItem->SetErrorMessage( msg );
|
drcItem->SetErrorMessage( msg );
|
||||||
drcItem->SetItems( pad, aRefPad );
|
drcItem->SetItems( pad, aRefPad );
|
||||||
|
|
|
@ -310,7 +310,7 @@ bool test::DRC_TEST_PROVIDER_HOLE_CLEARANCE::doPadToPadHoleDrc( D_PAD* aRefPad,
|
||||||
|
|
||||||
accountCheck( constraint.GetParentRule() );
|
accountCheck( constraint.GetParentRule() );
|
||||||
|
|
||||||
drc_dbg(1,"check pad %p rule '%s' cl %d\n", constraint.GetParentRule()->GetName(), minClearance );
|
drc_dbg(1,"check pad %p rule '%s' cl %d\n", aRefPad, constraint.GetParentRule()->GetName(), minClearance );
|
||||||
|
|
||||||
auto padShape = pad->GetEffectiveShape();
|
auto padShape = pad->GetEffectiveShape();
|
||||||
if( padShape->Collide( aRefPad->GetEffectiveHoleShape(), minClearance, &actual ) )
|
if( padShape->Collide( aRefPad->GetEffectiveHoleShape(), minClearance, &actual ) )
|
||||||
|
|
Loading…
Reference in New Issue