KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PNS::VVIA Class Reference

#include <pns_via.h>

Inheritance diagram for PNS::VVIA:
PNS::VIA PNS::LINKED_ITEM PNS::ITEM PNS::OWNABLE_ITEM PNS::ITEM_OWNER

Public Types

enum  PnsKind {
  SOLID_T = 1 , LINE_T = 2 , JOINT_T = 4 , SEGMENT_T = 8 ,
  ARC_T = 16 , VIA_T = 32 , DIFF_PAIR_T = 64 , HOLE_T = 128 ,
  ANY_T = 0xffff
}
 < Supported item types More...
 

Public Member Functions

 VVIA (const VECTOR2I &aPos, int aLayer, int aDiameter, NET_HANDLE aNet)
 
bool HasHole () const override
 
const VECTOR2IPos () const
 
void SetPos (const VECTOR2I &aPos)
 
VIATYPE ViaType () const
 
void SetViaType (VIATYPE aViaType)
 
int Diameter () const
 
void SetDiameter (int aDiameter)
 
int Drill () const
 
void SetDrill (int aDrill)
 
bool IsFree () const
 
void SetIsFree (bool aIsFree)
 
bool PushoutForce (NODE *aNode, const VECTOR2I &aDirection, VECTOR2I &aForce, int aCollisionMask=ITEM::ANY_T, int aMaxIterations=10)
 
bool PushoutForce (NODE *aNode, const ITEM *aOther, VECTOR2I &aForce)
 
const SHAPEShape () const override
 Return the geometrical shape of the item. More...
 
VIAClone () const override
 Return a deep copy of the item. More...
 
const SHAPE_LINE_CHAIN Hull (int aClearance=0, int aWalkaroundThickness=0, int aLayer=-1) const override
 
virtual VECTOR2I Anchor (int n) const override
 
virtual int AnchorCount () const override
 
OPT_BOX2I ChangedArea (const VIA *aOther) const
 
const VIA_HANDLE MakeHandle () const
 
virtual void SetHole (HOLE *aHole) override
 
virtual HOLEHole () const override
 
virtual const std::string Format () const override
 
virtual void SetWidth (int aWidth)
 
virtual int Width () const
 
PnsKind Kind () const
 Return the type (kind) of the item. More...
 
bool OfKind (int aKindMask) const
 
std::string KindStr () const
 
void SetParent (BOARD_ITEM *aParent)
 
BOARD_ITEMParent () const
 
virtual BOARD_ITEMBoardItem () const
 
void SetNet (NET_HANDLE aNet)
 
virtual NET_HANDLE 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. More...
 
bool Collide (const ITEM *aHead, const NODE *aNode, COLLISION_SEARCH_CONTEXT *aCtx=nullptr) const
 Check for a collision (clearance violation) with between us and item aOther. More...
 
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
 
bool IsLocked () const
 
void SetRoutable (bool aRoutable)
 
bool IsRoutable () const
 
void SetIsFreePad (bool aIsFreePad=true)
 
bool IsFreePad () const
 
virtual ITEMParentPadVia () const
 
bool IsVirtual () const
 
void SetIsCompoundShapePrimitive ()
 
bool IsCompoundShapePrimitive () const
 
virtual const NODEOwningNode () const
 
const ITEM_OWNEROwner () const
 Return the owner of this item, or NULL if there's none. More...
 
void SetOwner (const ITEM_OWNER *aOwner)
 Set the node that owns this item. More...
 
bool BelongsTo (const ITEM_OWNER *aNode) const
 

Static Public Member Functions

static bool ClassOf (const ITEM *aItem)
 

Protected Attributes

PnsKind m_kind
 
BOARD_ITEMm_parent
 
LAYER_RANGE m_layers
 
bool m_movable
 
NET_HANDLE m_net
 
int m_marker
 
int m_rank
 
bool m_routable
 
bool m_isVirtual
 
bool m_isFreePad
 
