Browse Source

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)
newinvert
Seth Hillbrand 3 years ago
parent
commit
f24deac017
  1. 2
      pcbnew/drc/drc_test_provider_edge_clearance.cpp
  2. 6
      pcbnew/exporters/gendrill_file_writer_base.cpp

2
pcbnew/drc/drc_test_provider_edge_clearance.cpp

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

6
pcbnew/exporters/gendrill_file_writer_base.cpp

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

Loading…
Cancel
Save