KiCad PCB EDA Suite
PNS::ARC Class Reference

#include <pns_arc.h>

Inheritance diagram for PNS::ARC:
PNS::LINKED_ITEM PNS::ITEM

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, ANY_T = 0xff
}
 

Public Member Functions

 ARC ()
 
 ARC (const SHAPE_ARC &aArc, int aNet)
 
 ARC (const ARC &aParentArc, const SHAPE_ARC &aArc)
 
 ARC (const LINE &aParentLine, const SHAPE_ARC &aArc)
 
ARCClone () const override
 Return a deep copy of the item. More...
 
const SHAPEShape () const override
 Return the geometrical shape of the item. More...
 
void SetWidth (int aWidth) override
 
int Width () const override
 
const SHAPE_LINE_CHAIN CLine () const
 
const SHAPE_LINE_CHAIN Hull (int aClearance, int aWalkaroundThickness, int aLayer) const override
 
virtual VECTOR2I Anchor (int n) const override
 
virtual int AnchorCount () const override
 
OPT_BOX2I ChangedArea (const ARC *aOther) const
 
SHAPE_ARCArc ()
 
const SHAPE_ARCCArc () const
 
virtual const SHAPE_LINE_CHAIN HoleHull (int aClearance, int aWalkaroundThickness, int aLayer) const
 
PnsKind Kind () const
 Return the type (kind) of the item. More...
 
bool OfKind (int aKindMask) const
 Return true if the item's type matches the mask aKindMask. More...
 
std::string KindStr () const
 Returns the kind of the item, as string. More...
 
void SetParent (BOARD_ITEM *aParent)
 
BOARD_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. More...
 
NODEOwner () const
 Return the owner of this item, or NULL if there's none. More...
 
void SetOwner (NODE *aOwner)
 Set the node that owns this item. More...
 
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. More...
 
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
 
bool IsLocked () const
 
void SetRoutable (bool aRoutable)
 
bool IsRoutable () const
 
bool IsVirtual () const
 
void SetIsCompoundShapePrimitive ()
 
bool IsCompoundShapePrimitive () const
 

Static Public Member Functions

static bool ClassOf (const ITEM *aItem)
 

Static Public Attributes

static const int UnusedNet = INT_MAX
 Supported item types. More...
 

Protected Attributes

PnsKind m_kind
 
BOARD_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
 

Private Attributes

SHAPE_ARC m_arc
 

Detailed Description

Definition at line 36 of file pns_arc.h.

Member Enumeration Documentation

◆ PnsKind

enum PNS::ITEM::PnsKind
inherited
Enumerator
SOLID_T 
LINE_T 
JOINT_T 
SEGMENT_T 
ARC_T 
VIA_T 
DIFF_PAIR_T 
ANY_T 

Definition at line 61 of file pns_item.h.

62  {
63  SOLID_T = 1,
64  LINE_T = 2,
65  JOINT_T = 4,
66  SEGMENT_T = 8,
67  ARC_T = 16,
68  VIA_T = 32,
69  DIFF_PAIR_T = 64,
70  ANY_T = 0xff
71  };

Constructor & Destructor Documentation

◆ ARC() [1/4]

PNS::ARC::ARC ( )
inline

Definition at line 39 of file pns_arc.h.

39  :
41  {}
LINKED_ITEM(PnsKind aKind)

Referenced by Clone().

◆ ARC() [2/4]

PNS::ARC::ARC ( const SHAPE_ARC aArc,
int  aNet 
)
inline

Definition at line 43 of file pns_arc.h.

43  :
44  LINKED_ITEM( ARC_T ),
45  m_arc( aArc )
46  {
47  m_net = aNet;
48  }
SHAPE_ARC m_arc
Definition: pns_arc.h:118
int m_net
Definition: pns_item.h:254
LINKED_ITEM(PnsKind aKind)

References PNS::ITEM::m_net.

◆ ARC() [3/4]

PNS::ARC::ARC ( const ARC aParentArc,
const SHAPE_ARC aArc 
)
inline

