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

Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads, junctions between multiple traces or two traces different widths and combinations of these). More...

#include <pns_line.h>

Inheritance diagram for PNS::LINE:
PNS::LINK_HOLDER 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

 LINE ()
 Makes an empty line.
 
 LINE (const LINE &aOther)
 
 LINE (const LINE &aBase, const SHAPE_LINE_CHAIN &aLine)
 Copy properties (net, layers, etc.) from a base line and replaces the shape by another.
 
 LINE (const VIA &aVia)
 Construct a LINE for a lone VIA (ie a stitching via).
 
 ~LINE ()
 
virtual LINEClone () const override
 Return a deep copy of the item.
 
LINEoperator= (const LINE &aOther)
 
bool IsLinkedChecked () const
 Assign a shape to the line (a polyline/line chain).
 
void SetShape (const SHAPE_LINE_CHAIN &aLine)
 Return the shape of the line.
 
const SHAPEShape () const override
 Modifiable accessor to the underlying shape.
 
SHAPE_LINE_CHAINLine ()
 
const SHAPE_LINE_CHAINCLine () const
 
int SegmentCount () const
 
int PointCount () const
 
int ArcCount () const
 
int ShapeCount () const
 Return the aIdx-th point of the line.
 
const VECTOR2ICPoint (int aIdx) const
 
const SEG CSegment (int aIdx) const
 Set line width.
 
void SetWidth (int aWidth)
 Return line width.
 
int Width () const
 Return true if the line is geometrically identical as line aOther.
 
bool CompareGeometry (const LINE &aOther)
 Reverse the point/vertex order.
 
void Reverse ()
 Clip the line to the nearest obstacle, traversing from the line's start vertex (0).
 
const LINE ClipToNearestObstacle (NODE *aNode) const
 Clip the line to a given range of vertices.
 
void ClipVertexRange (int aStart, int aEnd)
 Return the number of corners of angles specified by mask aAngles.
 
int CountCorners (int aAngles) const
 
bool Walkaround (SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN &aPre, SHAPE_LINE_CHAIN &aWalk, SHAPE_LINE_CHAIN &aPost, bool aCw) const
 Calculate a line tightly wrapping a convex hull of an obstacle object (aObstacle).
 
bool Walkaround (const SHAPE_LINE_CHAIN &aObstacle, SHAPE_LINE_CHAIN &aPath, bool aCw) const
 Print out all linked segments.
 
void ShowLinks () const
 
bool EndsWithVia () const
 
void AppendVia (const VIA &aVia)
 
void RemoveVia ()
 
VIAVia ()
 
const VIAVia () const
 
void SetViaDiameter (int aDiameter)
 
void SetViaDrill (int aDrill)
 
virtual void Mark (int aMarker) const override
 
virtual void Unmark (int aMarker=-1) const override
 
virtual int Marker () const override
 
void SetBlockingObstacle (ITEM *aObstacle)
 
ITEMGetBlockingObstacle () const
 
void DragSegment (const VECTOR2I &aP, int aIndex, bool aFreeAngle=false)
 
void DragCorner (const VECTOR2I &aP, int aIndex, bool aFreeAngle=false)
 
void SetRank (int aRank) override
 
int Rank () const override
 
bool HasLoops () const
 
bool HasLockedSegments () const
 
void Clear ()
 
OPT_BOX2I ChangedArea (const LINE *aOther) const
 
void SetSnapThreshhold (int aThreshhold)
 
int GetSnapThreshhold () const
 
void Link (LINKED_ITEM *aLink)
 Return the list of links from the owning node that constitute this line (or NULL if the line is not linked).
 
std::vector< LINKED_ITEM * > & Links ()
 
const std::vector< LINKED_ITEM * > & Links () const
 
bool IsLinked () const
 Check if the segment aLink is a part of the line.
 
bool ContainsLink (const LINKED_ITEM *aItem) const
 
