Horizon
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
PNS::JOINT Class Reference

A 2D point on a given set of layers and belonging to a certain net, that links together a number of board items. More...

#include <pns_joint.h>

Inheritance diagram for PNS::JOINT:
PNS::ITEM

Classes

struct  HASH_TAG
 
struct  JOINT_TAG_HASH
 

Public Types

typedef ITEM_SET::ENTRIES LINKED_ITEMS
 Joints are hashed by their position, layers and net.
 
- Public Types inherited from PNS::ITEM
enum  PnsKind {
  SOLID_T = 1 , LINE_T = 2 , JOINT_T = 4 , SEGMENT_T = 8 ,
  ARC_T = 16 , VIA_T = 32 , DIFF_PAIR_T = 64 , ANY_T = 0xff
}
 

Public Member Functions

 JOINT (const VECTOR2I &aPos, const LAYER_RANGE &aLayers, int aNet=-1)
 
 JOINT (const JOINT &aB)
 
ITEMClone () const override
 Return a deep copy of the item.
 
bool IsLineCorner (bool aAllowLockedSegs=false) const
 Checks if a joint connects two segments of the same net, layer, and width.
 
bool IsNonFanoutVia () const
 
bool IsStitchingVia () const
 
bool IsTraceWidthChange () const
 Link the joint to a given board item (when it's added to the NODE).
 
void Link (ITEM *aItem)
 Unlink a given board item from the joint (upon its removal from a NODE)
 
bool Unlink (ITEM *aItem)
 For trivial joints, return the segment adjacent to (aCurrent).
 
LINKED_ITEMNextSegment (ITEM *aCurrent, bool aAllowLockedSegs=false) const
 
VIAVia ()
 
const HASH_TAGTag () const
 trivial accessors
 
const VECTOR2IPos () const
 
int Net () const
 
const LINKED_ITEMSLinkList () const
 
const ITEM_SETCLinks () const
 
ITEM_SETLinks ()
 
int LinkCount (int aMask=-1) const
 
void Dump () const
 
bool operator== (const JOINT &rhs) const
 
void Merge (const JOINT &aJoint)
 
bool Overlaps (const JOINT &rhs) const
 
void Lock (bool aLock=true)
 
bool IsLocked () const
 
- Public Member Functions inherited from PNS::ITEM
 ITEM (PnsKind aKind)
 
 ITEM (const ITEM &aOther)
 
virtual const SHAPE_LINE_CHAIN Hull (int aClearance=0, int aWalkaroundThickness=0, int aLayer=-1) const
 
virtual const SHAPE_LINE_CHAIN HoleHull (int aClearance, int aWalkaroundThickness, int aLayer) const
 
PnsKind Kind () const
 Return the type (kind) of the item.
 
bool OfKind (int aKindMask) const
 Return true if the item's type matches the mask aKindMask.
 
std::string KindStr () const
 Returns the kind of the item, as string.
 
void SetParent (const PNS_HORIZON_PARENT_ITEM *aParent)
 
const PNS_HORIZON_PARENT_ITEMParent () const
 
void SetNet (int aNet)
 
int Net () const
 
const LAYER_RANGELayers () const
 
void SetLayers (const LAYER_RANGE &aLayers)
 
void SetLayer (int aLayer)
 
virtual int Layer () const
 
bool LayersOverlap (const ITEM *aOther) const
 Return true if the set of layers spanned by aOther overlaps our layers.
 
NODEOwner () const
 Return the owner of this item, or NULL if there's none.
 
void SetOwner (NODE *aOwner)
 Set the node that owns this item.
 
bool BelongsTo (NODE *aNode) const
 
bool Collide (const ITEM *aOther, const NODE *aNode, bool aDifferentNetsOnly=true) const
 Check for a collision (clearance violation) with between us and item aOther.
 
virtual const SHAPEShape () const
 Return the geometrical shape of the item.
 
virtual const SHAPEHole () const
 
virtual void Mark (int aMarker) const
 
virtual void Unmark (int aMarker=-1) const
 
virtual int Marker () const
 
virtual void SetRank (int aRank)
 
virtual int Rank () const
 
virtual VECTOR2I Anchor (int n) const
 
virtual int AnchorCount () const
 
bool IsLocked () const
 
void SetRoutable (bool aRoutable)
 
bool IsRoutable () const
 
bool IsVirtual () const
 
void SetIsCompoundShapePrimitive ()
 
bool IsCompoundShapePrimitive () const
 

Additional Inherited Members

- Static Public Attributes inherited from PNS::ITEM
static const int UnusedNet = INT_MAX
 Supported item types.
 
- Protected Attributes inherited from PNS::ITEM
PnsKind m_kind
 
const PNS_HORIZON_PARENT_ITEMm_parent
 
NODEm_owner
 
LAYER_RANGE m_layers
 
bool m_movable
 
int m_net
 
int m_marker
 
int m_rank
 
bool m_routable
 
bool m_isVirtual
 
bool m_isCompoundShapePrimitive
 

Detailed Description

A 2D point on a given set of layers and belonging to a certain net, that links together a number of board items.

A hash table of joints is used by the router to follow connectivity between the items.

Member Typedef Documentation

◆ LINKED_ITEMS

typedef ITEM_SET::ENTRIES PNS::JOINT::LINKED_ITEMS

Joints are hashed by their position, layers and net.

Linked items are, obviously, not hashed.

Member Function Documentation

◆ Clone()

ITEM * PNS::JOINT::Clone ( ) const
inlineoverridevirtual

Return a deep copy of the item.

Implements PNS::ITEM.

◆ IsLineCorner()

bool PNS::JOINT::IsLineCorner ( bool  aAllowLockedSegs = false) const
inline

Checks if a joint connects two segments of the same net, layer, and width.

Parameters
aAllowLockedSegswill consider joints between locked and unlocked segments as trivial
Returns
true if the joint is a trivial line corner

◆ Link()

void PNS::JOINT::Link ( ITEM aItem)
inline

Unlink a given board item from the joint (upon its removal from a NODE)

Returns
true if the joint became dangling after unlinking.

◆ Unlink()

bool PNS::JOINT::Unlink ( ITEM aItem)
inline

For trivial joints, return the segment adjacent to (aCurrent).

For non-trival ones, return NULL, indicating the end of line.


The documentation for this class was generated from the following files: