Consider oblong holes with x/y equal size as drills

An oblong hole with drillsizex = drillsizey is the same as a circular
drill hit and should be converted to such in outputs (both excellon and
DRC)
This commit is contained in:
Seth Hillbrand 2023-02-22 02:00:11 +01:00
parent 597ef81e53
commit f24deac017
2 changed files with 6 additions and 2 deletions

View File

@ -253,7 +253,7 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run()
{
// edge-clearances are for milling tolerances (drilling tolerances are handled
// by hole-clearances)
if( pad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG )
if( pad->GetDrillSizeX() != pad->GetDrillSizeY() )
edgesTree.Insert( pad, Edge_Cuts, m_largestEdgeClearance );
}

View File

@ -146,8 +146,12 @@ void GENDRILL_WRITER_BASE::buildHolesList( DRILL_LAYER_PAIR aLayerPair,
new_hole.m_Hole_Diameter = std::min( pad->GetDrillSize().x, pad->GetDrillSize().y );
new_hole.m_Hole_Size.x = new_hole.m_Hole_Size.y = new_hole.m_Hole_Diameter;
if( pad->GetDrillShape() != PAD_DRILL_SHAPE_CIRCLE )
// Convert oblong holes that are actually circular into drill hits
if( pad->GetDrillShape() != PAD_DRILL_SHAPE_CIRCLE &&
pad->GetDrillSizeX() != pad->GetDrillSizeY() )
{
new_hole.m_Hole_Shape = 1; // oval flag set
}
new_hole.m_Hole_Size = pad->GetDrillSize();
new_hole.m_Hole_Pos = pad->GetPosition(); // hole position