KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drill_enumerator.h File Reference
#include <vector>
#include <drill/drill_operation.h>

Go to the source code of this file.

Functions

std::vector< DRILL_OPERATION > EnumerateDrillOperations (const BOARD &aBoard, const DRILL_QUERY &aQuery)
 The one place that decides what the board's holes are.
 
std::vector< DRILL_SPAN > EnumerateDrillSpans (const BOARD &aBoard, bool aPadBackdrills=false)
 Every drill span present on the board, through-holes first.
 
bool IsDrillSlot (const PAD &aPad)
 Whether a pad's hole is a slot rather than a round drill.
 

Function Documentation

◆ EnumerateDrillOperations()

std::vector< DRILL_OPERATION > EnumerateDrillOperations ( const BOARD & aBoard,
const DRILL_QUERY & aQuery )

The one place that decides what the board's holes are.

Every drill consumer goes through here so that no two of them can disagree about the board. Results come back in board order. Callers wanting the drill writers' ordering sort afterwards.

Definition at line 291 of file drill_enumerator.cpp.

References B_Cu, DRILL_SPAN::BottomLayer(), F_Cu, BOARD::Footprints(), IsCopperLayerLowerThan(), DRILL_SPAN::m_IsBackdrill, DRILL_QUERY::m_NonPlatedOnly, DRILL_QUERY::m_PadMachining, DRILL_QUERY::m_Span, pad, DRILL_SPAN::Pair(), PCB_VIA_T, DRILL_SPAN::TopLayer(), and BOARD::Tracks().

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DRILL_CHART_MODEL::Build(), GENDRILL_WRITER_BASE::buildHolesList(), FAB_DRILL_MODEL::FAB_DRILL_MODEL(), BRDITEMS_PLOTTER::PlotDrillSymbols(), and ResolveDrillSymbolsByItem().

◆ EnumerateDrillSpans()

◆ IsDrillSlot()

bool IsDrillSlot ( const PAD & aPad)

Whether a pad's hole is a slot rather than a round drill.

One definition, because the drill writers, the chart and the IPC-2581 and ODB++ exporters each used to decide this for themselves and did not agree. A pad whose drill shape is circular but whose X and Y differ was a round hole to the drill files and a slot to the exporters.

Definition at line 284 of file drill_enumerator.cpp.

References CIRCLE, PAD::GetDrillShape(), PAD::GetDrillSizeX(), PAD::GetDrillSizeY(), and PAD::HasHole().

Referenced by PCB_IO_IPC2581::addPadStack(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().