KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FOOTPRINT_UTILS Namespace Reference

Typedefs

using PAD_CHECK_HANDLER = std::function<void( const PAD&, const PAD_UTILS::PAD_CHECK_RESULT& )>
 

Functions

void CheckFootprintAttributes (const FOOTPRINT &aFootprint, const std::function< void(const wxString &)> &aErrorHandler)
 Check that the footprint's SMD/through-hole attribute matches its pads.
 
void CheckPads (const FOOTPRINT &aFootprint, const UNITS_PROVIDER &aUnitsProvider, const PAD_CHECK_HANDLER &aErrorHandler)
 Run non-board-specific DRC checks on footprint's pads.
 
void CheckShortingPads (const FOOTPRINT &aFootprint, const std::function< void(const PAD *, const PAD *, int aErrorCode, const VECTOR2I &)> &aErrorHandler)
 Check for overlapping, different-numbered, non-net-tie pads.
 
void CheckNetTies (const FOOTPRINT &aFootprint, const std::function< void(const BOARD_ITEM *, const BOARD_ITEM *, const BOARD_ITEM *, const VECTOR2I &)> &aErrorHandler)
 Check for un-allowed shorting of pads in net-tie footprints.
 
void CheckNetTiePadGroups (const FOOTPRINT &aFootprint, const std::function< void(const wxString &)> &aErrorHandler)
 Sanity check net-tie pad groups.
 
void CheckClippedSilk (const FOOTPRINT &aFootprint, const std::function< void(BOARD_ITEM *, BOARD_ITEM *, const VECTOR2I &)> &aErrorHandler)
 Check for silkscreen graphics clipped by solder mask apertures.
 

Typedef Documentation

◆ PAD_CHECK_HANDLER

using FOOTPRINT_UTILS::PAD_CHECK_HANDLER = std::function<void( const PAD&, const PAD_UTILS::PAD_CHECK_RESULT& )>

Definition at line 65 of file footprint_utils.h.

Function Documentation

◆ CheckClippedSilk()

void FOOTPRINT_UTILS::CheckClippedSilk ( const FOOTPRINT & aFootprint,
const std::function< void(BOARD_ITEM *, BOARD_ITEM *, const VECTOR2I &)> & aErrorHandler )

Check for silkscreen graphics clipped by solder mask apertures.

Definition at line 390 of file footprint_utils.cpp.

References actual, B_Mask, B_SilkS, F_Mask, F_SilkS, BOARD_ITEM::GetEffectiveShape(), FOOTPRINT::GraphicalItems(), BOARD_ITEM::IsOnLayer(), pad, and FOOTPRINT::Pads().

Referenced by DIALOG_FOOTPRINT_CHECKER::runChecks().

◆ CheckFootprintAttributes()

void FOOTPRINT_UTILS::CheckFootprintAttributes ( const FOOTPRINT & aFootprint,
const std::function< void(const wxString &)> & aErrorHandler )

Check that the footprint's SMD/through-hole attribute matches its pads.

Parameters
aFootprintis the footprint to check.
aErrorHandlerreceives each finding message.

Definition at line 137 of file footprint_utils.cpp.

References _, FP_SMD, FP_THROUGH_HOLE, FOOTPRINT::GetAttributes(), FOOTPRINT::GetLikelyAttribute(), and FOOTPRINT::GetTypeName().

Referenced by DRC_TEST_PROVIDER_FOOTPRINT_CHECKS::Run(), and DIALOG_FOOTPRINT_CHECKER::runChecks().

◆ CheckNetTiePadGroups()

void FOOTPRINT_UTILS::CheckNetTiePadGroups ( const FOOTPRINT & aFootprint,
const std::function< void(const wxString &)> & aErrorHandler )

Sanity check net-tie pad groups.

Pads cannot be listed more than once, and pad numbers must correspond to a pad.

Definition at line 366 of file footprint_utils.cpp.

References _, FOOTPRINT::FindPadByNumber(), FOOTPRINT::MapPadNumbersToNetTieGroups(), and pad.

Referenced by DRC_TEST_PROVIDER_FOOTPRINT_CHECKS::Run(), and DIALOG_FOOTPRINT_CHECKER::runChecks().

◆ CheckNetTies()

void FOOTPRINT_UTILS::CheckNetTies ( const FOOTPRINT & aFootprint,
const std::function< void(const BOARD_ITEM *, const BOARD_ITEM *, const BOARD_ITEM *, const VECTOR2I &)> & aErrorHandler )

◆ CheckPads()

void FOOTPRINT_UTILS::CheckPads ( const FOOTPRINT & aFootprint,
const UNITS_PROVIDER & aUnitsProvider,
const PAD_CHECK_HANDLER & aErrorHandler )

Run non-board-specific DRC checks on footprint's pads.

These are the checks supported by both the PCB DRC and the Footprint Editor Footprint Checker.

Parameters
aFootprintis the footprint whose pads are checked.
aUnitsProviderprovides unit formatting for the messages.
aErrorHandlerreceives each finding.

Definition at line 163 of file footprint_utils.cpp.

References PAD_UTILS::CheckPad(), pad, and FOOTPRINT::Pads().

Referenced by DRC_TEST_PROVIDER_FOOTPRINT_CHECKS::Run(), and DIALOG_FOOTPRINT_CHECKER::runChecks().

◆ CheckShortingPads()

void FOOTPRINT_UTILS::CheckShortingPads ( const FOOTPRINT & aFootprint,
const std::function< void(const PAD *, const PAD *, int aErrorCode, const VECTOR2I &)> & aErrorHandler )