Definition at line 50 of file pns_arc.h.

50  :
51  LINKED_ITEM( ARC_T ),
52  m_arc( aArc )
53  {
54  m_net = aParentArc.Net();
55  m_layers = aParentArc.Layers();
56  m_marker = aParentArc.Marker();
57  m_rank = aParentArc.Rank();
58  }
LAYER_RANGE m_layers
Definition: pns_item.h:251
int m_rank
Definition: pns_item.h:256
SHAPE_ARC m_arc
Definition: pns_arc.h:118
int m_marker
Definition: pns_item.h:255
int m_net
Definition: pns_item.h:254
LINKED_ITEM(PnsKind aKind)

References PNS::ITEM::Layers(), PNS::ITEM::m_layers, PNS::ITEM::m_marker, PNS::ITEM::m_net, PNS::ITEM::m_rank, PNS::ITEM::Marker(), PNS::ITEM::Net(), and PNS::ITEM::Rank().

◆ ARC() [4/4]

PNS::ARC::ARC ( const LINE aParentLine,
const SHAPE_ARC aArc 
)
inline

Definition at line 60 of file pns_arc.h.

60  :
61  LINKED_ITEM( ARC_T ),
62  m_arc( aArc.GetP0(), aArc.GetArcMid(), aArc.GetP1(), aParentLine.Width() )
63  {
64  m_net = aParentLine.Net();
65  m_layers = aParentLine.Layers();
66  m_marker = aParentLine.Marker();
67  m_rank = aParentLine.Rank();
68  }
LAYER_RANGE m_layers
Definition: pns_item.h:251
int m_rank
Definition: pns_item.h:256
SHAPE_ARC m_arc
Definition: pns_arc.h:118
int m_marker
Definition: pns_item.h:255
const VECTOR2I & GetP0() const
Definition: shape_arc.h:111
const VECTOR2I & GetArcMid() const
Definition: shape_arc.h:113
int m_net
Definition: pns_item.h:254
LINKED_ITEM(PnsKind aKind)
const VECTOR2I & GetP1() const
Definition: shape_arc.h:112

References PNS::ITEM::Layers(), PNS::ITEM::m_layers, PNS::ITEM::m_marker, PNS::ITEM::m_net, PNS::ITEM::m_rank, PNS::LINE::Marker(), PNS::ITEM::Net(), and PNS::LINE::Rank().

Member Function Documentation

◆ Anchor()

virtual VECTOR2I PNS::ARC::Anchor ( int  n) const
inlineoverridevirtual

Reimplemented from PNS::ITEM.

Definition at line 99 of file pns_arc.h.

100  {
101  if( n == 0 )
102  return m_arc.GetP0();
103  else
104  return m_arc.GetP1();
105  }
SHAPE_ARC m_arc
Definition: pns_arc.h:118
const VECTOR2I & GetP0() const
Definition: shape_arc.h:111
const VECTOR2I & GetP1() const
Definition: shape_arc.h:112

References SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), and m_arc.

Referenced by PNS::NODE::addArc(), PNS::NODE::findRedundantArc(), and PNS::NODE::removeArcIndex().

◆ AnchorCount()

virtual int PNS::ARC::AnchorCount ( ) const
inlineoverridevirtual

Reimplemented from PNS::ITEM.

Definition at line 107 of file pns_arc.h.

108  {
109  return 2;
110  }

◆ Arc()

SHAPE_ARC& PNS::ARC::Arc ( )
inline

Definition at line 114 of file pns_arc.h.

114 { return m_arc; }
SHAPE_ARC m_arc
Definition: pns_arc.h:118

References m_arc.

Referenced by PNS_TEST_ENVIRONMENT::ReplayLog().

◆ BelongsTo()

bool PNS::ITEM::BelongsTo ( NODE aNode) const
inlineinherited
Returns
true if the item is owned by the node aNode.

Definition at line 181 of file pns_item.h.

182  {
183  return m_owner == aNode;
184  }
NODE * m_owner
Definition: pns_item.h:250