bool m_isCompoundShapePrimitive
 
const ITEM_OWNERm_owner
 

Private Member Functions

bool collideSimple (const ITEM *aHead, const NODE *aNode, COLLISION_SEARCH_CONTEXT *aCtx) const
 

Private Attributes

int m_diameter
 
int m_drill
 
VECTOR2I m_pos
 
SHAPE_CIRCLE m_shape
 
VIATYPE m_viaType
 
bool m_isFree
 
HOLEm_hole
 

Detailed Description

Definition at line 217 of file pns_via.h.

Member Enumeration Documentation

◆ PnsKind

enum PNS::ITEM::PnsKind
inherited

< Supported item types

Enumerator
SOLID_T 
LINE_T 
JOINT_T 
SEGMENT_T 
ARC_T 
VIA_T 
DIFF_PAIR_T 
HOLE_T 
ANY_T 

Definition at line 100 of file pns_item.h.

Constructor & Destructor Documentation

◆ VVIA()

PNS::VVIA::VVIA ( const VECTOR2I aPos,
int  aLayer,
int  aDiameter,
NET_HANDLE  aNet 
)
inline

Definition at line 220 of file pns_via.h.

References PNS::ITEM::m_isVirtual.

Member Function Documentation

◆ Anchor()

virtual VECTOR2I PNS::VIA::Anchor ( int  n) const
inlineoverridevirtualinherited

Reimplemented from PNS::ITEM.

Definition at line 175 of file pns_via.h.

References PNS::VIA::m_pos.

◆ AnchorCount()

virtual int PNS::VIA::AnchorCount ( ) const
inlineoverridevirtualinherited

Reimplemented from PNS::ITEM.

Definition at line 180 of file pns_via.h.

◆ BelongsTo()

bool PNS::OWNABLE_ITEM::BelongsTo ( const ITEM_OWNER aNode) const
inlineinherited

◆ BoardItem()

virtual BOARD_ITEM * PNS::ITEM::BoardItem ( ) const
inlinevirtualinherited

◆ ChangedArea()

OPT_BOX2I PNS::VIA::ChangedArea ( const VIA aOther) const
inherited

Definition at line 175 of file pns_via.cpp.

References SHAPE::BBox(), BOX2< Vec >::Merge(), PNS::VIA::Pos(), and PNS::VIA::Shape().

Referenced by PNS::ChangedArea().

◆ ClassOf()

static bool PNS::VIA::ClassOf ( const ITEM aItem)
inlinestaticinherited

Definition at line 123 of file pns_via.h.

References PNS::ITEM::Kind(), and PNS::ITEM::VIA_T.

◆ Clone()

◆ Collide()

bool PNS::ITEM::Collide ( const ITEM aHead,
const NODE aNode,
COLLISION_SEARCH_CONTEXT aCtx = nullptr 
) const
inherited

Check for a collision (clearance violation) with between us and item aOther.

Collision checking takes all PCB stuff into account (layers, nets, DRC rules). Optionally returns a minimum translation vector for force propagation algorithm.

Parameters
aOtheris the item to check collision against.
Returns
true, if a collision was found.

Definition at line 269 of file pns_item.cpp.

References PNS::ITEM::collideSimple().

Referenced by PNS::SHOVE::fixupViaCollisions(), PNS::SHOVE::onCollidingSolid(), PNS::NODE::DEFAULT_OBSTACLE_VISITOR::operator()(), PNS::OPTIMIZER::CACHE_VISITOR::operator()(), PNS::SHOVE::shoveLineFromLoneVia(), PNS::SHOVE::shoveLineToHullSet(), PNS::COMPONENT_DRAGGER::Start(), and PNS::verifyDpBypass().

◆ collideSimple()

◆ Diameter()

◆ Drill()

int PNS::VIA::Drill ( ) const
inlineinherited

Definition at line 150 of file pns_via.h.

References PNS::VIA::m_drill.