LINKED_ITEMGetLink (int aIndex) const
 Erase the linking information. Used to detach the line from the owning node.
 
virtual void ClearLinks ()
 Return the number of segments that were assembled together to form this line.
 
int LinkCount () const
 
virtual const SHAPE_LINE_CHAIN Hull (int aClearance=0, int aWalkaroundThickness=0, int aLayer=-1) const
 
PnsKind Kind () const
 Return the type (kind) of the item.
 
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.
 
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.
 
virtual VECTOR2I Anchor (int n) const
 
virtual int AnchorCount () 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 bool HasHole () const
 
virtual HOLEHole () const
 
virtual void SetHole (HOLE *aHole)
 
virtual const std::string Format () const
 
virtual const NODEOwningNode () const
 
const ITEM_OWNEROwner () const
 Return the owner of this item, or NULL if there's none.
 
void SetOwner (const ITEM_OWNER *aOwner)
 Set the node that owns this item.
 
bool BelongsTo (const ITEM_OWNER *aNode) const
 

Static Public Member Functions

static bool ClassOf (const ITEM *aItem)
 

Protected Member Functions

void copyLinks (const LINK_HOLDER *aParent)
 < Copy m_links from the line aParent.
 

Protected Attributes

std::vector< LINKED_ITEM * > m_links
 
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

void dragSegment45 (const VECTOR2I &aP, int aIndex)
 
void dragCorner45 (const VECTOR2I &aP, int aIndex)
 
void dragSegmentFree (const VECTOR2I &aP, int aIndex)
 
void dragCornerFree (const VECTOR2I &aP, int aIndex)
 
VECTOR2I snapToNeighbourSegments (const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex) const
 
VECTOR2I snapDraggedCorner (const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex) const
 
bool collideSimple (const ITEM *aHead, const NODE *aNode, COLLISION_SEARCH_CONTEXT *aCtx) const
 

Private Attributes

SHAPE_LINE_CHAIN m_line
 The actual shape of the line.
 
int m_width
 Our width.
 
int m_snapThreshhold
 Width to smooth out jagged segments.
 
VIAm_via
 
ITEMm_blockingObstacle
 For mark obstacle mode.
 

Detailed Description

Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads, junctions between multiple traces or two traces different widths and combinations of these).

PNS_LINEs are NOT stored in the model (NODE). Instead, they are assembled on-the-fly, based on a via/pad/segment that belongs to/starts/ends them.

PNS_LINEs can be either loose (consisting of segments that do not belong to any NODE) or owned (with segments taken from a NODE) - these are returned by NODE::AssembleLine and friends.

A LINE may have a VIA attached at its end (i.e. the last point) - this is used by via dragging/force propagation stuff.

Definition at line 60 of file pns_line.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

◆ LINE() [1/4]

PNS::LINE::LINE ( )
inline

Makes an empty line.

Definition at line 66 of file pns_line.h.

References m_snapThreshhold, m_via, and m_width.

Referenced by Clone().

◆ LINE() [2/4]

◆ LINE() [3/4]

PNS::LINE::LINE ( const LINE aBase,
const SHAPE_LINE_CHAIN aLine 
)
inline

Copy properties (net, layers, etc.) from a base line and replaces the shape by another.

Definition at line 80 of file pns_line.h.

References PNS::ITEM::m_layers, PNS::ITEM::m_net, and m_via.

◆ LINE() [4/4]

PNS::LINE::LINE ( const VIA aVia)
inline

◆ ~LINE()

PNS::LINE::~LINE ( )

Definition at line 65 of file pns_line.cpp.

References PNS::OWNABLE_ITEM::BelongsTo(), and m_via.

Member Function Documentation

◆ Anchor()

◆ AnchorCount()

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

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

Definition at line 241 of file pns_item.h.

Referenced by PNS::TOPOLOGY::AssembleDiffPair().

◆ AppendVia()

◆ ArcCount()