References PNS::ITEM::m_owner.

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

◆ CArc()

const SHAPE_ARC& PNS::ARC::CArc ( ) const
inline

Definition at line 115 of file pns_arc.h.

115 { return m_arc; }
SHAPE_ARC m_arc
Definition: pns_arc.h:118

References m_arc.

◆ ChangedArea()

OPT_BOX2I PNS::ARC::ChangedArea ( const ARC aOther) const

Definition at line 46 of file pns_arc.cpp.

47 {
48  BOX2I tmp = Shape()->BBox();
49  tmp.Merge( aOther->Shape()->BBox() );
50  return tmp;
51 }
virtual const BOX2I BBox(int aClearance=0) const =0
Compute a bounding box of the shape, with a margin of aClearance a collision.
BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
Definition: box2.h:363
const SHAPE * Shape() const override
Return the geometrical shape of the item.
Definition: pns_arc.h:77

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

◆ ClassOf()

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

Definition at line 70 of file pns_arc.h.

71  {
72  return aItem && ARC_T == aItem->Kind();
73  }

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

◆ CLine()

const SHAPE_LINE_CHAIN PNS::ARC::CLine ( ) const
inline

Definition at line 92 of file pns_arc.h.

93  {
94  return SHAPE_LINE_CHAIN( m_arc );
95  }
SHAPE_ARC m_arc
Definition: pns_arc.h:118
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...

References m_arc.

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

◆ Clone()

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

Return a deep copy of the item.

Implements PNS::ITEM.

Definition at line 34 of file pns_arc.cpp.

35 {
36  ARC* a = new ARC( m_arc, m_net );
37 
38  a->m_layers = m_layers;
39  a->m_marker = m_marker;
40  a->m_rank = m_rank;
41 
42  return a;
43 }
ARC()
Definition: pns_arc.h:39
LAYER_RANGE m_layers
Definition: pns_item.h:251
int m_rank
Definition: pns_item.h:256
SHAPE_ARC m_arc
Definition: pns_arc.h:118
int m_marker
Definition: pns_item.h:255
int m_net
Definition: pns_item.h:254

References ARC(), m_arc, PNS::ITEM::m_layers, PNS::ITEM::m_marker, PNS::ITEM::m_net, and PNS::ITEM::m_rank.

Referenced by PNS::COMPONENT_DRAGGER::Drag().

◆ Collide()

bool PNS::ITEM::Collide ( const ITEM aOther,
const NODE aNode,
bool  aDifferentNetsOnly = true 
) 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 131 of file pns_item.cpp.

132 {
133  if( collideSimple( aOther, aNode, aDifferentNetsOnly ) )
134  return true;
135 
136  // Special cases for "head" lines with vias attached at the end. Note that this does not
137  // support head-line-via to head-line-via collisions, but you can't route two independent
138  // tracks at once so it shouldn't come up.
139 
140  if( m_kind == LINE_T )
141  {
142  const LINE* line = static_cast<const LINE*>( this );
143 
144  if( line->EndsWithVia() && line->Via().collideSimple( aOther, aNode, aDifferentNetsOnly ) )
145  return true;
146  }
147 
148  if( aOther->m_kind == LINE_T )
149  {
150  const LINE* line = static_cast<const LINE*>( aOther );
151 
152  if( line->EndsWithVia() && line->Via().collideSimple( this, aNode, aDifferentNetsOnly ) )
153  return true;
154  }
155 
156  return false;
157 }
PnsKind m_kind
Definition: pns_item.h:247
bool collideSimple(const ITEM *aOther, const NODE *aNode, bool aDifferentNetsOnly) const
Definition: pns_item.cpp:32

References PNS::ITEM::collideSimple(), PNS::LINE::EndsWithVia(), PNS::ITEM::LINE_T, PNS::ITEM::m_kind, and PNS::LINE::Via().

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

◆ Hole()

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

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

Definition at line 205 of file pns_item.h.

206  {
207  return nullptr;
208  }

Referenced by PNS::ITEM::collideSimple(), ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM(), and ROUTER_PREVIEW_ITEM::Update().

◆ HoleHull()

virtual const SHAPE_LINE_CHAIN PNS::ITEM::HoleHull ( int  aClearance,
int  aWalkaroundThickness,
int  aLayer 
) const
inlinevirtualinherited

Reimplemented in PNS::SOLID.

Definition at line 121 of file pns_item.h.

123  {
124  return SHAPE_LINE_CHAIN();
125  }
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...

◆ Hull()

const SHAPE_LINE_CHAIN PNS::ARC::Hull ( int  aClearance,
int  aWalkaroundThickness,
int  aLayer 
) const
overridevirtual

Reimplemented from PNS::ITEM.

Definition at line 28 of file pns_arc.cpp.

29 {
30  return ArcHull( m_arc, aClearance, aWalkaroundThickness );
31 }
SHAPE_ARC m_arc
Definition: pns_arc.h:118
const SHAPE_LINE_CHAIN ArcHull(const SHAPE_ARC &aSeg, int aClearance, int aWalkaroundThickness)
Various utility functions.
Definition: pns_utils.cpp:66

References PNS::ArcHull(), and m_arc.

◆ IsCompoundShapePrimitive()

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

Definition at line 241 of file pns_item.h.

241 { return m_isCompoundShapePrimitive; }
bool m_isCompoundShapePrimitive
Definition: pns_item.h:259

References PNS::ITEM::m_isCompoundShapePrimitive.

◆ IsLocked()

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

Definition at line 227 of file pns_item.h.

228  {
229  return Marker() & MK_LOCKED;
230  }
virtual int Marker() const
Definition: pns_item.h:212

References PNS::ITEM::Marker(), and PNS::MK_LOCKED.

Referenced by ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::performDragging(), and PNS::SHOVE::pushOrShoveVia().

◆ IsRoutable()

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

Definition at line 233 of file pns_item.h.

233 { return m_routable; }
bool m_routable
Definition: pns_item.h:257

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

Returns the kind of the item, as string.

Definition at line 160 of file pns_item.cpp.

161 {
162  switch( m_kind )
163  {
164  case ARC_T: return "arc";
165  case LINE_T: return "line";
166  case SEGMENT_T: return "segment";
167  case VIA_T: return "via";
168  case JOINT_T: return "joint";
169  case SOLID_T: return "solid";
170  case DIFF_PAIR_T: return "diff-pair";
171  default: return "unknown";
172  }
173 }
PnsKind m_kind
Definition: pns_item.h:247

References PNS::ITEM::ARC_T, PNS::ITEM::DIFF_PAIR_T, PNS::ITEM::JOINT_T, PNS::ITEM::LINE_T, PNS::ITEM::m_kind, PNS::ITEM::SEGMENT_T, PNS::ITEM::SOLID_T, and PNS::ITEM::VIA_T.

Referenced by PNS::TOOL_BASE::pickSingleItem(), and PNS::TOOL_BASE::updateEndItem().

◆ Layer()

◆ Layers()

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

Definition at line 154 of file pns_item.h.

154 { return m_layers; }
LAYER_RANGE m_layers
Definition: pns_item.h:251

References PNS::ITEM::m_layers.

