Make sure board edges have 0 width.

When we divide up a rectangle or polygon (for better RTree usage)
we need to make sure the individual segments also have their widths
zeroed out.

Fixes https://gitlab.com/kicad/code/kicad/issues/6482
This commit is contained in:
Jeff Young 2020-11-24 23:48:31 +00:00
parent 71ce00c5ce
commit 1cae0b6c08
1 changed files with 5 additions and 0 deletions

View File

@ -148,15 +148,19 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run()
edges.emplace_back( static_cast<PCB_SHAPE*>( shape->Clone() ) );
edges.back()->SetShape( S_SEGMENT );
edges.back()->SetEndX( shape->GetStartX() );
edges.back()->SetWidth( 0 );
edges.emplace_back( static_cast<PCB_SHAPE*>( shape->Clone() ) );
edges.back()->SetShape( S_SEGMENT );
edges.back()->SetEndY( shape->GetStartY() );
edges.back()->SetWidth( 0 );
edges.emplace_back( static_cast<PCB_SHAPE*>( shape->Clone() ) );
edges.back()->SetShape( S_SEGMENT );
edges.back()->SetStartX( shape->GetEndX() );
edges.back()->SetWidth( 0 );
edges.emplace_back( static_cast<PCB_SHAPE*>( shape->Clone() ) );
edges.back()->SetShape( S_SEGMENT );
edges.back()->SetStartY( shape->GetEndY() );
edges.back()->SetWidth( 0 );
return true;
}
else if( shape->GetShape() == S_POLYGON )
@ -171,6 +175,7 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run()
edges.back()->SetShape( S_SEGMENT );
edges.back()->SetStart((wxPoint) seg.A );
edges.back()->SetEnd((wxPoint) seg.B );
edges.back()->SetWidth( 0 );
}
}