KiCad PCB EDA Suite
|
Lightweight class which holds a pad, via, or a routed trace outline. More...
#include <length_calculation.h>
Public Types | |
enum class | TYPE { UNKNOWN , PAD , LINE , VIA } |
The type of routing object this item proxies. More... | |
enum class | MERGE_STATUS { UNMERGED , MERGED_IN_USE , MERGED_RETIRED } |
Whether this item is UNMERGED, it has been merged and should be used (MERGED_IN_USE), or it has been merged and has been retired from use (MERGED_RETIRED). More... | |
Public Member Functions | |
TYPE | Type () const |
Gets the routing item type. | |
void | SetPad (PAD *aPad) |
Sets the parent PAD associated with this item. | |
PAD * | GetPad () const |
Gets the parent PAD associated with this item. | |
void | SetLine (const SHAPE_LINE_CHAIN &aLine) |
Sets the source SHAPE_LINE_CHAIN of this item. | |
SHAPE_LINE_CHAIN & | GetLine () const |
Gets the SHAPE_LINE_CHAIN associated with this item. | |
void | SetVia (PCB_VIA *aVia) |
Sets the VIA associated with this item. | |
PCB_VIA * | GetVia () const |
Gets the VIA associated with this item. | |
void | SetLayers (const PCB_LAYER_ID aStart, const PCB_LAYER_ID aEnd=PCB_LAYER_ID::UNDEFINED_LAYER) |
Sets the first and last layers associated with this item. | |
void | SetMergeStatus (const MERGE_STATUS aStatus) |
Sets the MERGE_STATUS of this item. | |
MERGE_STATUS | GetMergeStatus () const |
Gets the MERGE_STATUS of this item. | |
std::tuple< PCB_LAYER_ID, PCB_LAYER_ID > | GetLayers () const |
Gets the upper and lower layers for the proxied item. | |
PCB_LAYER_ID | GetStartLayer () const |
Gets the start board layer for the proxied item. | |
PCB_LAYER_ID | GetEndLayer () const |
Gets the end board layer for the proxied item. | |
void | CalculateViaLayers (const BOARD *aBoard) |
Calculates active via payers for a proxied VIA object. | |
Protected Attributes | |
PAD * | m_pad { nullptr } |
A proxied PAD object. Set to nullptr if not proxying a PAD. | |
SHAPE_LINE_CHAIN | m_line |
A proxied SHAPE_LINE_CHAIN object. Line is empty if not proxying a SHAPE_LINE_CHAIN. | |
PCB_VIA * | m_via { nullptr } |
A proxied PVIAAD object. Set to nullptr if not proxying a VIA. | |
PCB_LAYER_ID | m_layerStart { PCB_LAYER_ID::UNDEFINED_LAYER } |
The start board layer for the proxied object. | |
PCB_LAYER_ID | m_layerEnd { PCB_LAYER_ID::UNDEFINED_LAYER } |
The end board layer for the proxied object. | |
MERGE_STATUS | m_mergeStatus { MERGE_STATUS::UNMERGED } |
Flags whether this item has already been merged with another. | |
TYPE | m_type { TYPE::UNKNOWN } |
The routing object type of the proxied parent. | |
Lightweight class which holds a pad, via, or a routed trace outline.
Proxied objects passed by pointer are not owned by this container.
Definition at line 41 of file length_calculation.h.
|
strong |
Whether this item is UNMERGED, it has been merged and should be used (MERGED_IN_USE), or it has been merged and has been retired from use (MERGED_RETIRED).
MERGED_RETIRED essentially means the object has been merged in to a MERGED_IN_USE item.
Enumerator | |
---|---|
UNMERGED | |
MERGED_IN_USE | |
MERGED_RETIRED |
Definition at line 56 of file length_calculation.h.
|
strong |
The type of routing object this item proxies.
Enumerator | |
---|---|
UNKNOWN | |
PAD | |
LINE | |
VIA |
Definition at line 45 of file length_calculation.h.
void LENGTH_CALCULATION_ITEM::CalculateViaLayers | ( | const BOARD * | aBoard | ) |
Calculates active via payers for a proxied VIA object.
Definition at line 31 of file length_calculation.cpp.
References PCB_VIA::BottomLayer(), LSET::copper_layers_begin(), LSET::copper_layers_end(), BOARD::GetConnectivity(), BOARD::GetDesignSettings(), BOARD_DESIGN_SETTINGS::GetEnabledLayers(), m_via, PCB_ARC_T, PCB_PAD_T, PCB_TRACE_T, SetLayers(), PCB_VIA::TopLayer(), and UNDEFINED_LAYER.
Referenced by LENGTH_CALCULATION::GetLengthCalculationItem().
|
inline |
Gets the end board layer for the proxied item.
Definition at line 117 of file length_calculation.h.
References m_layerEnd.
|
inline |
Gets the upper and lower layers for the proxied item.
Definition at line 111 of file length_calculation.h.
References m_layerEnd, and m_layerStart.
|
inline |
Gets the SHAPE_LINE_CHAIN associated with this item.
Definition at line 84 of file length_calculation.h.
References m_line.
Referenced by LENGTH_CALCULATION::mergeLines().
|
inline |
Gets the MERGE_STATUS of this item.
Definition at line 108 of file length_calculation.h.
References m_mergeStatus.
|
inline |
Gets the parent PAD associated with this item.
Definition at line 74 of file length_calculation.h.
References m_pad.
Referenced by LENGTH_CALCULATION::optimiseViaLayers().
|
inline |
Gets the start board layer for the proxied item.
Definition at line 114 of file length_calculation.h.
References m_layerStart.
Referenced by LENGTH_CALCULATION::inferViaInPad(), LENGTH_CALCULATION::mergeLines(), and LENGTH_CALCULATION::optimiseViaLayers().
|
inline |
Gets the VIA associated with this item.
Definition at line 94 of file length_calculation.h.
References m_via.
|
inline |
Sets the first and last layers associated with this item.
Definition at line 97 of file length_calculation.h.
References m_layerEnd, and m_layerStart.
Referenced by PNS_KICAD_IFACE_BASE::CalculateRoutedPathLength(), PNS_VIEWER_IFACE::CalculateRoutedPathLength(), CalculateViaLayers(), and LENGTH_CALCULATION::GetLengthCalculationItem().
|
inline |
Sets the source SHAPE_LINE_CHAIN of this item.
Definition at line 77 of file length_calculation.h.
References m_line, and m_type.
Referenced by PNS_KICAD_IFACE_BASE::CalculateRoutedPathLength(), PNS_VIEWER_IFACE::CalculateRoutedPathLength(), and LENGTH_CALCULATION::GetLengthCalculationItem().
|
inline |
Sets the MERGE_STATUS of this item.
MERGED_RETIRED essentially means the object has been merged in to a MERGED_IN_USE item.
Definition at line 105 of file length_calculation.h.
References m_mergeStatus.
Referenced by LENGTH_CALCULATION::mergeLines().
|
inline |
Sets the parent PAD associated with this item.
Definition at line 67 of file length_calculation.h.
Referenced by LENGTH_CALCULATION::GetLengthCalculationItem().
|
inline |
Sets the VIA associated with this item.
Definition at line 87 of file length_calculation.h.
Referenced by PNS_KICAD_IFACE_BASE::CalculateRoutedPathLength(), PNS_VIEWER_IFACE::CalculateRoutedPathLength(), and LENGTH_CALCULATION::GetLengthCalculationItem().
|
inline |
Gets the routing item type.
Definition at line 64 of file length_calculation.h.
References m_type.
Referenced by BOARD::GetTrackLength(), LENGTH_CALCULATION::inferViaInPad(), and DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal().
|
protected |
The end board layer for the proxied object.
Definition at line 136 of file length_calculation.h.
Referenced by GetEndLayer(), GetLayers(), and SetLayers().
|
protected |
The start board layer for the proxied object.
Definition at line 133 of file length_calculation.h.
Referenced by GetLayers(), GetStartLayer(), and SetLayers().
|
mutableprotected |
A proxied SHAPE_LINE_CHAIN object. Line is empty if not proxying a SHAPE_LINE_CHAIN.
Definition at line 127 of file length_calculation.h.
|
protected |
Flags whether this item has already been merged with another.
Definition at line 139 of file length_calculation.h.
Referenced by GetMergeStatus(), and SetMergeStatus().
|
protected |
|
protected |
|
protected |
A proxied PVIAAD object. Set to nullptr if not proxying a VIA.
Definition at line 130 of file length_calculation.h.
Referenced by CalculateViaLayers(), GetVia(), and SetVia().