Referenced by PNS::INDEX::Add(), PNS::NODE::Add(), PNS::NODE::addArc(), PNS_KICAD_IFACE::AddItem(), PNS::NODE::addSegment(), PNS::NODE::addSolid(), PNS::NODE::addVia(), ARC(), PNS::TOPOLOGY::AssembleDiffPair(), PNS::NODE::AssembleLine(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), PNS_PCBNEW_RULE_RESOLVER::Clearance(), PNS::VIA::Clone(), PNS::ITEM::collideSimple(), PNS::MEANDER_PLACER::CurrentLayer(), PNS::DP_MEANDER_PLACER::CurrentLayer(), PNS::DIFF_PAIR_PLACER::FindDpPrimitivePair(), PNS::NODE::FindJoint(), PNS::NODE::FindLinesBetweenJoints(), PNS::NODE::findRedundantArc(), PNS::NODE::findRedundantSegment(), PNS::NODE::FixupVirtualVias(), ROUTER_TOOL::getStartLayer(), PNS_PCBNEW_RULE_RESOLVER::HoleClearance(), PNS_PCBNEW_RULE_RESOLVER::HoleToHoleClearance(), PNS_KICAD_IFACE::IsFlashedOnLayer(), PNS::ITEM::Layer(), PNS::ITEM::LayersOverlap(), PNS::LINE::LINE(), PNS::NODE::LockJoint(), PNS::VIA::MakeHandle(), PNS::ROUTER::markViolations(), PNS::SHOVE::onCollidingSolid(), LENGTH_TUNER_TOOL::performTuning(), PNS::TOOL_BASE::pickSingleItem(), PNS::INDEX::Query(), PNS::INDEX::Remove(), PNS::NODE::removeArcIndex(), PNS::NODE::removeSegmentIndex(), PNS::NODE::removeSolidIndex(), PNS::NODE::removeViaIndex(), PNS_TEST_ENVIRONMENT::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 163 of file pns_item.h.

164  {
165  return Layers().Overlaps( aOther->Layers() );
166  }
bool Overlaps(const LAYER_RANGE &aOther) const
Definition: pns_layerset.h:67
const LAYER_RANGE & Layers() const
Definition: pns_item.h:154

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

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

◆ Mark()

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

Reimplemented in PNS::LINE.

Definition at line 210 of file pns_item.h.

210 { m_marker = aMarker; }
int m_marker
Definition: pns_item.h:255

References PNS::ITEM::m_marker.

Referenced by PNS::ITEM::collideSimple(), and PNS::SHOVE::ShoveDraggingVia().

◆ Marker()

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

Reimplemented in PNS::LINE.

Definition at line 212 of file pns_item.h.

212 { return m_marker; }
int m_marker
Definition: pns_item.h:255

References PNS::ITEM::m_marker.

Referenced by ARC(), PNS::ITEM::collideSimple(), PNS::ITEM::IsLocked(), PNS::SHOVE::pushOrShoveVia(), and ROUTER_PREVIEW_ITEM::Update().

◆ Net()

int PNS::ITEM::Net ( ) const
inlineinherited

◆ OfKind()

◆ Owner()

NODE* PNS::ITEM::Owner ( ) const
inlineinherited

Return the owner of this item, or NULL if there's none.

Definition at line 171 of file pns_item.h.

171 { return m_owner; }
NODE * m_owner
Definition: pns_item.h:250

References PNS::ITEM::m_owner.

Referenced by PNS_KICAD_IFACE_BASE::inheritTrackWidth(), and PNS::LINE_PLACER::Move().

◆ Parent()

◆ Rank()

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

Reimplemented in PNS::LINE.

Definition at line 215 of file pns_item.h.

215 { return m_rank; }
int m_rank
Definition: pns_item.h:256

References PNS::ITEM::m_rank.

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

◆ SetIsCompoundShapePrimitive()

void PNS::ITEM::SetIsCompoundShapePrimitive ( )
inlineinherited

Definition at line 240 of file pns_item.h.

240 { m_isCompoundShapePrimitive = true; }
bool m_isCompoundShapePrimitive
Definition: pns_item.h:259

References PNS::ITEM::m_isCompoundShapePrimitive.

◆ SetLayer()

◆ SetLayers()

void PNS::ITEM::SetLayers ( const LAYER_RANGE aLayers)
inlineinherited

Definition at line 155 of file pns_item.h.

155 { m_layers = aLayers; }
LAYER_RANGE m_layers
Definition: pns_item.h:251

References PNS::ITEM::m_layers.

Referenced by PNS::TOPOLOGY::AssembleDiffPair(), PNS::NODE::AssembleLine(), PNS::VIA::Clone(), and PNS::VIA::VIA().

◆ SetNet()

