KiCad PCB EDA Suite
PNS::LINE Class Reference

#include <pns_line.h>

Inheritance diagram for PNS::LINE:
PNS::ITEM

Public Types

typedef std::vector< SEGMENT * > SEGMENT_REFS
 
enum  PnsKind {
  SOLID_T = 1, LINE_T = 2, JOINT_T = 4, SEGMENT_T = 8,
  VIA_T = 16, DIFF_PAIR_T = 32, ANY_T = 0xff
}
 

Supported item types

More...
 

Public Member Functions

 LINE ()
 Constructor Makes an empty line. More...
 
 LINE (const LINE &aOther)
 
 LINE (const LINE &aBase, const SHAPE_LINE_CHAIN &aLine)
 Constructor Copies properties (net, layers, etc.) from a base line and replaces the shape by another. More...
 
 ~LINE ()
 
virtual LINEClone () const override
 Function Clone() More...
 
const LINEoperator= (const LINE &aOther)
 
void SetShape (const SHAPE_LINE_CHAIN &aLine)
 

Assigns a shape to the line (a polyline/line chain)

More...
 
const SHAPEShape () const override
 

Returns the shape of the line

More...
 
SHAPE_LINE_CHAINLine ()
 

Modifiable accessor to the underlying shape

More...
 
const SHAPE_LINE_CHAINCLine () const
 

Const accessor to the underlying shape

More...
 
int SegmentCount () const
 

Returns the number of segments in the line

More...
 
int PointCount () const
 

Returns the number of points in the line

More...
 
const VECTOR2ICPoint (int aIdx) const
 

Returns the aIdx-th point of the line

More...
 
const SEG CSegment (int aIdx) const
 

Returns the aIdx-th segment of the line

More...
 
void SetWidth (int aWidth)
 

Sets line width

More...
 
int Width () const
 

Returns line width

More...
 
bool CompareGeometry (const LINE &aOther)
 

Returns true if the line is geometrically identical as line aOther

More...
 
void Reverse ()
 

Reverses the point/vertex order

More...
 
void LinkSegment (SEGMENT *aSeg)
 

Adds a reference to a segment registered in a NODE that is a part of this line.

More...
 
SEGMENT_REFSLinkedSegments ()
 

Returns the list of segments from the owning node that constitute this line (or NULL if the line is not linked)

More...
 
bool IsLinked () const
 
bool IsLinkedChecked () const
 
bool ContainsSegment (SEGMENT *aSeg) const
 

Checks if the segment aSeg is a part of the line.

More...
 
SEGMENTGetLink (int aIndex) const
 
void ClearSegmentLinks ()
 

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

More...
 
int LinkCount () const
 

Returns the number of segments that were assembled together to form this line.

More...
 
const LINE ClipToNearestObstacle (NODE *aNode) const
 

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

More...
 
void ClipVertexRange (int aStart, int aEnd)
 

Clips the line to a given range of vertices.

More...
 
int CountCorners (int aAngles) const
 

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

More...
 
bool Walkaround (SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN &aPre, SHAPE_LINE_CHAIN &aWalk, SHAPE_LINE_CHAIN &aPost, bool aCw) const
 

Calculates a line thightly wrapping a convex hull of an obstacle object (aObstacle).

More...
 
void Walkaround (const SHAPE_LINE_CHAIN &aObstacle, SHAPE_LINE_CHAIN &aPath, bool aCw) const
 
bool Is45Degree () const
 
void ShowLinks () const
 

Prints out all linked segments

More...
 
bool EndsWithVia () const
 
void AppendVia (const VIA &aVia)
 
void RemoveVia ()
 
const VIAVia () const
 
virtual void Mark (int aMarker) override
 
virtual void Unmark (int aMarker=-1) override
 
virtual int Marker () const override
 
void DragSegment (const VECTOR2I &aP, int aIndex, int aSnappingThreshold=0)
 
void DragCorner (const VECTOR2I &aP, int aIndex, int aSnappingThreshold=0)
 
void SetRank (int aRank) override
 
int Rank () const override
 
bool HasLoops () const
 
bool HasLockedSegments () const
 
OPT_BOX2I ChangedArea (const LINE *aOther) const
 
virtual const SHAPE_LINE_CHAIN Hull (int aClearance=0, int aWalkaroundThickness=0) const
 
PnsKind Kind () const
 Function Kind() More...
 
bool OfKind (int aKindMask) const
 Function OfKind() More...
 
const std::string KindStr () const
 Function KindStr() More...
 
void SetParent (BOARD_CONNECTED_ITEM *aParent)
 Function SetParent() More...
 
BOARD_CONNECTED_ITEMParent () const
 Function Parent() More...
 
void SetNet (int aNet)
 Function SetNet() More...
 
int Net () const
 Function Net() More...
 
void SetLayers (const LAYER_RANGE &aLayers)
 Function SetLayers() More...
 
void SetLayer (int aLayer)
 Function SetLayer() More...
 
const LAYER_RANGELayers () const
 Function Layers() More...
 
virtual int Layer () const
 Function Layer() More...
 
bool LayersOverlap (const ITEM *aOther) const
 Function LayersOverlap() More...
 
void SetOwner (NODE *aOwner)
 Functon SetOwner() More...
 
bool BelongsTo (NODE *aNode) const
 Function BelongsTo() More...
 
NODEOwner () const
 Function Owner() More...
 
virtual bool Collide (const ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I &aMTV, bool aDifferentNetsOnly=true) const
 Function Collide() More...
 
bool Collide (const ITEM *aOther, int aClearance, bool aDifferentNetsOnly=true) const
 Function Collide() More...
 
virtual VECTOR2I Anchor (int n) const
 
virtual int AnchorCount () const
 
bool IsLocked () const
 

Static Public Member Functions

static bool ClassOf (const ITEM *aItem)
 

Static Public Attributes

static const int UnusedNet = INT_MAX
 

Protected Attributes

PnsKind m_kind
 
BOARD_CONNECTED_ITEMm_parent
 
NODEm_owner
 
LAYER_RANGE m_layers
 
bool m_movable
 
int m_net
 
int m_marker
 
int m_rank
 

Private Member Functions

VECTOR2I snapToNeighbourSegments (const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex, int aThreshold) const
 
VECTOR2I snapDraggedCorner (const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex, int aThreshold) const
 
void copyLinks (const LINE *aParent)
 

Copies m_segmentRefs from the line aParent.

More...
 

Private Attributes

SEGMENT_REFS m_segmentRefs
 

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.

More...
 
SHAPE_LINE_CHAIN m_line
 

The actual shape of the line

More...
 
int m_width
 

our width

More...
 
bool m_hasVia
 

If true, the line ends with a via

More...
 
VIA m_via
 

Via at the end point, if m_hasVia == true

More...
 

Detailed Description

Definition at line 60 of file pns_line.h.

Member Typedef Documentation

typedef std::vector<SEGMENT*> PNS::LINE::SEGMENT_REFS

Definition at line 63 of file pns_line.h.

Member Enumeration Documentation

enum PNS::ITEM::PnsKind
inherited

Supported item types

Enumerator
SOLID_T 
LINE_T 
JOINT_T 
SEGMENT_T 
VIA_T 
DIFF_PAIR_T 
ANY_T 

Definition at line 59 of file pns_item.h.

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

Constructor & Destructor Documentation

PNS::LINE::LINE ( )
inline

Constructor Makes an empty line.

Definition at line 69 of file pns_line.h.

References m_hasVia, and m_width.

Referenced by Clone().

69  : ITEM( LINE_T )
70  {
71  m_hasVia = false;
72  m_width = 1; // Dummy value
73  }
ITEM(PnsKind aKind)
Definition: pns_item.h:70
bool m_hasVia
If true, the line ends with a via
Definition: pns_line.h:291
int m_width
our width
Definition: pns_line.h:288
PNS::LINE::LINE ( const LINE aOther)

Definition at line 38 of file pns_line.cpp.

References copyLinks(), m_hasVia, PNS::ITEM::m_layers, PNS::ITEM::m_marker, PNS::ITEM::m_movable, PNS::ITEM::m_net, PNS::ITEM::m_rank, and m_via.