Referenced by comparePnsItems(), and PNS::shouldWeConsiderHoleCollisions().

◆ Format()

const std::string PNS::VIA::Format ( ) const
overridevirtualinherited

Reimplemented from PNS::ITEM.

Definition at line 199 of file pns_via.cpp.

References PNS::ITEM::Format(), SHAPE_CIRCLE::Format(), PNS::VIA::m_drill, and PNS::VIA::m_shape.

◆ HasHole()

bool PNS::VVIA::HasHole ( ) const
inlineoverridevirtual

Reimplemented from PNS::VIA.

Definition at line 226 of file pns_via.h.

◆ Hole()

virtual HOLE * PNS::VIA::Hole ( ) const
inlineoverridevirtualinherited

Reimplemented from PNS::ITEM.

Definition at line 202 of file pns_via.h.

References PNS::VIA::m_hole.

Referenced by PNS::NODE::addVia(), PNS::DIFF_PAIR::AppendVias(), and PNS::NODE::Remove().

◆ Hull()

const SHAPE_LINE_CHAIN PNS::VIA::Hull ( int  aClearance = 0,
int  aWalkaroundThickness = 0,
int  aLayer = -1 
) const
overridevirtualinherited

◆ IsCompoundShapePrimitive()

bool PNS::ITEM::IsCompoundShapePrimitive ( ) const
inlineinherited

Definition at line 269 of file pns_item.h.

References PNS::ITEM::m_isCompoundShapePrimitive.

◆ IsFree()

bool PNS::VIA::IsFree ( ) const
inlineinherited

Definition at line 160 of file pns_via.h.

References PNS::VIA::m_isFree.

◆ IsFreePad()

bool PNS::ITEM::IsFreePad ( ) const
inlineinherited

Definition at line 256 of file pns_item.h.

References PNS::ITEM::m_isFreePad, and PNS::ITEM::ParentPadVia().

Referenced by PNS::ITEM::collideSimple().

◆ IsLocked()

bool PNS::ITEM::IsLocked ( ) const
inlineinherited

◆ IsRoutable()

bool PNS::ITEM::IsRoutable ( ) const
inlineinherited

Definition at line 252 of file pns_item.h.

References PNS::ITEM::m_routable.

Referenced by PNS::NODE::addSolid(), and PNS::NODE::removeSolidIndex().

◆ IsVirtual()

bool PNS::ITEM::IsVirtual ( ) const
inlineinherited

◆ Kind()

◆ KindStr()

std::string PNS::ITEM::KindStr ( ) const
inherited

◆ Layer()

◆ Layers()

const LAYER_RANGE & PNS::ITEM::Layers ( ) const
inlineinherited

Definition at line 195 of file pns_item.h.

References PNS::ITEM::m_layers.

