|
KiCad PCB EDA Suite
|
Classes | |
| struct | PAD_CHECK_RESULT |
| A single finding from CheckPad(). More... | |
Typedefs | |
| using | PAD_CHECK_HANDLER = std::function<void( const PAD_CHECK_RESULT& )> |
Functions | |
| bool | PadHasMeaningfulRoundingRadius (const PAD &aPad, PCB_LAYER_ID aLayer) |
| Returns true if the pad's rounding ratio is valid (i.e. | |
| double | GetDefaultIpcRoundingRatio (const PAD &aPad, PCB_LAYER_ID aLayer) |
| Get a sensible default for a rounded rectangle pad's rounding ratio. | |
| void | RemoveAllDrillsFromPadstack (PADSTACK &aPadstack) |
| Remove the primary drill, the secondary and tertiary drills, and any post-machining operations from a padstack. | |
| void | CheckPad (const PAD &aPad, const UNITS_PROVIDER &aUnitsProvider, bool aForPadProperties, const PAD_CHECK_HANDLER &aErrorHandler) |
| Run non-board-specific checks on a pad. | |
| using PAD_UTILS::PAD_CHECK_HANDLER = std::function<void( const PAD_CHECK_RESULT& )> |
Definition at line 113 of file pad_utils.h.
|
strong |
A specific pad check finding reason.
Deliberately independent of the DRC error codes: this is an internal check function with granular, but not API-stable, findings. There is a function ConvertPadCheckToDrcCode() that can map these findings to DRC error codes for reporting and processing as fully-fledged DRC errors.
Any of these code can then be remapped to different or new DRC error codes more freely, and new pad codes can be added as needed without affecting existing DRCE codes.
Definition at line 69 of file pad_utils.h.
| void PAD_UTILS::CheckPad | ( | const PAD & | aPad, |
| const UNITS_PROVIDER & | aUnitsProvider, | ||
| bool | aForPadProperties, | ||
| const PAD_CHECK_HANDLER & | aErrorHandler ) |
Run non-board-specific checks on a pad.
These are the checks shared by the PCB DRC, the Footprint Editor Footprint Checker, and the pad properties dialog.
| aPad | is the pad to check. |
| aUnitsProvider | provides unit formatting for the messages. |
| aForPadProperties | enables checks that are only meaningful while editing pad properties, such as the hole being fully inside the copper. |
| aErrorHandler | receives each finding. |
Definition at line 251 of file pad_utils.cpp.
References _, B_Cu, B_Mask, B_Paste, BGA, BGA_NOT_SMD, CASTELLATED, CASTELLATED_NOT_PTH, CONN, CONN_HAS_PASTE, F_Cu, F_Mask, F_Paste, FIDUCIAL_GLBL, FIDUCIAL_LOCAL, FIDUCIAL_NOT_PLATED, PADSTACK::ForEachUniqueLayer(), PAD::GetAttribute(), PAD::GetDrillShape(), PAD::GetDrillSize(), PAD::GetLayerSet(), PAD::GetProperty(), PAD::HasDrilledHole(), HEATSINK, HEATSINK_NOT_PLATED, LSET::InternalCuMask(), PAD::IsOnLayer(), KI_FALLTHROUGH, MECHANICAL, MECHANICAL_NOT_PTH, NPTH, OBLONG, PAD_NO_OUTER_COPPER, PAD::Padstack(), PRESSFIT, PRESSFIT_NOT_PTH, PTH, PTH_NO_OUTER_COPPER, SMD, SMD_BOTH_OUTER_SIDES, SMD_HAS_HOLE, SMD_MASK_WRONG_SIDE, SMD_PASTE_WRONG_SIDE, TESTPOINT, TESTPOINT_NOT_PLATED, TH_NO_HOLE, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by FOOTPRINT_UTILS::CheckPads(), DIALOG_PAD_PROPERTIES::padValuesOK(), and PAD_CHECK_FIXTURE::runPadCheckOnPad().
| double PAD_UTILS::GetDefaultIpcRoundingRatio | ( | const PAD & | aPad, |
| PCB_LAYER_ID | aLayer ) |
Get a sensible default for a rounded rectangle pad's rounding ratio.
According to IPC-7351C, this is 25%, or 0.25mm, whichever is smaller
Definition at line 35 of file pad_utils.cpp.
References PAD::GetSize(), pcbIUScale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PAD_MASTER_PROVIDER::MakeDefaultPad(), DIALOG_PAD_PROPERTIES::onPadShapeSelection(), and PAD::SetFrontShape().
| bool PAD_UTILS::PadHasMeaningfulRoundingRadius | ( | const PAD & | aPad, |
| PCB_LAYER_ID | aLayer ) |
Returns true if the pad's rounding ratio is valid (i.e.
the pad has a shape where that is meaningful)
Definition at line 49 of file pad_utils.cpp.
References CHAMFERED_RECT, PAD::GetShape(), and ROUNDRECT.
Referenced by DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), PAD_DESC::PAD_DESC(), and PAD::SetFrontShape().
| void PAD_UTILS::RemoveAllDrillsFromPadstack | ( | PADSTACK & | aPadstack | ) |
Remove the primary drill, the secondary and tertiary drills, and any post-machining operations from a padstack.
Definition at line 56 of file pad_utils.cpp.
References PADSTACK::BackPostMachining(), PADSTACK::Drill(), PADSTACK::FrontPostMachining(), PADSTACK::SecondaryDrill(), and PADSTACK::TertiaryDrill().
Referenced by PAD::ImportSettingsFrom(), PAD::SetAttribute(), and DIALOG_PAD_PROPERTIES::transferDataToPad().