38  :
39  ITEM( aOther ),
40  m_line( aOther.m_line ),
41  m_width( aOther.m_width )
42 {
43  m_net = aOther.m_net;
44  m_movable = aOther.m_movable;
45  m_layers = aOther.m_layers;
46  m_via = aOther.m_via;
47  m_hasVia = aOther.m_hasVia;
48  m_marker = aOther.m_marker;
49  m_rank = aOther.m_rank;
50 
51  copyLinks( &aOther );
52 }
VIA m_via
Via at the end point, if m_hasVia == true
Definition: pns_line.h:294
LAYER_RANGE m_layers
Definition: pns_item.h:350
int m_rank
Definition: pns_item.h:355
bool m_movable
Definition: pns_item.h:352
ITEM(PnsKind aKind)
Definition: pns_item.h:70
int m_marker
Definition: pns_item.h:354
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
void copyLinks(const LINE *aParent)
Copies m_segmentRefs from the line aParent.
Definition: pns_line.cpp:118
bool m_hasVia
If true, the line ends with a via
Definition: pns_line.h:291
int m_net
Definition: pns_item.h:353
int m_width
our width
Definition: pns_line.h:288
PNS::LINE::LINE ( const LINE aBase,
const SHAPE_LINE_CHAIN aLine 
)
inline

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

Definition at line 82 of file pns_line.h.

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

82  :
83  ITEM( aBase ),
84  m_line( aLine ),
85  m_width( aBase.m_width )
86  {
87  m_net = aBase.m_net;
88  m_layers = aBase.m_layers;
89  m_hasVia = false;
90  }
LAYER_RANGE m_layers
Definition: pns_item.h:350
ITEM(PnsKind aKind)
Definition: pns_item.h:70
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
bool m_hasVia
If true, the line ends with a via
Definition: pns_line.h:291
int m_net
Definition: pns_item.h:353
int m_width
our width
Definition: pns_line.h:288
PNS::LINE::~LINE ( )

Definition at line 55 of file pns_line.cpp.

56 {
57 }

Member Function Documentation

virtual VECTOR2I PNS::ITEM::Anchor ( int  n) const
inlinevirtualinherited

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

Definition at line 326 of file pns_item.h.

Referenced by PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), PNS::DP_PRIMITIVE_PAIR::DP_PRIMITIVE_PAIR(), and PNS::DIFF_PAIR_PLACER::getDanglingAnchor().

327  {
328  return VECTOR2I();
329  }
VECTOR2< int > VECTOR2I
Definition: vector2d.h:590
virtual int PNS::ITEM::AnchorCount ( ) const
inlinevirtualinherited

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

Definition at line 331 of file pns_item.h.

332  {
333  return 0;
334  }
void PNS::LINE::AppendVia ( const VIA aVia)

Definition at line 707 of file pns_line.cpp.

References SHAPE_LINE_CHAIN::CPoint(), m_hasVia, m_line, PNS::ITEM::m_net, m_via, SHAPE_LINE_CHAIN::PointCount(), PNS::VIA::Pos(), Reverse(), and PNS::ITEM::SetNet().

Referenced by PNS::LINE_PLACER::buildInitialLine(), PNS::SHOVE::onReverseCollidingVia(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), and PNS::DIFF_PAIR::updateLine().

708 {
709  if( m_line.PointCount() > 1 && aVia.Pos() == m_line.CPoint( 0 ) )
710  {
711  Reverse();
712  }
713 
714  m_hasVia = true;
715  m_via = aVia;
716  m_via.SetNet( m_net );
717 }
VIA m_via
Via at the end point, if m_hasVia == true
Definition: pns_line.h:294
int PointCount() const
Function PointCount()
void SetNet(int aNet)
Function SetNet()
Definition: pns_item.h:167
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
void Reverse()
Reverses the point/vertex order
Definition: pns_line.cpp:699
bool m_hasVia
If true, the line ends with a via
Definition: pns_line.h:291
int m_net
Definition: pns_item.h:353
const VECTOR2I & CPoint(int aIndex) const
Function CPoint()
bool PNS::ITEM::BelongsTo ( NODE aNode) const
inlineinherited

Function BelongsTo()

Returns
true if the item is owned by the node aNode.

Definition at line 249 of file pns_item.h.

References PNS::ITEM::m_owner.

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

250  {
251  return m_owner == aNode;
252  }
NODE * m_owner
Definition: pns_item.h:349
OPT_BOX2I PNS::LINE::ChangedArea ( const LINE aOther) const

Definition at line 804 of file pns_line.cpp.

References SEG::Contains(), CPoint(), SHAPE_LINE_CHAIN::CPoint(), PNS::extendBox(), BOX2< Vec >::Inflate(), m_line, max, min, SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN::Simplify(), and Width().

Referenced by PNS::ChangedArea().

805 {
806  BOX2I area;
807  bool areaDefined = false;
808 
809  int i_start = -1;
810  int i_end_self = -1, i_end_other = -1;
811 
812  SHAPE_LINE_CHAIN self( m_line );
813  self.Simplify();
814  SHAPE_LINE_CHAIN other( aOther->m_line );
815  other.Simplify();
816 
817  int np_self = self.PointCount();
818  int np_other = other.PointCount();
819 
820  int n = std::min( np_self, np_other );
821 
822  for( int i = 0; i < n; i++ )
823  {
824  const VECTOR2I p1 = self.CPoint( i );
825  const VECTOR2I p2 = other.CPoint( i );
826 
827  if( p1 != p2 )
828  {
829  if( i != n - 1 )
830  {
831  SEG s = self.CSegment( i );
832 
833  if( !s.Contains( p2 ) )
834  {
835  i_start = i;
836  break;
837  }
838  } else {
839  i_start = i;
840  break;
841  }
842  }
843  }
844 
845  for( int i = 0; i < n; i++ )
846  {
847  const VECTOR2I p1 = self.CPoint( np_self - 1 - i );
848  const VECTOR2I p2 = other.CPoint( np_other - 1 - i );
849 
850  if( p1 != p2 )
851  {
852  i_end_self = np_self - 1 - i;
853  i_end_other = np_other - 1 - i;
854  break;
855  }
856  }
857 
858  if( i_start < 0 )
859  i_start = n;
860 
861  if( i_end_self < 0 )
862  i_end_self = np_self - 1;
863 
864  if( i_end_other < 0 )
865  i_end_other = np_other - 1;
866 
867  for( int i = i_start; i <= i_end_self; i++ )
868  extendBox( area, areaDefined, self.CPoint( i ) );
869 
870  for( int i = i_start; i <= i_end_other; i++ )
871  extendBox( area, areaDefined, other.CPoint( i ) );
872 
873  if( areaDefined )
874  {
875  area.Inflate( std::max( Width(), aOther->Width() ) );
876  return area;
877  }
878 
879  return OPT_BOX2I();
880 }
int Width() const
Returns line width
Definition: pns_line.h:159
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
SHAPE_LINE_CHAIN & Simplify()
Function Simplify()
Definition: seg.h:37
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Function Inflate inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:266
#define max(a, b)
Definition: auxiliary.h:86
Class SHAPE_LINE_CHAIN.
static void extendBox(BOX2I &aBox, bool &aDefined, const VECTOR2I &aP)
Definition: pns_line.cpp:790
bool Contains(const VECTOR2I &aP) const
Definition: seg.cpp:155
boost::optional< BOX2I > OPT_BOX2I
Definition: box2.h:471
#define min(a, b)
Definition: auxiliary.h:85
const VECTOR2I & CPoint(int aIdx) const
Returns the aIdx-th point of the line
Definition: pns_line.h:141
static bool PNS::LINE::ClassOf ( const ITEM aItem)
inlinestatic

Definition at line 94 of file pns_line.h.

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

95  {
96  return aItem && LINE_T == aItem->Kind();
97  }
void PNS::LINE::ClearSegmentLinks ( )

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

Definition at line 784 of file pns_line.cpp.

References m_segmentRefs.