◆ SetOwner()

void PNS::ITEM::SetOwner ( NODE aOwner)
inlineinherited

Set the node that owns this item.

An item can belong to a single NODE or be unowned.

Definition at line 176 of file pns_item.h.

176 { m_owner = aOwner; }
NODE * m_owner
Definition: pns_item.h:250

References PNS::ITEM::m_owner.

Referenced by PNS::NODE::AssembleLine(), PNS::NODE::doRemove(), and PNS::NODE::Remove().

◆ SetParent()

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

Definition at line 148 of file pns_item.h.

148 { m_parent = aParent; }
BOARD_ITEM * m_parent
Definition: pns_item.h:249

References PNS::ITEM::m_parent.

Referenced by PNS_KICAD_IFACE::AddItem().

◆ SetRank()

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

Reimplemented in PNS::LINE.

Definition at line 214 of file pns_item.h.

214 { m_rank = aRank; }
int m_rank
Definition: pns_item.h:256

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 232 of file pns_item.h.

232 { m_routable = aRoutable; }
bool m_routable
Definition: pns_item.h:257

References PNS::ITEM::m_routable.

◆ SetWidth()

void PNS::ARC::SetWidth ( int  aWidth)
inlineoverridevirtual

Reimplemented from PNS::LINKED_ITEM.

Definition at line 82 of file pns_arc.h.

83  {
84  m_arc.SetWidth(aWidth);
85  }
SHAPE_ARC m_arc
Definition: pns_arc.h:118
void SetWidth(int aWidth)
Definition: shape_arc.h:151

References m_arc, and SHAPE_ARC::SetWidth().

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

◆ Shape()

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

Return the geometrical shape of the item.

Used for collision detection and spatial indexing.

Reimplemented from PNS::ITEM.

Definition at line 77 of file pns_arc.h.

78  {
79  return static_cast<const SHAPE*>( &m_arc );
80  }
SHAPE_ARC m_arc
Definition: pns_arc.h:118

References m_arc.

Referenced by PNS_KICAD_IFACE::AddItem(), PNS::NODE::AssembleLine(), ChangedArea(), PNS::TOOL_BASE::snapToItem(), and PNS_KICAD_IFACE::UpdateItem().

◆ Unmark()

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

Reimplemented in PNS::LINE.

Definition at line 211 of file pns_item.h.

211 { m_marker &= ~aMarker; }
int m_marker
Definition: pns_item.h:255

References PNS::ITEM::m_marker.

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

◆ Width()

int PNS::ARC::Width ( ) const
inlineoverridevirtual

Reimplemented from PNS::LINKED_ITEM.

Definition at line 87 of file pns_arc.h.

88  {
89  return m_arc.GetWidth();
90  }
SHAPE_ARC m_arc
Definition: pns_arc.h:118
int GetWidth() const
Definition: shape_arc.h:156

References SHAPE_ARC::GetWidth(), and m_arc.

Referenced by PNS_KICAD_IFACE::AddItem(), PNS_TEST_ENVIRONMENT::ReplayLog(), and PNS_KICAD_IFACE::UpdateItem().

Member Data Documentation

◆ m_arc

SHAPE_ARC PNS::ARC::m_arc
private

Definition at line 118 of file pns_arc.h.

Referenced by Anchor(), Arc(), CArc(), CLine(), Clone(), Hull(), SetWidth(), Shape(), and Width().

◆ m_isCompoundShapePrimitive

bool PNS::ITEM::m_isCompoundShapePrimitive
protectedinherited

◆ 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

NODE* PNS::ITEM::m_owner
protectedinherited

◆ m_parent

BOARD_ITEM* PNS::ITEM::m_parent
protectedinherited

◆ m_rank

◆ m_routable

bool PNS::ITEM::m_routable
protectedinherited

Definition at line 257 of file pns_item.h.

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

◆ UnusedNet

const int PNS::ITEM::UnusedNet = INT_MAX
staticinherited

Supported item types.

Definition at line 58 of file pns_item.h.

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


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