|
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. | |
| wxString | GetPadAttributeString (PAD_ATTRIB aAttrib) |
| Get the human-readable string for a pad attribute. | |
| 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 128 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 81 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. |
Check single-sided copper pads have mask and paste layers on the same side. Applies to SMD, CONN, NON_COMPONENT
Definition at line 269 of file pad_utils.cpp.
References _, LSET::AllCuMask(), B_Cu, B_Mask, B_Paste, BGA, BGA_NOT_SMD, CASTELLATED, CASTELLATED_NOT_PTH, CONN, CONN_HAS_PASTE, EXPAND_INNER_LAYERS, LSET::ExternalCuMask(), F_Cu, F_Mask, F_Paste, FIDUCIAL_GLBL, FIDUCIAL_LOCAL, FIDUCIAL_NOT_PLATED, PADSTACK::ForEachUniqueLayer(), PAD::GetAttribute(), PAD::GetDrillShape(), PAD::GetDrillSize(), PAD::GetLayerSet(), GetPadAttributeString(), BOARD_ITEM::GetParentFootprint(), PAD::GetProperty(), FOOTPRINT::GetStackupMode(), PAD::HasDrilledHole(), HEATSINK, HEATSINK_NOT_PLATED, LSET::InternalCuMask(), PAD::IsOnLayer(), KI_FALLTHROUGH, MASK_WRONG_SIDE, MECHANICAL, MECHANICAL_NOT_PTH, MULTIPLE_COPPER_LAYERS, NON_COMPONENT, NON_COMPONENT_INNER_NEEDS_CUSTOM_STACKUP, NON_COMPONENT_NO_COPPER, NON_COMPONENT_TECH_ON_INNER, NPTH, OBLONG, PAD_NO_OUTER_COPPER, PAD::Padstack(), PASTE_WRONG_SIDE, PRESSFIT, PRESSFIT_NOT_PTH, PTH, PTH_NO_OUTER_COPPER, SMD, TESTPOINT, TESTPOINT_NOT_PLATED, TH_NO_HOLE, UNEXPECTED_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 37 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().
| wxString PAD_UTILS::GetPadAttributeString | ( | PAD_ATTRIB | aAttrib | ) |
Get the human-readable string for a pad attribute.
Used for UI display and error messages.
Note: you have to handle 'aperture' outside this function.
Definition at line 68 of file pad_utils.cpp.
References _, CONN, NON_COMPONENT, NPTH, PTH, and SMD.
Referenced by CheckPad(), and GetPadTypeString().
| 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 51 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 58 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().