Referenced by PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dumbDragVia(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onReverseCollidingVia(), PNS::SHOVE::ProcessSingleLine(), PNS::NODE::Remove(), PNS::SHOVE::ShoveLines(), PNS::SHOVE::ShoveMultiLines(), and PNS::DRAGGER::startDragSegment().

785 {
786  m_segmentRefs.clear();
787 }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
const LINE PNS::LINE::ClipToNearestObstacle ( NODE aNode) const

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

Returns the clipped line.

Definition at line 299 of file pns_line.cpp.

References SHAPE_LINE_CHAIN::Clear(), Line(), PNS::NODE::NearestObstacle(), SHAPE_LINE_CHAIN::Remove(), RemoveVia(), and SHAPE_LINE_CHAIN::Split().

Referenced by PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), and PNS::WALKAROUND::singleStep().

300 {
301  const int IterationLimit = 5;
302  int i;
303  LINE l( *this );
304 
305  for( i = 0; i < IterationLimit; i++ )
306  {
307  NODE::OPT_OBSTACLE obs = aNode->NearestObstacle( &l );
308 
309  if( obs )
310  {
311  l.RemoveVia();
312  int p = l.Line().Split( obs->m_ipFirst );
313  l.Line().Remove( p + 1, -1 );
314  } else
315  break;
316  }
317 
318  if( i == IterationLimit )
319  l.Line().Clear();
320 
321  return l;
322 }
LINE()
Constructor Makes an empty line.
Definition: pns_line.h:69
boost::optional< OBSTACLE > OPT_OBSTACLE
Definition: pns_node.h:140
void PNS::LINE::ClipVertexRange ( int  aStart,
int  aEnd 
)

Clips the line to a given range of vertices.

Definition at line 749 of file pns_line.cpp.

References IsLinked(), m_line, m_segmentRefs, and SHAPE_LINE_CHAIN::Slice().

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

750 {
751  m_line = m_line.Slice( aStart, aEnd );
752 
753  if( IsLinked() ) {
754  assert( m_segmentRefs.size() < INT_MAX );
755  assert( (int) m_segmentRefs.size() >= (aEnd - aStart) );
756 
757  // Note: The range includes aEnd, but we have n-1 segments.
758  std::rotate(
759  m_segmentRefs.begin(),
760  m_segmentRefs.begin() + aStart,
761  m_segmentRefs.begin() + aEnd
762  );
763 
764  m_segmentRefs.resize( aEnd - aStart );
765  }
766 }
const SHAPE_LINE_CHAIN Slice(int aStartIndex, int aEndIndex=-1) const
Function Slice()
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
bool IsLinked() const
Definition: pns_line.h:186
LINE * PNS::LINE::Clone ( ) const
overridevirtual

Function Clone()

Returns a deep copy of the item

Implements PNS::ITEM.

Definition at line 78 of file pns_line.cpp.

References LINE().

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

79 {
80  LINE* l = new LINE( *this );
81 
82  return l;
83 }
LINE()
Constructor Makes an empty line.
Definition: pns_line.h:69
bool PNS::ITEM::Collide ( const ITEM aOther,
int  aClearance,
bool  aNeedMTV,
VECTOR2I aMTV,
bool  aDifferentNetsOnly = true 
) const
virtualinherited

Function Collide()

Checks for a collision (clearance violation) with between us and item aOther. Collision checking takes all PCB stuff into accound (layers, nets, DRC rules). Optionally returns a minimum translation vector for force propagation algorithm.

Parameters
aOtheritem to check collision against
aClearancedesired clearance
aNeedMTVwhen true, the minimum translation vector is calculated
aMTVthe minimum translation vector
Returns
true, if a collision was found.

Definition at line 44 of file pns_item.cpp.

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

Referenced by PNS::NODE::CheckColliding(), PNS::ITEM::Collide(), PNS::OPTIMIZER::CACHE_VISITOR::operator()(), and PNS::NODE::DEFAULT_OBSTACLE_VISITOR::operator()().

46 {
47  if( collideSimple( aOther, aClearance, aNeedMTV, aMTV, aDifferentNetsOnly ) )
48  return true;
49 
50  // special case for "head" line with a via attached at the end.
51  if( aOther->m_kind == LINE_T )
52  {
53  const LINE* line = static_cast<const LINE*>( aOther );
54 
55  if( line->EndsWithVia() )
56  return collideSimple( &line->Via(), aClearance - line->Width() / 2, aNeedMTV, aMTV, aDifferentNetsOnly );
57  }
58 
59  return false;
60 }
bool collideSimple(const ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I &aMTV, bool aDifferentNetsOnly) const
Definition: pns_item.cpp:27
bool PNS::ITEM::Collide ( const ITEM aOther,
int  aClearance,
bool  aDifferentNetsOnly = true 
) const
inlineinherited

Function Collide()

A shortcut for ITEM::Colllide() without MTV stuff.

Definition at line 283 of file pns_item.h.

References PNS::ITEM::Collide(), and dummy().

284  {
285  VECTOR2I dummy;
286 
287  return Collide( aOther, aClearance, false, dummy, aDifferentNetsOnly );
288  }
virtual bool Collide(const ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I &aMTV, bool aDifferentNetsOnly=true) const
Function Collide()
Definition: pns_item.cpp:44
static LIB_PART * dummy()
Used when a LIB_PART is not found in library to draw a dummy shape This component is a 400 mils squar...
bool PNS::LINE::CompareGeometry ( const LINE aOther)

Returns true if the line is geometrically identical as line aOther

Definition at line 693 of file pns_line.cpp.

References SHAPE_LINE_CHAIN::CompareGeometry(), and m_line.

694 {
695  return m_line.CompareGeometry( aOther.m_line );
696 }
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
bool CompareGeometry(const SHAPE_LINE_CHAIN &aOther) const
bool PNS::LINE::ContainsSegment ( SEGMENT aSeg) const
inline

Checks if the segment aSeg is a part of the line.

Definition at line 197 of file pns_line.h.

References m_segmentRefs.

198  {
199  return std::find( m_segmentRefs.begin(), m_segmentRefs.end(),
200  aSeg ) != m_segmentRefs.end();
201  }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
void PNS::LINE::copyLinks ( const LINE aParent)
private

Copies m_segmentRefs from the line aParent.

Definition at line 118 of file pns_line.cpp.

References m_segmentRefs.

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

119 {
120  m_segmentRefs = aParent->m_segmentRefs;
121 }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
int PNS::LINE::CountCorners ( int  aAngles) const

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

Definition at line 138 of file pns_line.cpp.

References DIRECTION_45::Angle(), SHAPE_LINE_CHAIN::CSegment(), m_line, and SHAPE_LINE_CHAIN::SegmentCount().

Referenced by PNS::LINE_PLACER::mergeHead(), and PNS::OPTIMIZER::smartPadsSingle().

139 {
140  int count = 0;
141 
142  for( int i = 0; i < m_line.SegmentCount() - 1; i++ )
143  {
144  const SEG seg1 = m_line.CSegment( i );
145  const SEG seg2 = m_line.CSegment( i + 1 );
146 
147  const DIRECTION_45 dir1( seg1 );
148  const DIRECTION_45 dir2( seg2 );
149 
150  DIRECTION_45::AngleType a = dir1.Angle( dir2 );
151 
152  if( a & aAngles )
153  count++;
154  }
155 
156  return count;
157 }
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
const SEG CSegment(int aIndex) const
Function CSegment()
Class DIRECTION_45.
Definition: direction45.h:33
Definition: seg.h:37
AngleType
Enum AngleType Represents kind of angle formed by vectors heading in two DIRECTION_45s.
Definition: direction45.h:59
int SegmentCount() const
Function SegmentCount()
const VECTOR2I& PNS::LINE::CPoint ( int  aIdx) const
inline
const SEG PNS::LINE::CSegment ( int  aIdx) const
inline

Returns the aIdx-th segment of the line

Definition at line 147 of file pns_line.h.

References SHAPE_LINE_CHAIN::CSegment(), and m_line.

Referenced by PNS::SHOVE::checkBumpDirection(), PNS::DIFF_PAIR::EndingPrimitives(), PNS::LINE_PLACER::FixRoute(), PNS::OPTIMIZER::mergeStep(), PNS::LINE_PLACER::optimizeTailHeadTransition(), and PNS::SHOVE::ProcessSingleLine().