Referenced by PNS::INDEX::Add(), PNS::NODE::Add(), PNS::NODE::addArc(), PNS::NODE::addSegment(), PNS::NODE::addSolid(), PNS::NODE::addVia(), PNS::ARC::ARC(), PNS::TOPOLOGY::AssembleDiffPair(), PNS::NODE::AssembleLine(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), PNS_PCBNEW_RULE_RESOLVER::Clearance(), MOCK_RULE_RESOLVER::Clearance(), PNS::HOLE::Clone(), PNS::VIA::Clone(), PNS::ITEM::collideSimple(), comparePnsItems(), PNS_KICAD_IFACE::createBoardItem(), PNS::DP_MEANDER_PLACER::CurrentLayer(), PNS::MEANDER_PLACER::CurrentLayer(), PNS::DIFF_PAIR_PLACER::FindDpPrimitivePair(), PNS::NODE::FindJoint(), PNS::NODE::FindLinesBetweenJoints(), PNS::NODE::findRedundantArc(), PNS::NODE::findRedundantSegment(), PNS::NODE::FixupVirtualVias(), PNS::ROUTER::getNearestRatnestAnchor(), ROUTER_TOOL::getStartLayer(), PNS_KICAD_IFACE_BASE::IsFlashedOnLayer(), PNS::ITEM::Layer(), PNS::ITEM::LayersOverlap(), PNS::LINE::LINE(), PNS::NODE::LockJoint(), PNS::VIA::MakeHandle(), PNS::ROUTER::markViolations(), PNS::TOPOLOGY::NearestUnconnectedAnchorPoint(), PNS::SHOVE::onCollidingSolid(), PNS::VIA::operator=(), PNS::TOOL_BASE::pickSingleItem(), PNS::INDEX::Query(), PNS::INDEX::Remove(), PNS::NODE::removeArcIndex(), PNS::NODE::removeSegmentIndex(), PNS::NODE::removeSolidIndex(), PNS::NODE::removeViaIndex(), PNS_LOG_PLAYER::ReplayLog(), PNS::SEGMENT::SEGMENT(), PNS::LINE_PLACER::SetLayer(), PNS::COMPONENT_DRAGGER::Start(), ROUTER_PREVIEW_ITEM::Update(), PNS::TOOL_BASE::updateEndItem(), PNS::DIFF_PAIR::updateLine(), PNS::TOOL_BASE::updateStartItem(), and PNS::VIA::VIA().

◆ LayersOverlap()

bool PNS::ITEM::LayersOverlap ( const ITEM aOther) const
inlineinherited

Return true if the set of layers spanned by aOther overlaps our layers.

Definition at line 204 of file pns_item.h.

References PNS::ITEM::Layers(), and LAYER_RANGE::Overlaps().

Referenced by PNS::MEANDER_PLACER_BASE::lineLength(), PNS::SHOVE::onCollidingArc(), PNS::SHOVE::onCollidingSegment(), PNS::NODE::rebuildJoint(), and PNS::SHOVE::ShoveObstacleLine().

◆ MakeHandle()

◆ Mark()

virtual void PNS::ITEM::Mark ( int  aMarker) const
inlinevirtualinherited

Reimplemented in PNS::LINE.

Definition at line 229 of file pns_item.h.

References PNS::ITEM::m_marker.

Referenced by PNS::SHOVE::ShoveDraggingVia().

◆ Marker()

virtual int PNS::ITEM::Marker ( ) const
inlinevirtualinherited

◆ Net()

virtual NET_HANDLE PNS::ITEM::Net ( ) const
inlinevirtualinherited

Reimplemented in PNS::HOLE, and PNS::JOINT.

Definition at line 193 of file pns_item.h.

References PNS::ITEM::m_net.

