|
KiCad PCB EDA Suite
|
Utility functions for dealing with layers in the context of a PCB board.s. More...
Functions | |
| wxString | AccumulateNames (const LSEQ &aLayers, const BOARD *aBoard) |
| Accumulate layer names from a layer set into a comma separated string. | |
| wxString | AccumulateNames (const LSET &aLayers, const BOARD *aBoard) |
| Accumulate layer names from a layer set into a comma separated string, in UI order. | |
| LSET | GetAllFootprintLayers (const FOOTPRINT &aFootprint) |
| Return the union of layers referenced by every item inside the footprint (including graphic items, pads, zones, fields, and nested groups). | |
| LSET | GetOrphanedFootprintLayers (const FOOTPRINT &aFootprint, const LSET &aCustomUserLayers) |
| Compute the set of footprint-used layers that would be orphaned if the footprint's allowed layer set is restricted to aCustomUserLayers (plus the tech and user masks). | |
Utility functions for dealing with layers in the context of a PCB board.s.
This includes functions that need access to the board to get layer names, and other more complex, but reusable operations that either shouldn't be in LSET/LSEQ's interface or need access to Pcbnew types.
Accumulate layer names from a layer set into a comma separated string.
| aLayers | is the list of layers to accumulate. |
| aBoard | is the board to get layer names from, if null the default names are used. |
Definition at line 27 of file layer_utils.cpp.
References BOARD::GetLayerName(), LayerName(), and result.
Referenced by AccumulateNames(), footprintVsBoardStackup(), and DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Validate().
Accumulate layer names from a layer set into a comma separated string, in UI order.
Definition at line 57 of file layer_utils.h.
References AccumulateNames(), and LSET::UIOrder().
Return the union of layers referenced by every item inside the footprint (including graphic items, pads, zones, fields, and nested groups).
Definition at line 43 of file layer_utils.cpp.
References BOARD_ITEM::GetLayerSet(), RECURSE, and FOOTPRINT::RunOnChildren().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and GetOrphanedFootprintLayers().
| LSET LAYER_UTILS::GetOrphanedFootprintLayers | ( | const FOOTPRINT & | aFootprint, |
| const LSET & | aCustomUserLayers ) |
Compute the set of footprint-used layers that would be orphaned if the footprint's allowed layer set is restricted to aCustomUserLayers (plus the tech and user masks).
The Rescue pseudo-layer is intentionally excluded. It is an internal fallback for items referencing unknown layer names at load time and is not surfaced in any layer-selection UI. Orphans on Rescue must be addressed through the library-parity DRC, not by blocking edits in the Footprint Properties dialog.
Definition at line 59 of file layer_utils.cpp.
References GetAllFootprintLayers(), Rescue, and BASE_SET::reset().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Validate().