148  {
149  return m_line.CSegment( aIdx );
150  }
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
const SEG CSegment(int aIndex) const
Function CSegment()
void PNS::LINE::DragCorner ( const VECTOR2I aP,
int  aIndex,
int  aSnappingThreshold = 0 
)

Definition at line 408 of file pns_line.cpp.

References SHAPE_LINE_CHAIN::Append(), PNS::dragCornerInternal(), m_line, Reverse(), SHAPE_LINE_CHAIN::Reverse(), SHAPE_LINE_CHAIN::SegmentCount(), SHAPE_LINE_CHAIN::Simplify(), SHAPE_LINE_CHAIN::Slice(), and snapDraggedCorner().

Referenced by PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), and PNS::DRAGGER::dumbDragVia().

409 {
410  SHAPE_LINE_CHAIN path;
411 
412  VECTOR2I snapped = snapDraggedCorner( m_line, aP, aIndex, aSnappingThreshold );
413 
414  if( aIndex == 0 )
415  path = dragCornerInternal( m_line.Reverse(), snapped ).Reverse();
416  else if( aIndex == m_line.SegmentCount() )
417  path = dragCornerInternal( m_line, snapped );
418  else
419  {
420  // fixme: awkward behaviour for "outwards" drags
421  path = dragCornerInternal( m_line.Slice( 0, aIndex ), snapped );
422  SHAPE_LINE_CHAIN path_rev = dragCornerInternal( m_line.Slice( aIndex, -1 ).Reverse(),
423  snapped ).Reverse();
424  path.Append( path_rev );
425  }
426 
427  path.Simplify();
428  m_line = path;
429 }
const SHAPE_LINE_CHAIN Reverse() const
Function Reverse()
const SHAPE_LINE_CHAIN Slice(int aStartIndex, int aEndIndex=-1) const
Function Slice()
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
SHAPE_LINE_CHAIN dragCornerInternal(const SHAPE_LINE_CHAIN &aOrigin, const VECTOR2I &aP)
Definition: pns_line.cpp:339
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
SHAPE_LINE_CHAIN & Simplify()
Function Simplify()
void Reverse()
Reverses the point/vertex order
Definition: pns_line.cpp:699
VECTOR2I snapDraggedCorner(const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex, int aThreshold) const
Definition: pns_line.cpp:432
Class SHAPE_LINE_CHAIN.
int SegmentCount() const
Function SegmentCount()
void PNS::LINE::DragSegment ( const VECTOR2I aP,
int  aIndex,
int  aSnappingThreshold = 0 
)

Definition at line 520 of file pns_line.cpp.

References SEG::A, SHAPE_LINE_CHAIN::Append(), SEG::B, SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::CSegment(), SHAPE_LINE_CHAIN::Insert(), SEG::Intersect(), DIRECTION_45::IsObtuse(), DIRECTION_45::Left(), SHAPE_LINE_CHAIN::Length(), m_line, SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN::Remove(), SHAPE_LINE_CHAIN::Replace(), DIRECTION_45::Right(), SHAPE_LINE_CHAIN::SegmentCount(), SHAPE_LINE_CHAIN::Simplify(), snapToNeighbourSegments(), and DIRECTION_45::ToVector().

Referenced by PNS::DRAGGER::dragMarkObstacles(), and PNS::DRAGGER::dragShove().

521 {
522  SHAPE_LINE_CHAIN path( m_line );
523  VECTOR2I target( aP );
524 
525  SEG guideA[2], guideB[2];
526  int index = aIndex;
527 
528  target = snapToNeighbourSegments( path, aP, aIndex, aSnappingThreshold );
529 
530  if( index == 0 )
531  {
532  path.Insert( 0, path.CPoint( 0 ) );
533  index++;
534  }
535 
536  if( index == path.SegmentCount() - 1 )
537  {
538  path.Insert( path.PointCount() - 1, path.CPoint( -1 ) );
539  }
540 
541  SEG dragged = path.CSegment( index );
542  DIRECTION_45 drag_dir( dragged );
543 
544  SEG s_prev = path.CSegment( index - 1 );
545  SEG s_next = path.CSegment( index + 1 );
546 
547  DIRECTION_45 dir_prev( s_prev );
548  DIRECTION_45 dir_next( s_next );
549 
550  if( dir_prev == drag_dir )
551  {
552  dir_prev = dir_prev.Left();
553  path.Insert( index, path.CPoint( index ) );
554  index++;
555  }
556 
557  if( dir_next == drag_dir )
558  {
559  dir_next = dir_next.Right();
560  path.Insert( index + 1, path.CPoint( index + 1 ) );
561  }
562 
563  s_prev = path.CSegment( index - 1 );
564  s_next = path.CSegment( index + 1 );
565  dragged = path.CSegment( index );
566 
567  const bool lockEndpointA = true;
568  const bool lockEndpointB = true;
569 
570  if( aIndex == 0 )
571  {
572  if( !lockEndpointA )
573  {
574  guideA[0] = guideA[1] = SEG( dragged.A,
575  dragged.A + drag_dir.Right().Right().ToVector() );
576  }
577  else
578  {
579  guideA[0] = SEG( dragged.A, dragged.A + drag_dir.Right().ToVector() );
580  guideA[1] = SEG( dragged.A, dragged.A + drag_dir.Left().ToVector() );
581  }
582  }
583  else
584  {
585  if( dir_prev.IsObtuse(drag_dir ) )
586  {
587  guideA[0] = SEG( s_prev.A, s_prev.A + drag_dir.Left().ToVector() );
588  guideA[1] = SEG( s_prev.A, s_prev.A + drag_dir.Right().ToVector() );
589  }
590  else
591  guideA[0] = guideA[1] = SEG( dragged.A, dragged.A + dir_prev.ToVector() );
592  }
593 
594  if( aIndex == m_line.SegmentCount() - 1 )
595  {
596  if( !lockEndpointB )
597  {
598  guideB[0] = guideB[1] = SEG( dragged.B,
599  dragged.B + drag_dir.Right().Right().ToVector() );
600  }
601  else
602  {
603  guideB[0] = SEG( dragged.B, dragged.B + drag_dir.Right().ToVector() );
604  guideB[1] = SEG( dragged.B, dragged.B + drag_dir.Left().ToVector() );
605  }
606  }
607  else
608  {
609  if( dir_next.IsObtuse( drag_dir ) )
610  {
611  guideB[0] = SEG( s_next.B, s_next.B + drag_dir.Left().ToVector() );
612  guideB[1] = SEG( s_next.B, s_next.B + drag_dir.Right().ToVector() );
613  }
614  else
615  guideB[0] = guideB[1] = SEG( dragged.B, dragged.B + dir_next.ToVector() );
616  }
617 
618  SEG s_current( target, target + drag_dir.ToVector() );
619 
620  int best_len = INT_MAX;
621  SHAPE_LINE_CHAIN best;
622 
623  for( int i = 0; i < 2; i++ )
624  {
625  for( int j = 0; j < 2; j++ )
626  {
627  OPT_VECTOR2I ip1 = s_current.IntersectLines( guideA[i] );
628  OPT_VECTOR2I ip2 = s_current.IntersectLines( guideB[j] );
629 
630  SHAPE_LINE_CHAIN np;
631 
632  if( !ip1 || !ip2 )
633  continue;
634 
635  SEG s1( s_prev.A, *ip1 );
636  SEG s2( *ip1, *ip2 );
637  SEG s3( *ip2, s_next.B );
638 
639  OPT_VECTOR2I ip;
640 
641  if( (ip = s1.Intersect( s_next )) )
642  {
643  np.Append( s1.A );
644  np.Append( *ip );
645  np.Append( s_next.B );
646  }
647  else if( (ip = s3.Intersect( s_prev )) )
648  {
649  np.Append( s_prev.A );
650  np.Append( *ip );
651  np.Append( s3.B );
652  }
653  else if( (ip = s1.Intersect( s3 )) )
654  {
655  np.Append( s_prev.A );
656  np.Append( *ip );
657  np.Append( s_next.B );
658  }
659  else
660  {
661  np.Append( s_prev.A );
662  np.Append( *ip1 );
663  np.Append( *ip2 );
664  np.Append( s_next.B );
665  }
666 
667  if( np.Length() < best_len )
668  {
669  best_len = np.Length();
670  best = np;
671  }
672  }
673  }
674 
675  if( !lockEndpointA && aIndex == 0 )
676  best.Remove( 0, 0 );
677  if( !lockEndpointB && aIndex == m_line.SegmentCount() - 1 )
678  best.Remove( -1, -1 );
679 
680  if( m_line.PointCount() == 1 )
681  m_line = best;
682  else if( aIndex == 0 )
683  m_line.Replace( 0, 1, best );
684  else if( aIndex == m_line.SegmentCount() - 1 )
685  m_line.Replace( -2, -1, best );
686  else
687  m_line.Replace( aIndex, aIndex + 1, best );
688 
689  m_line.Simplify();
690 }
int PointCount() const
Function PointCount()
VECTOR2I snapToNeighbourSegments(const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex, int aThreshold) const
Definition: pns_line.cpp:474
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
SHAPE_LINE_CHAIN & Simplify()
Function Simplify()
Class DIRECTION_45.
Definition: direction45.h:33
void Remove(int aStartIndex, int aEndIndex)
Function Remove()
Definition: seg.h:37
Class SHAPE_LINE_CHAIN.
VECTOR2I A
Definition: seg.h:47
void Replace(int aStartIndex, int aEndIndex, const VECTOR2I &aP)
Function Replace()
int SegmentCount() const
Function SegmentCount()
int Length() const
Function Length()
VECTOR2I B
Definition: seg.h:48
SEGMENT* PNS::LINE::GetLink ( int  aIndex) const
inline