Referenced by PNS::INDEX::Add(), PNS::NODE::Add(), PNS::NODE::addArc(), PNS::NODE::addSegment(), PNS::NODE::addSolid(), PNS::NODE::addVia(), PNS::ARC::ARC(), PNS::TOPOLOGY::AssembleCluster(), PNS::TOPOLOGY::AssembleDiffPair(), PNS::NODE::AssembleLine(), PNS::LINE_PLACER::buildInitialLine(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), PNS::VIA::Clone(), PNS::ITEM::collideSimple(), comparePnsItems(), PNS_KICAD_IFACE::createBoardItem(), PNS::DRAGGER::CurrentNets(), PNS::MEANDER_PLACER::CurrentNets(), PNS::DIFF_PAIR::DIFF_PAIR(), PNS_PCBNEW_RULE_RESOLVER::DpNetPair(), PNS::OPTIMIZER::fanoutCleanup(), PNS::DIFF_PAIR_PLACER::FindDpPrimitivePair(), PNS::NODE::FindJoint(), PNS::NODE::findRedundantArc(), PNS::NODE::findRedundantSegment(), PNS::LINE_PLACER::FixRoute(), PNS::ITEM::Format(), PNS_PCBNEW_RULE_RESOLVER::getBoardItem(), PNS_KICAD_IFACE_BASE::ImportSizes(), ROUTER_TOOL::InlineDrag(), PNS_PCBNEW_RULE_RESOLVER::IsNetTieExclusion(), PNS::ROUTER::isStartingPointRoutable(), PNS::LINE::LINE(), PNS::NODE::LockJoint(), PNS::VIA::MakeHandle(), PNS::LINE_PLACER::Move(), PNS::MEANDER_SKEW_PLACER::Move(), PNS::HOLE::Net(), PNS::VIA::operator=(), PNS::MEANDER_SKEW_PLACER::origPathLength(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::prepareInteractive(), PNS::NODE::rebuildJoint(), PNS::INDEX::Remove(), PNS::NODE::removeArcIndex(), PNS::NODE::removeSegmentIndex(), PNS::NODE::removeSolidIndex(), PNS::NODE::removeViaIndex(), PNS::OPTIMIZER::runSmartPads(), PNS::SEGMENT::SEGMENT(), PNS::shouldWeConsiderHoleCollisions(), PNS::SHOVE::ShoveObstacleLine(), PNS::DIFF_PAIR_PLACER::Start(), PNS::LINE_PLACER::Start(), PNS::MEANDER_SKEW_PLACER::Start(), PCB_TUNING_PATTERN::Update(), and PNS::VIA::VIA().

◆ OfKind()

◆ Owner()

const ITEM_OWNER * PNS::OWNABLE_ITEM::Owner ( ) const
inlineinherited

◆ OwningNode()

const NODE * PNS::ITEM::OwningNode ( ) const
virtualinherited

Definition at line 317 of file pns_item.cpp.

References PNS::OWNABLE_ITEM::Owner(), and PNS::ITEM::ParentPadVia().

◆ Parent()

◆ ParentPadVia()

virtual ITEM * PNS::ITEM::ParentPadVia ( ) const
inlinevirtualinherited

Reimplemented in PNS::HOLE.

Definition at line 261 of file pns_item.h.

Referenced by PNS::ITEM::IsFreePad(), PNS_PCBNEW_RULE_RESOLVER::IsNonPlatedSlot(), and PNS::ITEM::OwningNode().

◆ Pos()

◆ PushoutForce() [1/2]

bool PNS::VIA::PushoutForce ( NODE aNode,
const ITEM aOther,
VECTOR2I aForce 
)
inherited

◆ PushoutForce() [2/2]

◆ Rank()

virtual int PNS::ITEM::Rank ( ) const
inlinevirtualinherited

Reimplemented in PNS::LINE.

Definition at line 234 of file pns_item.h.

References PNS::ITEM::m_rank.

Referenced by PNS::ARC::ARC(), PNS::LINE::LINE(), PNS::SHOVE::onCollidingVia(), and PNS::SHOVE::shoveIteration().

◆ SetDiameter()

◆ SetDrill()

void PNS::VIA::SetDrill ( int  aDrill)
inlineinherited

◆ SetHole()

virtual void PNS::VIA::SetHole ( HOLE aHole)
inlineoverridevirtualinherited

◆ SetIsCompoundShapePrimitive()

void PNS::ITEM::SetIsCompoundShapePrimitive ( )
inlineinherited

Definition at line 268 of file pns_item.h.

References PNS::ITEM::m_isCompoundShapePrimitive.

◆ SetIsFree()

void PNS::VIA::SetIsFree ( bool  aIsFree)
inlineinherited

Definition at line 161 of file pns_via.h.

References PNS::VIA::m_isFree.

◆ SetIsFreePad()

void PNS::ITEM::SetIsFreePad ( bool  aIsFreePad = true)
inlineinherited

Definition at line 254 of file pns_item.h.

References PNS::ITEM::m_isFreePad.

◆ SetLayer()

◆ SetLayers()

◆ SetNet()

◆ SetOwner()

◆ SetParent()

void PNS::ITEM::SetParent ( BOARD_ITEM aParent)
inlineinherited

◆ SetPos()

◆ SetRank()

virtual void PNS::ITEM::SetRank ( int  aRank)
inlinevirtualinherited

Reimplemented in PNS::LINE.

Definition at line 233 of file pns_item.h.

References PNS::ITEM::m_rank.

Referenced by PNS::NODE::Commit(), and PNS::SHOVE::ShoveDraggingVia().

◆ SetRoutable()

void PNS::ITEM::SetRoutable ( bool  aRoutable)
inlineinherited

Definition at line 251 of file pns_item.h.

References PNS::ITEM::m_routable.

◆ SetViaType()

void PNS::VIA::SetViaType ( VIATYPE  aViaType)
inlineinherited

Definition at line 140 of file pns_via.h.

References PNS::VIA::m_viaType.

◆ SetWidth()

virtual void PNS::LINKED_ITEM::SetWidth ( int  aWidth)
inlinevirtualinherited

Reimplemented in PNS::ARC, and PNS::SEGMENT.

Definition at line 36 of file pns_linked_item.h.

◆ Shape()

const SHAPE * PNS::VIA::Shape ( ) const
inlineoverridevirtualinherited

Return the geometrical shape of the item.

Used for collision detection and spatial indexing.

Reimplemented from PNS::ITEM.

Definition at line 168 of file pns_via.h.

References PNS::VIA::m_shape.

Referenced by PNS::VIA::ChangedArea(), PNS::SHOVE::onCollidingVia(), PNS::DIFF_PAIR_PLACER::propagateDpHeadForces(), and PNS::VIA::PushoutForce().

◆ Unmark()

virtual void PNS::ITEM::Unmark ( int  aMarker = -1) const
inlinevirtualinherited

Reimplemented in PNS::LINE.

Definition at line 230 of file pns_item.h.

References PNS::ITEM::m_marker.

Referenced by PNS::NODE::Commit(), and PNS::DRAGGER::Start().

◆ ViaType()

VIATYPE PNS::VIA::ViaType ( ) const
inlineinherited

Definition at line 139 of file pns_via.h.

References PNS::VIA::m_viaType.

◆ Width()

virtual int PNS::LINKED_ITEM::Width ( ) const
inlinevirtualinherited

Member Data Documentation

◆ m_diameter

int PNS::VIA::m_diameter
privateinherited

◆ m_drill

int PNS::VIA::m_drill
privateinherited

◆ m_hole

HOLE* PNS::VIA::m_hole
privateinherited

◆ m_isCompoundShapePrimitive

bool PNS::ITEM::m_isCompoundShapePrimitive
protectedinherited

◆ m_isFree

bool PNS::VIA::m_isFree
privateinherited

◆ m_isFreePad

bool PNS::ITEM::m_isFreePad
protectedinherited

Definition at line 295 of file pns_item.h.

Referenced by PNS::ITEM::IsFreePad(), PNS::ITEM::ITEM(), and PNS::ITEM::SetIsFreePad().

◆ m_isVirtual

bool PNS::ITEM::m_isVirtual
protectedinherited

◆ m_kind

PnsKind PNS::ITEM::m_kind
protectedinherited

◆ m_layers

◆ m_marker

◆ m_movable

bool PNS::ITEM::m_movable
protectedinherited

◆ m_net

◆ m_owner

const ITEM_OWNER* PNS::OWNABLE_ITEM::m_owner
protectedinherited

◆ m_parent

◆ m_pos

VECTOR2I PNS::VIA::m_pos
privateinherited

◆ m_rank

◆ m_routable

bool PNS::ITEM::m_routable
protectedinherited

Definition at line 293 of file pns_item.h.

Referenced by PNS::ITEM::IsRoutable(), PNS::ITEM::ITEM(), and PNS::ITEM::SetRoutable().

◆ m_shape

◆ m_viaType

VIATYPE PNS::VIA::m_viaType
privateinherited

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