int PNS::LINE::ArcCount ( ) const
inline

Definition at line 140 of file pns_line.h.

References SHAPE_LINE_CHAIN::ArcCount(), and m_line.

Referenced by PNS::OPTIMIZER::Optimize().

◆ BelongsTo()

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

◆ BoardItem()

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

◆ ChangedArea()

◆ ClassOf()

static bool PNS::LINE::ClassOf ( const ITEM aItem)
inlinestatic

Definition at line 109 of file pns_line.h.

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

◆ Clear()

void PNS::LINE::Clear ( )

◆ ClearLinks()

◆ CLine()

const SHAPE_LINE_CHAIN & PNS::LINE::CLine ( ) const
inline

Definition at line 136 of file pns_line.h.

References m_line.

Referenced by PNS::COST_ESTIMATOR::Add(), PNS::TOPOLOGY::AssembleTuningPath(), PNS::DIFF_PAIR_PLACER::attemptWalk(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), PNS::NODE::CheckColliding(), PNS::SHOVE::checkShoveDirection(), PNS::COST_ESTIMATOR::CornerCost(), PNS::DIFF_PAIR::DIFF_PAIR(), PNS::MEANDER_PLACER::doMove(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dragViaMarkObstacles(), PNS::DRAGGER::dragViaWalkaround(), PNS::DRAGGER::dragWalkaround(), PNS::OPTIMIZER::fanoutCleanup(), PNS::NODE::FindLinesBetweenJoints(), PNS::LINE_PLACER::FixRoute(), PNS::TOPOLOGY::followTrivialPath(), getPNSLine(), PCB_TUNING_PATTERN::initBaseLine(), PNS::LINE_PLACER::Move(), PNS::NODE::NearestObstacle(), PNS::SHOVE::onCollidingArc(), PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::onReverseCollidingVia(), PNS::DRAGGER::optimizeAndUpdateDraggedLine(), PNS::LINE_PLACER::optimizeTailHeadTransition(), PNS::COST_ESTIMATOR::Remove(), PNS::LINE_PLACER::removeLoops(), PNS::COST_ESTIMATOR::Replace(), PNS_LOG_PLAYER::ReplayLog(), PNS::LINE_PLACER::rhWalkBase(), PNS::WALKAROUND::Route(), PNS::SHOVE::shoveLineToHullSet(), PNS::SHOVE::ShoveObstacleLine(), PNS::TOPOLOGY::SimplifyLine(), PNS::LINE_PLACER::simplifyNewLine(), PNS::WALKAROUND::singleStep(), PNS::OPTIMIZER::smartPadsSingle(), PNS::LINE_PLACER::splitHeadTail(), PNS::COMPONENT_DRAGGER::Start(), PNS::DRAGGER::startDragSegment(), PNS::Tighten(), PNS::LINE_PLACER::Trace(), PNS::DRAGGER::tryWalkaround(), PNS::LINE_PLACER::updatePStart(), and Walkaround().

◆ ClipToNearestObstacle()

◆ ClipVertexRange()

void PNS::LINE::ClipVertexRange ( int  aStart,
int  aEnd 
)

Return the number of corners of angles specified by mask aAngles.

We need to figure out which joints to keep after the clip operation, because arcs will have multiple vertices. It is assumed that anything calling this method will have determined the vertex range to clip based on joints, meaning we will never clip in the middle of an arc. Clipping in the middle of an arc would break this and various other things...

Definition at line 1094 of file pns_line.cpp.

References PNS::LINK_HOLDER::IsLinked(), m_line, PNS::LINK_HOLDER::m_links, SHAPE_LINE_CHAIN::NextShape(), SHAPE_LINE_CHAIN::PointCount(), and SHAPE_LINE_CHAIN::Slice().

Referenced by PNS::NODE::FindLinesBetweenJoints().

◆ Clone()

LINE * PNS::LINE::Clone ( ) const
overridevirtual

Return a deep copy of the item.

Implements PNS::ITEM.

Definition at line 101 of file pns_line.cpp.

References LINE().

Referenced by PNS::ITEM_SET::Add(), PNS::ITEM_SET::Prepend(), and PNS::SHOVE::replaceLine().

◆ 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 273 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()

◆ CompareGeometry()

bool PNS::LINE::CompareGeometry ( const LINE aOther)

Reverse the point/vertex order.

Definition at line 1037 of file pns_line.cpp.

References SHAPE_LINE_CHAIN::CompareGeometry(), and m_line.

◆ ContainsLink()

bool PNS::LINK_HOLDER::ContainsLink ( const LINKED_ITEM aItem) const
inlineinherited

◆ copyLinks()

void PNS::LINK_HOLDER::copyLinks ( const LINK_HOLDER aParent)
inlineprotectedinherited

< Copy m_links from the line aParent.

List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is not a part of any node.

Definition at line 96 of file pns_link_holder.h.

References PNS::LINK_HOLDER::m_links.

Referenced by LINE(), and operator=().

◆ CountCorners()

◆ CPoint()

◆ CSegment()

◆ DragCorner()

void PNS::LINE::DragCorner ( const VECTOR2I aP,
int  aIndex,
bool  aFreeAngle = false 
)

◆ dragCorner45()

◆ dragCornerFree()

◆ DragSegment()

void PNS::LINE::DragSegment ( const VECTOR2I aP,
int  aIndex,
bool  aFreeAngle = false 
)

◆ dragSegment45()

◆ dragSegmentFree()

void PNS::LINE::dragSegmentFree ( const VECTOR2I aP,
int  aIndex 
)
private

◆ EndsWithVia()

◆ Format()

◆ GetBlockingObstacle()

ITEM * PNS::LINE::GetBlockingObstacle ( ) const
inline

Definition at line 204 of file pns_line.h.

References m_blockingObstacle.

Referenced by PNS::ROUTER::markViolations().

◆ GetLink()

LINKED_ITEM * PNS::LINK_HOLDER::GetLink ( int  aIndex) const
inlineinherited

Erase the linking information. Used to detach the line from the owning node.

Definition at line 61 of file pns_link_holder.h.

References PNS::LINK_HOLDER::m_links.

Referenced by PNS::LINE_PLACER::removeLoops(), PNS::TOPOLOGY::SimplifyLine(), PNS::DP_MEANDER_PLACER::Start(), and PNS::MEANDER_SKEW_PLACER::Start().

◆ GetSnapThreshhold()

int PNS::LINE::GetSnapThreshhold ( ) const
inline

Definition at line 224 of file pns_line.h.

References m_snapThreshhold.

◆ HasHole()

virtual bool PNS::ITEM::HasHole ( ) const
inlinevirtualinherited

Reimplemented in PNS::SOLID, PNS::VIA, and PNS::VVIA.

Definition at line 271 of file pns_item.h.

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

◆ HasLockedSegments()

bool PNS::LINE::HasLockedSegments ( ) const

◆ HasLoops()

bool PNS::LINE::HasLoops ( ) const

Definition at line 1143 of file pns_line.cpp.

References CPoint(), and PointCount().

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

◆ Hole()

virtual HOLE * PNS::ITEM::Hole ( ) const
inlinevirtualinherited

◆ Hull()

virtual const SHAPE_LINE_CHAIN PNS::ITEM::Hull ( int  aClearance = 0,
int  aWalkaroundThickness = 0,
int  aLayer = -1 
) const
inlinevirtualinherited

Reimplemented in PNS::ARC, PNS::SEGMENT, PNS::HOLE, PNS::SOLID, and PNS::VIA.

Definition at line 157 of file pns_item.h.

◆ IsCompoundShapePrimitive()

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

Definition at line 269 of file pns_item.h.

References PNS::ITEM::m_isCompoundShapePrimitive.

◆ 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().

◆ IsLinked()

bool PNS::LINK_HOLDER::IsLinked ( ) const
inlineinherited

◆ IsLinkedChecked()

bool PNS::LINE::IsLinkedChecked ( ) const
inline

Assign a shape to the line (a polyline/line chain).

Definition at line 119 of file pns_line.h.

References PNS::LINK_HOLDER::IsLinked(), PNS::LINK_HOLDER::LinkCount(), and ShapeCount().

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

◆ 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(), 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().

◆ Line()

◆ Link()

void PNS::LINK_HOLDER::Link ( LINKED_ITEM aLink)
inlineinherited

Return the list of links from the owning node that constitute this line (or NULL if the line is not linked).

Definition at line 40 of file pns_link_holder.h.

References PNS::LINK_HOLDER::m_links.

Referenced by PNS::NODE::Add(), and PNS::NODE::AssembleLine().

◆ LinkCount()

int PNS::LINK_HOLDER::LinkCount ( ) const
inlineinherited

Definition at line 73 of file pns_link_holder.h.

References PNS::LINK_HOLDER::m_links.

Referenced by IsLinkedChecked(), and PNS::LINE_PLACER::removeLoops().

◆ Links() [1/2]

◆ Links() [2/2]

const std::vector< LINKED_ITEM * > & PNS::LINK_HOLDER::Links ( ) const
inlineinherited

Definition at line 48 of file pns_link_holder.h.

References PNS::LINK_HOLDER::m_links.

◆ Mark()

void PNS::LINE::Mark ( int  aMarker) const
overridevirtual

◆ Marker()

◆ 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(), 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()

◆ operator=()

◆ Owner()

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

◆ OwningNode()

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

Definition at line 321 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().

◆ PointCount()

◆ Rank()

◆ RemoveVia()

◆ Reverse()

void PNS::LINE::Reverse ( )

Clip the line to the nearest obstacle, traversing from the line's start vertex (0).

Returns the clipped line.

Definition at line 1043 of file pns_line.cpp.

References m_line, PNS::LINK_HOLDER::m_links, and SHAPE_LINE_CHAIN::Reverse().

Referenced by AppendVia(), PNS::DRAGGER::findViaFanoutByHandle(), and PNS::TOPOLOGY::followTrivialPath().

◆ SegmentCount()

◆ SetBlockingObstacle()

void PNS::LINE::SetBlockingObstacle ( ITEM aObstacle)
inline

Definition at line 203 of file pns_line.h.

References m_blockingObstacle.

Referenced by PNS::LINE_PLACER::rhMarkObstacles().

◆ SetHole()

virtual void PNS::ITEM::SetHole ( HOLE aHole)
inlinevirtualinherited

Reimplemented in PNS::SOLID, and PNS::VIA.

Definition at line 273 of file pns_item.h.

◆ SetIsCompoundShapePrimitive()

void PNS::ITEM::SetIsCompoundShapePrimitive ( )
inlineinherited

Definition at line 268 of file pns_item.h.

References PNS::ITEM::m_isCompoundShapePrimitive.

◆ 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()

void PNS::OWNABLE_ITEM::SetOwner ( const ITEM_OWNER aOwner)
inlineinherited

◆ SetParent()

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

◆ SetRank()

◆ SetRoutable()

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

Definition at line 251 of file pns_item.h.

References PNS::ITEM::m_routable.

◆ SetShape()

◆ SetSnapThreshhold()

void PNS::LINE::SetSnapThreshhold ( int  aThreshhold)
inline

◆ SetViaDiameter()

void PNS::LINE::SetViaDiameter ( int  aDiameter)
inline

Definition at line 196 of file pns_line.h.

References m_via, and PNS::VIA::SetDiameter().

Referenced by PNS::LINE_PLACER::UpdateSizes().

◆ SetViaDrill()

void PNS::LINE::SetViaDrill ( int  aDrill)
inline

Definition at line 197 of file pns_line.h.

References m_via, and PNS::VIA::SetDrill().

Referenced by PNS::LINE_PLACER::UpdateSizes().

◆ SetWidth()

◆ Shape()

const SHAPE * PNS::LINE::Shape ( ) const
inlineoverridevirtual

Modifiable accessor to the underlying shape.

Reimplemented from PNS::ITEM.

Definition at line 132 of file pns_line.h.

References m_line.

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

◆ ShapeCount()

int PNS::LINE::ShapeCount ( ) const
inline

Return the aIdx-th point of the line.

Definition at line 141 of file pns_line.h.

References m_line, and SHAPE_LINE_CHAIN::ShapeCount().

Referenced by IsLinkedChecked(), and PNS::LINE_PLACER::routeStep().

◆ ShowLinks()

void PNS::LINE::ShowLinks ( ) const

◆ snapDraggedCorner()

VECTOR2I PNS::LINE::snapDraggedCorner ( const SHAPE_LINE_CHAIN aPath,
const VECTOR2I aP,
int  aIndex 
) const
private

◆ snapToNeighbourSegments()

VECTOR2I PNS::LINE::snapToNeighbourSegments ( const SHAPE_LINE_CHAIN aPath,
const VECTOR2I aP,
int  aIndex 
) const
private

◆ Unmark()

void PNS::LINE::Unmark ( int  aMarker = -1) const
overridevirtual

◆ Via() [1/2]

◆ Via() [2/2]

const VIA & PNS::LINE::Via ( ) const
inline

Definition at line 194 of file pns_line.h.

References m_via.

◆ Walkaround() [1/2]

◆ Walkaround() [2/2]

bool PNS::LINE::Walkaround ( SHAPE_LINE_CHAIN  aObstacle,
SHAPE_LINE_CHAIN aPre,
SHAPE_LINE_CHAIN aWalk,
SHAPE_LINE_CHAIN aPost,
bool  aCw 
) const

Calculate a line tightly wrapping a convex hull of an obstacle object (aObstacle).

Parameters
aPrePathis the path from origin to the obstacle.
aWalkaroundPathis the path around the obstacle.
aPostPathis the path from obstacle till the end.
aCWdetermines whether to walk around in clockwise or counter-clockwise direction.

Referenced by PNS::SHOVE::shoveLineFromLoneVia(), PNS::SHOVE::shoveLineToHullSet(), and PNS::WALKAROUND::singleStep().

◆ Width()

Member Data Documentation

◆ m_blockingObstacle

ITEM* PNS::LINE::m_blockingObstacle
private

For mark obstacle mode.

Definition at line 249 of file pns_line.h.

Referenced by GetBlockingObstacle(), LINE(), operator=(), and SetBlockingObstacle().

◆ m_isCompoundShapePrimitive

bool PNS::ITEM::m_isCompoundShapePrimitive
protectedinherited

◆ 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_line

◆ m_links

◆ m_marker

◆ m_movable

bool PNS::ITEM::m_movable
protectedinherited

Definition at line 289 of file pns_item.h.

Referenced by PNS::ITEM::ITEM(), LINE(), operator=(), and PNS::SOLID::SOLID().

◆ m_net

◆ m_owner

const ITEM_OWNER* PNS::OWNABLE_ITEM::m_owner
protectedinherited

◆ m_parent

◆ 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_snapThreshhold

int PNS::LINE::m_snapThreshhold
private

Width to smooth out jagged segments.

Definition at line 245 of file pns_line.h.

Referenced by GetSnapThreshhold(), LINE(), operator=(), SetSnapThreshhold(), snapDraggedCorner(), and snapToNeighbourSegments().

◆ m_via

VIA* PNS::LINE::m_via
private

◆ m_width

int PNS::LINE::m_width
private

Our width.

Definition at line 242 of file pns_line.h.

Referenced by LINE(), operator=(), SetShape(), SetWidth(), and Width().


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