Definition at line 203 of file pns_line.h.

References m_segmentRefs.

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

204  {
205  return m_segmentRefs[aIndex];
206  }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
bool PNS::LINE::HasLockedSegments ( ) const

Definition at line 883 of file pns_line.cpp.

References m_segmentRefs, and PNS::MK_LOCKED.

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

884 {
885  for( const SEGMENT* seg : m_segmentRefs )
886  {
887  if( seg->Marker() & MK_LOCKED )
888  return true;
889  }
890  return false;
891 }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
Struct SEGMENT is a simple container used when filling areas with segments.
Definition: class_zone.h:57
bool PNS::LINE::HasLoops ( ) const

Definition at line 769 of file pns_line.cpp.

References abs, CPoint(), and PointCount().

Referenced by PNS::SHOVE::onCollidingSolid(), and PNS::LINE_PLACER::rhShoveOnly().

770 {
771  for( int i = 0; i < PointCount(); i++ )
772  {
773  for( int j = 0; j < PointCount(); j++ )
774  {
775  if( ( std::abs( i - j ) > 1 ) && CPoint( i ) == CPoint( j ) )
776  return true;
777  }
778  }
779 
780  return false;
781 }
#define abs(a)
Definition: auxiliary.h:84
int PointCount() const
Returns the number of points in the line
Definition: pns_line.h:135
const VECTOR2I & CPoint(int aIdx) const
Returns the aIdx-th point of the line
Definition: pns_line.h:141
virtual const SHAPE_LINE_CHAIN PNS::ITEM::Hull ( int  aClearance = 0,
int  aWalkaroundThickness = 0 
) const
inlinevirtualinherited

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

Definition at line 110 of file pns_item.h.

111  {
112  return SHAPE_LINE_CHAIN();
113  }
Class SHAPE_LINE_CHAIN.
bool PNS::LINE::Is45Degree ( ) const

Definition at line 273 of file pns_line.cpp.

References SEG::A, PNS::angle(), SEG::B, SHAPE_LINE_CHAIN::CSegment(), SEG::Length(), m_line, SHAPE_LINE_CHAIN::SegmentCount(), VECTOR2< T >::x, and VECTOR2< T >::y.

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

274 {
275  for( int i = 0; i < m_line.SegmentCount(); i++ )
276  {
277  const SEG& s = m_line.CSegment( i );
278 
279  if( s.Length() < 10 )
280  continue;
281 
282  double angle = 180.0 / M_PI *
283  atan2( (double) s.B.y - (double) s.A.y,
284  (double) s.B.x - (double) s.A.x );
285 
286  if( angle < 0 )
287  angle += 360.0;
288 
289  double angle_a = fabs( fmod( angle, 45.0 ) );
290 
291  if( angle_a > 1.0 && angle_a < 44.0 )
292  return false;
293  }
294 
295  return true;
296 }
int Length() const
Function Length()
Definition: seg.h:283
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
const SEG CSegment(int aIndex) const
Function CSegment()
Definition: seg.h:37
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
VECTOR2I A
Definition: seg.h:47
int SegmentCount() const
Function SegmentCount()
VECTOR2I B
Definition: seg.h:48
bool PNS::LINE::IsLinked ( ) const
inline

Definition at line 186 of file pns_line.h.

References m_segmentRefs.

Referenced by PNS::NODE::Add(), ClipVertexRange(), PNS::TOPOLOGY::followTrivialPath(), IsLinkedChecked(), PNS::DIFF_PAIR::NLine(), PNS::DIFF_PAIR::PLine(), Rank(), PNS::OPTIMIZER::removeCachedSegments(), ShowLinks(), and PNS::TOPOLOGY::SimplifyLine().

187  {
188  return m_segmentRefs.size() != 0;
189  }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
bool PNS::LINE::IsLinkedChecked ( ) const
inline

Definition at line 191 of file pns_line.h.

References IsLinked(), LinkCount(), and SegmentCount().

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

192  {
193  return IsLinked() && LinkCount() == SegmentCount();
194  }
int SegmentCount() const
Returns the number of segments in the line
Definition: pns_line.h:129
int LinkCount() const
Returns the number of segments that were assembled together to form this line.
Definition: pns_line.h:212
bool IsLinked() const
Definition: pns_line.h:186
bool PNS::ITEM::IsLocked ( ) const
inlineinherited

Definition at line 336 of file pns_item.h.

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

Referenced by ROUTER_TOOL::InlineDrag(), ROUTER_TOOL::performDragging(), and PNS::SHOVE::pushVia().

337  {
338  return Marker() & MK_LOCKED;
339  }
virtual int Marker() const
Definition: pns_item.h:311
const std::string PNS::ITEM::KindStr ( ) const
inherited

Function KindStr()

Returns the kind of the item, as string

Definition at line 63 of file pns_item.cpp.

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

64 {
65  switch( m_kind )
66  {
67  case LINE_T:
68  return "line";
69 
70  case SEGMENT_T:
71  return "segment";
72 
73  case VIA_T:
74  return "via";
75 
76  case JOINT_T:
77  return "joint";
78 
79  case SOLID_T:
80  return "solid";
81 
82  default:
83  return "unknown";
84  }
85 }
PnsKind m_kind
Definition: pns_item.h:346
virtual int PNS::ITEM::Layer ( ) const
inlinevirtualinherited

Function Layer()

Returns the item's layer, for single-layered items only.

Reimplemented in PNS::SEGMENT.

Definition at line 217 of file pns_item.h.

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

Referenced by PNS::OPTIMIZER::fanoutCleanup(), and PNS::OPTIMIZER::runSmartPads().

218  {
219  return Layers().Start();
220  }
const LAYER_RANGE & Layers() const
Function Layers()
Definition: pns_item.h:207
int Start() const
Definition: pns_layerset.h:83
bool PNS::ITEM::LayersOverlap ( const ITEM aOther) const
inlineinherited

Function LayersOverlap()

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

Definition at line 228 of file pns_item.h.

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

Referenced by PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::ProcessSingleLine(), and PNS::NODE::removeViaIndex().

229  {
230  return Layers().Overlaps( aOther->Layers() );
231  }
const LAYER_RANGE & Layers() const
Function Layers()
Definition: pns_item.h:207
bool Overlaps(const LAYER_RANGE &aOther) const
Definition: pns_layerset.h:68
int PNS::LINE::LinkCount ( ) const
inline

Returns the number of segments that were assembled together to form this line.

Definition at line 212 of file pns_line.h.

References m_segmentRefs.

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

213  {
214  return m_segmentRefs.size();
215  }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
SEGMENT_REFS& PNS::LINE::LinkedSegments ( )
inline

Returns the list of segments from the owning node that constitute this line (or NULL if the line is not linked)

