26#ifndef BOARD_CONNECTED_ITEM_H
27#define BOARD_CONNECTED_ITEM_H
50 if( aItem ==
nullptr )
53 switch( aItem->
Type() )
106 bool SetNetCode(
int aNetCode,
bool aNoAssert );
151 return std::optional<int>();
161 return std::optional<int>();
172 return std::optional<int>();
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual std::optional< int > GetClearanceOverrides(wxString *aSource) const
Return any clearance overrides set in the "classic" (ie: pre-rule) system.
wxString GetNetnameMsg() const
bool GetTeardropPreferZoneConnections() const
virtual NETCLASS * GetEffectiveNetClass() const
Return the NETCLASS for this item.
double GetTeardropBestLengthRatio() const
const TEARDROP_PARAMETERS & GetTeardropParams() const
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
virtual std::optional< int > GetLocalClearance() const
Return any local clearances set in the "classic" (ie: pre-rule) system.
void SetTeardropBestWidthRatio(double aRatio)
wxString GetNetname() const
void SetTeardropMaxTrackWidth(double aRatio)
bool GetLocalRatsnestVisible() const
int GetTeardropMaxLength() const
void SetLocalRatsnestVisible(bool aVisible)
void SetNetCode(int aNetCode)
double GetTeardropMaxTrackWidth() const
static bool ClassOf(const EDA_ITEM *aItem)
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
bool GetTeardropsEnabled() const
TEARDROP_PARAMETERS m_teardropParams
Not all BOARD_CONNECTED_ITEMs support teardrops, but we want those that do to share a single section ...
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
wxString GetNetClassVariableSubstitutionName() const
bool GetTeardropCurved() const
void SetTeardropAllowSpanTwoTracks(bool aAllow)
const wxString & GetDisplayNetname() const
const wxString & GetShortNetname() const
void SetNet(NETINFO_ITEM *aNetInfo)
Set a NET_INFO object for the item.
virtual std::optional< int > GetLocalClearance(wxString *aSource) const
Return any local clearances set in the "classic" (ie: pre-rule) system.
bool IsConnected() const override
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
double GetTeardropBestWidthRatio() const
wxString GetNetClassName() const
Returns the name of the effective netclass.
void SetTeardropCurved(bool aCurve)
NETINFO_ITEM * m_netinfo
Store all information about the net that item belongs to.
virtual int GetOwnClearance(PCB_LAYER_ID aLayer, wxString *aSource=nullptr) const
Return an item's "own" clearance in internal units.
void SetTeardropMaxWidth(int aMaxWidth)
int GetTeardropMaxWidth() const
void SetTeardropPreferZoneConnections(bool aPrefer)
void SetTeardropBestLengthRatio(double aRatio)
void SetTeardropMaxLength(int aMaxLength)
bool GetTeardropAllowSpanTwoTracks() const
TEARDROP_PARAMETERS & GetTeardropParams()
bool m_localRatsnestVisible
void SetTeardropsEnabled(bool aEnable)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
A collection of nets and the parameters used to route or test these nets.
Handle the data for a net.
TEARDROP_PARAMETARS is a helper class to handle parameters needed to build teardrops for a board thes...
int m_CurveSegCount
True if the teardrop should be curved.
double m_BestWidthRatio
The height of a teardrop as ratio between height and size of pad/via.
int m_TdMaxLen
max allowed length for teardrops in IU. <= 0 to disable
bool m_AllowUseTwoTracks
True to create teardrops using 2 track segments if the first in too small.
int m_TdMaxWidth
max allowed height for teardrops in IU. <= 0 to disable
double m_BestLengthRatio
The length of a teardrop as ratio between length and size of pad/via.
double m_WidthtoSizeFilterRatio
The ratio (H/D) between the via/pad size and the track width max value to create a teardrop 1....
bool m_TdOnPadsInZones
A filter to exclude pads inside zone fills.
bool m_Enabled
Flag to enable teardrops.
PCB_LAYER_ID
A quick note on layer IDs:
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)