46 std::vector<DRILL_OPERATION>& aOut )
54 return std::optional<int>();
71 if( drillSpan.Pair() != span.
Pair() )
91 int diameter = aDrill.
size.
x;
93 if( aDrill.
size.
y > 0 )
94 diameter = ( diameter > 0 ) ? std::min( diameter, aDrill.
size.
y ) : aDrill.
size.
y;
114 aOut.push_back( op );
129 aVia->
LayerPair( &topLayer, &bottomLayer );
166 aOut.push_back( op );
170void enumeratePad(
PAD* aPad,
const DRILL_QUERY& aQuery, std::vector<DRILL_OPERATION>& aOut )
219 aOut.push_back( op );
234 std::vector<DRILL_OPERATION> operations;
245 enumerateVia(
static_cast<PCB_VIA*
>( track ), aBoard, aQuery, operations );
253 for(
PAD*
pad : footprint->Pads() )
254 enumeratePad(
pad, aQuery, operations );
BOARD_STACKUP & GetStackupDescriptor()
Manage layers needed to make a physical board.
int GetLayerDistance(PCB_LAYER_ID aFirstLayer, PCB_LAYER_ID aSecondLayer) const
Calculate the distance (height) between the two given copper layers.
Information pertinent to a Pcbnew printed circuit board.
const FOOTPRINTS & Footprints() const
const TRACKS & Tracks() const
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
std::optional< bool > IsFilled() const
std::optional< bool > IsTented(PCB_LAYER_ID aSide) const
Checks if this padstack is tented (covered in soldermask) on the given side.
POST_MACHINING_PROPS & FrontPostMachining()
std::optional< bool > IsPlugged(PCB_LAYER_ID aSide) const
DRILL_PROPS & TertiaryDrill()
std::optional< bool > IsCapped() const
std::optional< bool > IsCovered(PCB_LAYER_ID aSide) const
DRILL_PROPS & SecondaryDrill()
POST_MACHINING_PROPS & BackPostMachining()
PAD_PROP GetProperty() const
int GetDrillSizeY() const
PAD_ATTRIB GetAttribute() const
VECTOR2I GetPosition() const override
VECTOR2I GetDrillSize() const
int GetDrillSizeX() const
EDA_ANGLE GetOrientation() const
Return the rotation angle of the pad.
PAD_DRILL_SHAPE GetDrillShape() const
bool HasHole() const override
const VECTOR2I & GetStart() const
const PADSTACK & Padstack() const
int GetDrillValue() const
Calculate the drill value for vias (m_drill if > 0, or default drill value for the board).
void LayerPair(PCB_LAYER_ID *top_layer, PCB_LAYER_ID *bottom_layer) const
Return the 2 layers used by the via (the via actually uses all layers between these 2 layers)
bool IsDrillSlot(const PAD &aPad)
Whether a pad's hole is a slot rather than a round drill.
std::vector< DRILL_OPERATION > EnumerateDrillOperations(const BOARD &aBoard, const DRILL_QUERY &aQuery)
The one place that decides what the board's holes are.
DRILL_OP_KIND
Which of the padstack's drill props produced the operation.
std::pair< PCB_LAYER_ID, PCB_LAYER_ID > DRILL_LAYER_PAIR
static constexpr EDA_ANGLE ANGLE_0
bool IsCopperLayerLowerThan(PCB_LAYER_ID aLayerA, PCB_LAYER_ID aLayerB)
Return true if copper aLayerA is placed lower than aLayerB, false otherwise.
PCB_LAYER_ID
A quick note on layer IDs:
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
@ PRESSFIT
a PTH with a hole diameter with tight tolerances for press fit pin
@ CASTELLATED
a pad with a castellated through hole
One machining action, which is also one NC hit and one tool assignment.
DRILL_POST_MACHINING m_BackPostMachining
PCB_LAYER_ID m_BottomLayer
VECTOR2I m_SizeXY
Source axes, never normalized to (width, length).
BOARD_ITEM * m_SourceItem
non-owning, valid only for this enumeration
DRILL_POST_MACHINING m_FrontPostMachining
std::optional< int > m_StubLength
HOLE_ATTRIBUTE m_Attribute
PCB_LAYER_ID m_DrillStart
PAD_DRILL_POST_MACHINING_MODE m_Mode
Selects which operations EnumerateDrillOperations() returns.
bool m_NonPlatedOnly
Emit only non-plated holes.
bool m_MergePTHNPTH
Emit plated and non-plated together, as the merged drill file does.
DRILL_LAYER_PAIR Pair() const
PCB_LAYER_ID DrillEndLayer() const
PCB_LAYER_ID TopLayer() const
PCB_LAYER_ID DrillStartLayer() const
PCB_LAYER_ID BottomLayer() const
The properties of a padstack drill.
VECTOR2I size
Drill diameter (x == y) or slot dimensions (x != y)
std::optional< bool > is_capped
True if the drill hole should be capped.
std::optional< bool > is_filled
True if the drill hole should be filled completely.
std::optional< PAD_DRILL_POST_MACHINING_MODE > mode
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
VECTOR2< int32_t > VECTOR2I