Definition at line 181 of file pns_line.h.

References m_segmentRefs.

Referenced by PNS::NODE::Dump(), PNS::TOPOLOGY::followTrivialPath(), PNS::SHOVE::popLine(), PNS::SHOVE::ProcessSingleLine(), PNS::NODE::Remove(), PNS::OPTIMIZER::removeCachedSegments(), and PNS::SHOVE::unwindStack().

182  {
183  return m_segmentRefs;
184  }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
void PNS::LINE::LinkSegment ( SEGMENT aSeg)
inline

Adds a reference to a segment registered in a NODE that is a part of this line.

Definition at line 174 of file pns_line.h.

References m_segmentRefs.

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

175  {
176  m_segmentRefs.push_back( aSeg );
177  }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
void PNS::LINE::Mark ( int  aMarker)
overridevirtual

Reimplemented from PNS::ITEM.

Definition at line 86 of file pns_line.cpp.

References PNS::ITEM::m_marker, and m_segmentRefs.

Referenced by PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::ProcessSingleLine(), PNS::SHOVE::ShoveLines(), and PNS::SHOVE::ShoveMultiLines().

87 {
88  m_marker = aMarker;
89 
90  for( SEGMENT* s : m_segmentRefs )
91  s->Mark( aMarker );
92 
93 }
int m_marker
Definition: pns_item.h:354
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
Struct SEGMENT is a simple container used when filling areas with segments.
Definition: class_zone.h:57
int PNS::LINE::Marker ( ) const
overridevirtual

Reimplemented from PNS::ITEM.

Definition at line 105 of file pns_line.cpp.

References PNS::ITEM::m_marker, and m_segmentRefs.

Referenced by PNS::SHOVE::onCollidingLine(), PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::processHullSet(), PNS::SHOVE::ProcessSingleLine(), PNS::SHOVE::runOptimizer(), and PNS::SEGMENT::SEGMENT().

106 {
107  int marker = m_marker;
108 
109  for( SEGMENT* s : m_segmentRefs )
110  {
111  marker |= s->Marker();
112  }
113 
114  return marker;
115 }
int m_marker
Definition: pns_item.h:354
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
Struct SEGMENT is a simple container used when filling areas with segments.
Definition: class_zone.h:57
const LINE & PNS::LINE::operator= ( const LINE aOther)

Definition at line 60 of file pns_line.cpp.

References copyLinks(), m_hasVia, PNS::ITEM::m_layers, m_line, PNS::ITEM::m_marker, PNS::ITEM::m_movable, PNS::ITEM::m_net, PNS::ITEM::m_rank, m_via, and m_width.

61 {
62  m_line = aOther.m_line;
63  m_width = aOther.m_width;
64  m_net = aOther.m_net;
65  m_movable = aOther.m_movable;
66  m_layers = aOther.m_layers;
67  m_via = aOther.m_via;
68  m_hasVia = aOther.m_hasVia;
69  m_marker = aOther.m_marker;
70  m_rank = aOther.m_rank;
71 
72  copyLinks( &aOther );
73 
74  return *this;
75 }
VIA m_via
Via at the end point, if m_hasVia == true
Definition: pns_line.h:294
LAYER_RANGE m_layers
Definition: pns_item.h:350
int m_rank
Definition: pns_item.h:355
bool m_movable
Definition: pns_item.h:352
int m_marker
Definition: pns_item.h:354
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
void copyLinks(const LINE *aParent)
Copies m_segmentRefs from the line aParent.
Definition: pns_line.cpp:118
bool m_hasVia
If true, the line ends with a via
Definition: pns_line.h:291
int m_net
Definition: pns_item.h:353
int m_width
our width
Definition: pns_line.h:288
NODE* PNS::ITEM::Owner ( ) const
inlineinherited

Function Owner()

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

Definition at line 259 of file pns_item.h.

References PNS::ITEM::m_owner.

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

259 { return m_owner; }
NODE * m_owner
Definition: pns_item.h:349
BOARD_CONNECTED_ITEM* PNS::ITEM::Parent ( ) const
inlineinherited

Function Parent()

Returns the corresponding parent object in the host application's model.

Definition at line 157 of file pns_item.h.

References PNS::ITEM::m_parent.

Referenced by PNS_PCBNEW_RULE_RESOLVER::DpNetPair(), PNS_KICAD_IFACE::HideItem(), PNS_PCBNEW_RULE_RESOLVER::localPadClearance(), ROUTER_TOOL::prepareInteractive(), and PNS_KICAD_IFACE::RemoveItem().

158  {
159  return m_parent;
160  }
BOARD_CONNECTED_ITEM * m_parent
Definition: pns_item.h:348
int PNS::LINE::PointCount ( ) const
inline

Returns the number of points in the line

Definition at line 135 of file pns_line.h.

References m_line, and SHAPE_LINE_CHAIN::PointCount().

Referenced by PNS::OPTIMIZER::fanoutCleanup(), HasLoops(), PNS::TOPOLOGY::LeadingRatLine(), PNS::LINE_PLACER::Move(), PNS::OPTIMIZER::removeCachedSegments(), PNS::LINE_PLACER::rhShoveOnly(), PNS::WALKAROUND::Route(), PNS::TOPOLOGY::SimplifyLine(), and PNS::LINE_PLACER::simplifyNewLine().

136  {
137  return m_line.PointCount();
138  }
int PointCount() const
Function PointCount()
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
int PNS::LINE::Rank ( ) const
overridevirtual

Reimplemented from PNS::ITEM.

Definition at line 730 of file pns_line.cpp.

References IsLinked(), PNS::ITEM::m_rank, m_segmentRefs, and min.

Referenced by PNS::SHOVE::onCollidingLine(), PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onCollidingVia(), PNS::SHOVE::onReverseCollidingVia(), PNS::SEGMENT::SEGMENT(), and PNS::SHOVE::shoveIteration().

731 {
732  int min_rank = INT_MAX;
733 
734  if( IsLinked() ) {
735  for( SEGMENT *s : m_segmentRefs )
736  {
737  min_rank = std::min( min_rank, s->Rank() );
738  }
739  } else {
740  min_rank = m_rank;
741  }
742 
743  int rank = ( min_rank == INT_MAX ) ? -1 : min_rank;
744 
745  return rank;
746 }
int m_rank
Definition: pns_item.h:355
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
Struct SEGMENT is a simple container used when filling areas with segments.
Definition: class_zone.h:57
#define min(a, b)
Definition: auxiliary.h:85
bool IsLinked() const
Definition: pns_line.h:186
void PNS::LINE::RemoveVia ( )
inline

Definition at line 251 of file pns_line.h.

References m_hasVia.

Referenced by ClipToNearestObstacle(), PNS::LINE_PLACER::initPlacement(), PNS::SHOVE::onReverseCollidingVia(), and PNS::LINE_PLACER::ToggleVia().

251 { m_hasVia = false; }
bool m_hasVia
If true, the line ends with a via
Definition: pns_line.h:291
void PNS::LINE::Reverse ( )

Reverses the point/vertex order

Definition at line 699 of file pns_line.cpp.

References m_line, m_segmentRefs, SHAPE_LINE_CHAIN::Reverse(), and reverse().

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

700 {
701  m_line = m_line.Reverse();
702 
703  std::reverse( m_segmentRefs.begin(), m_segmentRefs.end() );
704 }
const SHAPE_LINE_CHAIN Reverse() const
Function Reverse()
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
static void reverse(privcurve_t *curve)
Definition: trace.cpp:1020
void PNS::ITEM::SetLayer ( int  aLayer)
inlineinherited

Function SetLayer()

Sets the layers spanned by the item to a single layer aLayer.

Definition at line 197 of file pns_item.h.

References PNS::ITEM::m_layers.

Referenced by PNS::LINE_PLACER::initPlacement(), PNS::DIFF_PAIR_PLACER::propagateDpHeadForces(), PNS::DIFF_PAIR_PLACER::routeHead(), and PNS::DIFF_PAIR::updateLine().

198  {
199  m_layers = LAYER_RANGE( aLayer, aLayer );
200  }
LAYER_RANGE m_layers
Definition: pns_item.h:350
Class LAYER_RANGE.
Definition: pns_layerset.h:32
void PNS::ITEM::SetLayers ( const LAYER_RANGE aLayers)
inlineinherited

Function SetLayers()

Sets the layers spanned by the item to aLayers.

Definition at line 187 of file pns_item.h.

References PNS::ITEM::m_layers.

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

188  {
189  m_layers = aLayers;
190  }
LAYER_RANGE m_layers
Definition: pns_item.h:350
void PNS::ITEM::SetNet ( int  aNet)
inlineinherited
void PNS::ITEM::SetOwner ( NODE aOwner)
inlineinherited

Functon SetOwner()

Sets the node that owns this item. An item can belong to a single NODE or stay unowned.

Definition at line 239 of file pns_item.h.

References PNS::ITEM::m_owner.

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

240  {
241  m_owner = aOwner;
242  }
NODE * m_owner
Definition: pns_item.h:349
void PNS::ITEM::SetParent ( BOARD_CONNECTED_ITEM aParent)
inlineinherited

Function SetParent()

Sets the corresponding parent object in the host application's model.

Definition at line 147 of file pns_item.h.

References PNS::ITEM::m_parent.

Referenced by PNS_KICAD_IFACE::AddItem().

148  {
149  m_parent = aParent;
150  }
BOARD_CONNECTED_ITEM * m_parent
Definition: pns_item.h:348
void PNS::LINE::SetRank ( int  aRank)
overridevirtual

Reimplemented from PNS::ITEM.

Definition at line 720 of file pns_line.cpp.

References PNS::ITEM::m_rank, and m_segmentRefs.

Referenced by PNS::SHOVE::onCollidingLine(), PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onReverseCollidingVia(), PNS::SHOVE::ShoveLines(), and PNS::SHOVE::ShoveMultiLines().

721 {
722  m_rank = aRank;
723 
724  for( SEGMENT* s : m_segmentRefs )
725  s->SetRank( aRank );
726 
727 }
int m_rank
Definition: pns_item.h:355
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
Struct SEGMENT is a simple container used when filling areas with segments.
Definition: class_zone.h:57
void PNS::LINE::SetWidth ( int  aWidth)
inline

Sets line width

Definition at line 153 of file pns_line.h.

References m_width.

Referenced by PNS::NODE::AssembleLine(), PNS::LINE_PLACER::initPlacement(), and PNS::DIFF_PAIR::updateLine().

154  {
155  m_width = aWidth;
156  }
int m_width
our width
Definition: pns_line.h:288
const SHAPE* PNS::LINE::Shape ( ) const
inlineoverridevirtual

Returns the shape of the line

Reimplemented from PNS::ITEM.

Definition at line 111 of file pns_line.h.

References m_line.

Referenced by PNS::LOGGER::Log(), and PNS::SHOVE::onCollidingVia().

112  {
113  return &m_line;
114  }
SHAPE_LINE_CHAIN m_line
The actual shape of the line
Definition: pns_line.h:285
void PNS::LINE::ShowLinks ( ) const

Prints out all linked segments

Definition at line 325 of file pns_line.cpp.

References IsLinked(), and m_segmentRefs.

326 {
327  if( !IsLinked() )
328  {
329  wxLogTrace( "PNS", "line %p: no links", this );
330  return;
331  }
332 
333  wxLogTrace( "PNS", "line %p: %d linked segs", this, (int) m_segmentRefs.size() );
334 
335  for( int i = 0; i < (int) m_segmentRefs.size(); i++ )
336  wxLogTrace( "PNS", "seg %d: %p\n", i, m_segmentRefs[i] );
337 }
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
bool IsLinked() const
Definition: pns_line.h:186
VECTOR2I PNS::LINE::snapDraggedCorner ( const SHAPE_LINE_CHAIN aPath,
const VECTOR2I aP,
int  aIndex,
int  aThreshold 
) const
private

Definition at line 432 of file pns_line.cpp.

References SHAPE_LINE_CHAIN::CSegment(), dist, EuclideanNorm(), SEG::IntersectLines(), max, min, and SHAPE_LINE_CHAIN::SegmentCount().

Referenced by DragCorner().

434 {
435  int s_start = std::max( aIndex - 2, 0 );
436  int s_end = std::min( aIndex + 2, aPath.SegmentCount() - 1 );
437 
438  int i, j;
439  int best_dist = INT_MAX;
440  VECTOR2I best_snap = aP;
441 
442  if( aThreshold <= 0 )
443  return aP;
444 
445  for( i = s_start; i <= s_end; i++ )
446  {
447  const SEG& a = aPath.CSegment( i );
448 
449  for( j = s_start; j < i; j++ )
450  {
451  const SEG& b = aPath.CSegment( j );
452 
453  if( !( DIRECTION_45( a ).IsObtuse(DIRECTION_45( b ) ) ) )
454  continue;
455 
456  OPT_VECTOR2I ip = a.IntersectLines(b);
457 
458  if( ip )
459  {
460  int dist = ( *ip - aP ).EuclideanNorm();
461 
462  if( dist < aThreshold && dist < best_dist )
463  {
464  best_dist = dist;
465  best_snap = *ip;
466  }
467  }
468  }
469  }
470 
471  return best_snap;
472 }
double EuclideanNorm(const wxPoint &vector)
Euclidean norm of a 2D vector.
Definition: trigo.h:104
OPT_VECTOR2I IntersectLines(const SEG &aSeg) const
Function IntersectLines()
Definition: seg.h:170
static const int dist[10][10]
Definition: dist.cpp:57
const SEG CSegment(int aIndex) const
Function CSegment()
Class DIRECTION_45.
Definition: direction45.h:33
Definition: seg.h:37
#define max(a, b)
Definition: auxiliary.h:86
int SegmentCount() const
Function SegmentCount()
#define min(a, b)
Definition: auxiliary.h:85
VECTOR2I PNS::LINE::snapToNeighbourSegments ( const SHAPE_LINE_CHAIN aPath,
const VECTOR2I aP,
int  aIndex,
int  aThreshold 
) const
private

Definition at line 474 of file pns_line.cpp.

References SEG::A, SHAPE_LINE_CHAIN::CSegment(), SEG::LineDistance(), and SHAPE_LINE_CHAIN::SegmentCount().

Referenced by DragSegment().

476 {
477  VECTOR2I snap_p[2];
478  DIRECTION_45 dragDir( aPath.CSegment( aIndex ) );
479  int snap_d[2] = { -1, -1 };
480 
481  if( aThreshold == 0 )
482  return aP;
483 
484  if( aIndex >= 2 )
485  {
486  SEG s = aPath.CSegment( aIndex - 2 );
487 
488  if( DIRECTION_45( s ) == dragDir )
489  snap_d[0] = s.LineDistance( aP );
490 
491  snap_p[0] = s.A;
492  }
493 
494  if( aIndex < aPath.SegmentCount() - 2 )
495  {
496  SEG s = aPath.CSegment( aIndex + 2 );
497 
498  if( DIRECTION_45( s ) == dragDir )
499  snap_d[1] = s.LineDistance(aP);
500 
501  snap_p[1] = s.A;
502  }
503 
504  VECTOR2I best = aP;
505  int minDist = INT_MAX;
506 
507  for( int i = 0; i < 2; i++ )
508  {
509  if( snap_d[i] >= 0 && snap_d[i] < minDist && snap_d[i] <= aThreshold )
510  {
511  minDist = snap_d[i];
512  best = snap_p[i];
513  }
514  }
515 
516  return best;
517 }
const SEG CSegment(int aIndex) const
Function CSegment()
Class DIRECTION_45.
Definition: direction45.h:33
int LineDistance(const VECTOR2I &aP, bool aDetermineSide=false) const
Function LineDistance()
Definition: seg.h:338
Definition: seg.h:37
VECTOR2I A
Definition: seg.h:47
int SegmentCount() const
Function SegmentCount()
void PNS::LINE::Unmark ( int  aMarker = -1)
overridevirtual

Reimplemented from PNS::ITEM.

Definition at line 96 of file pns_line.cpp.

References PNS::ITEM::m_marker, and m_segmentRefs.

Referenced by PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), and PNS::SHOVE::onCollidingSolid().

97 {
98  for( SEGMENT* s : m_segmentRefs )
99  s->Unmark( aMarker );
100 
101  m_marker = 0;
102 }
int m_marker
Definition: pns_item.h:354
SEGMENT_REFS m_segmentRefs
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is...
Definition: pns_line.h:282
Struct SEGMENT is a simple container used when filling areas with segments.
Definition: class_zone.h:57
bool PNS::LINE::Walkaround ( SHAPE_LINE_CHAIN  aObstacle,
SHAPE_LINE_CHAIN aPre,
SHAPE_LINE_CHAIN aWalk,
SHAPE_LINE_CHAIN aPost,
bool  aCw 
) const

Calculates a line thightly wrapping a convex hull of an obstacle object (aObstacle).

aPrePath = path from origin to the obstacle aWalkaroundPath = path around the obstacle aPostPath = past from obstacle till the end aCW = whether to walk around in clockwise or counter-clockwise direction.

Definition at line 160 of file pns_line.cpp.

References SHAPE_LINE_CHAIN::Append(), SHAPE_LINE_CHAIN::Clear(), CLine(), SHAPE_LINE_CHAIN::CPoint(), dist, SHAPE_LINE_CHAIN::Find(), SEG::Index(), SHAPE_LINE_CHAIN::Intersect(), SHAPE_LINE_CHAIN::INTERSECTION::our, SHAPE_LINE_CHAIN::INTERSECTION::p, SHAPE_LINE_CHAIN::PathLength(), SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN::PointInside(), SHAPE_LINE_CHAIN::SegmentCount(), SHAPE_LINE_CHAIN::SetClosed(), SHAPE_LINE_CHAIN::Simplify(), SHAPE_LINE_CHAIN::Slice(), SHAPE_LINE_CHAIN::Split(), and SHAPE_LINE_CHAIN::INTERSECTION::their.

Referenced by PNS::SHOVE::processHullSet(), PNS::WALKAROUND::singleStep(), Walkaround(), and PNS::SHOVE::walkaroundLoneVia().

162 {
163  const SHAPE_LINE_CHAIN& line( CLine() );
164  VECTOR2I ip_start;
165  VECTOR2I ip_end;
166 
167  if( line.SegmentCount() < 1 )
168  return false;
169 
170  if( aObstacle.PointInside( line.CPoint( 0 ) ) || aObstacle.PointInside( line.CPoint( -1 ) ) )
171  return false;
172 
174 
175  line.Intersect( aObstacle, ips );
176 
177  aWalk.Clear();
178  aPost.Clear();
179 
180  int nearest_dist = INT_MAX;
181  int farthest_dist = 0;
182 
183  SHAPE_LINE_CHAIN::INTERSECTION nearest, farthest;
184 
185  for( int i = 0; i < (int) ips.size(); i++ )
186  {
187  const VECTOR2I p = ips[i].p;
188  int dist = line.PathLength( p );
189 
190  if( dist < 0 )
191  return false;
192 
193  if( dist <= nearest_dist )
194  {
195  nearest_dist = dist;
196  nearest = ips[i];
197  }
198 
199  if( dist >= farthest_dist )
200  {
201  farthest_dist = dist;
202  farthest = ips[i];
203  }
204  }
205 
206  if( ips.size() <= 1 || nearest.p == farthest.p )
207  {
208  aPre = line;
209  return true;
210  }
211 
212  aPre = line.Slice( 0, nearest.our.Index() );
213  aPre.Append( nearest.p );
214  aPre.Simplify();
215 
216  aWalk.Clear();
217  aWalk.SetClosed( false );
218  aWalk.Append( nearest.p );
219 
220  assert( nearest.their.Index() >= 0 );
221  assert( farthest.their.Index() >= 0 );
222 
223  assert( nearest_dist <= farthest_dist );
224 
225  aObstacle.Split( nearest.p );
226  aObstacle.Split( farthest.p );
227 
228  int i_first = aObstacle.Find( nearest.p );
229  int i_last = aObstacle.Find( farthest.p );
230 
231  int i = i_first;
232 
233  while( i != i_last )
234  {
235  aWalk.Append( aObstacle.CPoint( i ) );
236  i += ( aCw ? 1 : -1 );
237 
238  if( i < 0 )
239  i = aObstacle.PointCount() - 1;
240  else if( i == aObstacle.PointCount() )
241  i = 0;
242  }
243 
244  aWalk.Append( farthest.p );
245  aWalk.Simplify();
246 
247  aPost.Clear();
248  aPost.Append( farthest.p );
249  aPost.Append( line.Slice( farthest.our.Index() + 1, -1 ) );
250  aPost.Simplify();
251 
252  return true;
253 }
const SHAPE_LINE_CHAIN & CLine() const
Const accessor to the underlying shape
Definition: pns_line.h:123
int Index() const
Function Index()
Definition: seg.h:301
bool PointInside(const VECTOR2I &aP) const
Function PointInside()
int Split(const VECTOR2I &aP)
Function Split()
std::vector< INTERSECTION > INTERSECTIONS
int PointCount() const
Function PointCount()
VECTOR2I p
point of intersection between our and their.
static const int dist[10][10]
Definition: dist.cpp:57
const SHAPE_LINE_CHAIN Slice(int aStartIndex, int aEndIndex=-1) const
Function Slice()
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
SHAPE_LINE_CHAIN & Simplify()
Function Simplify()
void SetClosed(bool aClosed)
Function SetClosed()
int Find(const VECTOR2I &aP) const
Function Find()
SEG their
segment belonging from the aOther argument of Intersect()
Class SHAPE_LINE_CHAIN.
void Clear()
Function Clear() Removes all points from the line chain.
SEG our
segment belonging from the (this) argument of Intersect()
const VECTOR2I & CPoint(int aIndex) const
Function CPoint()
void PNS::LINE::Walkaround ( const SHAPE_LINE_CHAIN aObstacle,
SHAPE_LINE_CHAIN aPath,
bool  aCw 
) const

Definition at line 256 of file pns_line.cpp.

References SHAPE_LINE_CHAIN::Append(), SHAPE_LINE_CHAIN::Simplify(), and Walkaround().

257 {
258  SHAPE_LINE_CHAIN walk, post;
259 
260  Walkaround( aObstacle, aPath, walk, post, aCw );
261  aPath.Append( walk );
262  aPath.Append( post );
263  aPath.Simplify();
264 }
bool Walkaround(SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN &aPre, SHAPE_LINE_CHAIN &aWalk, SHAPE_LINE_CHAIN &aPost, bool aCw) const
Calculates a line thightly wrapping a convex hull of an obstacle object (aObstacle).
Definition: pns_line.cpp:160
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
SHAPE_LINE_CHAIN & Simplify()
Function Simplify()
Class SHAPE_LINE_CHAIN.

Member Data Documentation

bool PNS::LINE::m_hasVia
private

If true, the line ends with a via

Definition at line 291 of file pns_line.h.

Referenced by AppendVia(), EndsWithVia(), LINE(), operator=(), and RemoveVia().

PnsKind PNS::ITEM::m_kind
protectedinherited
bool PNS::ITEM::m_movable
protectedinherited

Definition at line 352 of file pns_item.h.

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

NODE* PNS::ITEM::m_owner
protectedinherited
BOARD_CONNECTED_ITEM* PNS::ITEM::m_parent
protectedinherited

Definition at line 348 of file pns_item.h.

Referenced by PNS::ITEM::ITEM(), PNS::ITEM::Parent(), and PNS::ITEM::SetParent().

SEGMENT_REFS PNS::LINE::m_segmentRefs
private

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 282 of file pns_line.h.

Referenced by ClearSegmentLinks(), ClipVertexRange(), ContainsSegment(), copyLinks(), GetLink(), HasLockedSegments(), IsLinked(), LinkCount(), LinkedSegments(), LinkSegment(), Mark(), Marker(), Rank(), Reverse(), SetRank(), ShowLinks(), and Unmark().

VIA PNS::LINE::m_via
private

Via at the end point, if m_hasVia == true

Definition at line 294 of file pns_line.h.

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

int PNS::LINE::m_width
private

our width

Definition at line 288 of file pns_line.h.

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

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

Definition at line 56 of file pns_item.h.

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


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