KiCad PCB EDA Suite
PNS::SOLID Class Reference

#include <pns_solid.h>

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

 SOLID ()
 
 ~SOLID ()
 
 SOLID (const SOLID &aSolid)
 
ITEMClone () const override
 Return a deep copy of the item. More...
 
const SHAPEShape () const override
 Return the geometrical shape of the item. More...
 
const SHAPEHole () const override
 
const SHAPE_LINE_CHAIN Hull (int aClearance=0, int aWalkaroundThickness=0, int aLayer=-1) const override
 
const SHAPE_LINE_CHAIN HoleHull (int aClearance, int aWalkaroundThickness, int aLayer) const override
 
void SetShape (SHAPE *shape)
 
void SetHole (SHAPE *shape)
 
const VECTOR2IPos () const
 
void SetPos (const VECTOR2I &aCenter)
 
int GetPadToDie () const
 
void SetPadToDie (int aLen)
 
virtual VECTOR2I Anchor (int aN) const override
 
virtual int AnchorCount () const override
 
VECTOR2I Offset () const
 
void SetOffset (const VECTOR2I &aOffset)
 
double GetOrientation () const
 
void SetOrientation (double aOrientation)
 
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 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
 

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
 

Private Attributes

VECTOR2I m_pos
 
SHAPEm_shape
 
SHAPEm_hole
 
VECTOR2I m_offset
 
int m_padToDie
 
double m_orientation
 

Detailed Description

Definition at line 35 of file pns_solid.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

◆ SOLID() [1/2]

PNS::SOLID::SOLID ( )
inline

Definition at line 38 of file pns_solid.h.

38  :
39  ITEM( SOLID_T ),
40  m_shape( NULL ),
41  m_hole( NULL )
42  {
43  m_movable = false;
44  m_padToDie = 0;
45  m_orientation = 0;
46  }
double m_orientation
Definition: pns_solid.h:129
bool m_movable
Definition: pns_item.h:241
ITEM(PnsKind aKind)
Definition: pns_item.h:73
SHAPE * m_shape
Definition: pns_solid.h:125
int m_padToDie
Definition: pns_solid.h:128
#define NULL
SHAPE * m_hole
Definition: pns_solid.h:126

References PNS::ITEM::m_movable, m_orientation, and m_padToDie.

Referenced by Clone().

◆ ~SOLID()

PNS::SOLID::~SOLID ( )
inline

Definition at line 48 of file pns_solid.h.

49  {
50  delete m_shape;
51  delete m_hole;
52  }
SHAPE * m_shape
Definition: pns_solid.h:125
SHAPE * m_hole
Definition: pns_solid.h:126

References m_hole, and m_shape.

◆ SOLID() [2/2]

PNS::SOLID::SOLID ( const SOLID aSolid)
inline

Definition at line 54 of file pns_solid.h.

54  :
55  ITEM( aSolid )
56  {
57  if( aSolid.m_shape )
58  m_shape = aSolid.m_shape->Clone();
59  else
60  m_shape = nullptr;
61 
62  if( aSolid.m_hole )
63  m_hole = aSolid.m_hole->Clone();
64  else
65  m_hole = nullptr;
66 
67  m_pos = aSolid.m_pos;
68  m_padToDie = aSolid.m_padToDie;
69  m_orientation = aSolid.m_orientation;
70  }
double m_orientation
Definition: pns_solid.h:129
ITEM(PnsKind aKind)
Definition: pns_item.h:73
SHAPE * m_shape
Definition: pns_solid.h:125
int m_padToDie
Definition: pns_solid.h:128
virtual SHAPE * Clone() const
Return a dynamically allocated copy of the shape.
Definition: shape.h:139
SHAPE * m_hole
Definition: pns_solid.h:126
VECTOR2I m_pos
Definition: pns_solid.h:124

References SHAPE::Clone(), m_hole, m_orientation, m_padToDie, m_pos, and m_shape.

Member Function Documentation

◆ Anchor()

virtual VECTOR2I PNS::SOLID::Anchor ( int  aN) const
inlineoverridevirtual

Reimplemented from PNS::ITEM.

Definition at line 107 of file pns_solid.h.

108  {
109  return m_pos;
110  }
VECTOR2I m_pos
Definition: pns_solid.h:124

References m_pos.

◆ AnchorCount()

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

Reimplemented from PNS::ITEM.

Definition at line 112 of file pns_solid.h.

113  {
114  return 1;
115  }

◆ BelongsTo()

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

Definition at line 177 of file pns_item.h.

178  {
179  return m_owner == aNode;
180  }
NODE * m_owner
Definition: pns_item.h:238

References PNS::ITEM::m_owner.

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

◆ ClassOf()

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

Definition at line 72 of file pns_solid.h.

73  {
74  return aItem && SOLID_T == aItem->Kind();
75  }

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

◆ Clone()

ITEM * PNS::SOLID::Clone ( ) const
overridevirtual

Return a deep copy of the item.

Implements PNS::ITEM.

Definition at line 152 of file pns_solid.cpp.

153 {
154  ITEM* solid = new SOLID( *this );
155  return solid;
156 }
ITEM(PnsKind aKind)
Definition: pns_item.h:73

References SOLID().

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 97 of file pns_item.cpp.

98 {
99  if( collideSimple( aOther, aNode, aDifferentNetsOnly ) )
100  return true;
101 
102  // Special cases for "head" lines with vias attached at the end. Note that this does not
103  // support head-line-via to head-line-via collisions, but you can't route two independant
104  // tracks at once so it shouldn't come up.
105 
106  if( m_kind == LINE_T )
107  {
108  const LINE* line = static_cast<const LINE*>( this );
109 
110  if( line->EndsWithVia() && line->Via().collideSimple( aOther, aNode, aDifferentNetsOnly ) )
111  return true;
112  }
113 
114  if( aOther->m_kind == LINE_T )
115  {
116  const LINE* line = static_cast<const LINE*>( aOther );
117 
118  if( line->EndsWithVia() && line->Via().collideSimple( this, aNode, aDifferentNetsOnly ) )
119  return true;
120  }
121 
122  return false;
123 }
PnsKind m_kind
Definition: pns_item.h:235
bool collideSimple(const ITEM *aOther, const NODE *aNode, bool aDifferentNetsOnly) const
Definition: pns_item.cpp:31

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

◆ GetOrientation()

double PNS::SOLID::GetOrientation ( ) const
inline

Definition at line 120 of file pns_solid.h.

120 { return m_orientation; }
double m_orientation
Definition: pns_solid.h:129

References m_orientation.

◆ GetPadToDie()

int PNS::SOLID::GetPadToDie ( ) const
inline

Definition at line 104 of file pns_solid.h.

104 { return m_padToDie; }
int m_padToDie
Definition: pns_solid.h:128

References m_padToDie.

Referenced by PNS::MEANDER_SKEW_PLACER::Start(), PNS::MEANDER_PLACER::Start(), and PNS::DP_MEANDER_PLACER::Start().

◆ Hole()

const SHAPE* PNS::SOLID::Hole ( ) const
inlineoverridevirtual

Reimplemented from PNS::ITEM.

Definition at line 81 of file pns_solid.h.

81 { return m_hole; }
SHAPE * m_hole
Definition: pns_solid.h:126

References m_hole.

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

◆ HoleHull()

const SHAPE_LINE_CHAIN PNS::SOLID::HoleHull ( int  aClearance,
int  aWalkaroundThickness,
int  aLayer 
) const
overridevirtual

Reimplemented from PNS::ITEM.

Definition at line 124 of file pns_solid.cpp.

125 {
126  if( !m_hole )
127  return SHAPE_LINE_CHAIN();
128 
129  if( m_hole->Type() == SH_COMPOUND )
130  {
131  SHAPE_COMPOUND* cmpnd = static_cast<SHAPE_COMPOUND*>( m_hole );
132 
133  if ( cmpnd->Shapes().size() == 1 )
134  {
135  return buildHullForPrimitiveShape( cmpnd->Shapes()[0], aClearance,
136  aWalkaroundThickness );
137  }
138  else
139  {
140  // fixme - shouldn't happen but one day we should move
141  // TransformShapeWithClearanceToPolygon() to the Geometry Library
142  return SHAPE_LINE_CHAIN();
143  }
144  }
145  else
146  {
147  return buildHullForPrimitiveShape( m_hole, aClearance, aWalkaroundThickness );
148  }
149 }
compound shape, consisting of multiple simple shapes
Definition: shape.h:49
static const SHAPE_LINE_CHAIN buildHullForPrimitiveShape(const SHAPE *aShape, int aClearance, int aWalkaroundThickness)
Definition: pns_solid.cpp:37
SHAPE * m_hole
Definition: pns_solid.h:126
const std::vector< SHAPE * > & Shapes() const
SHAPE_LINE_CHAIN.
SHAPE_TYPE Type() const
Return the type of the shape.
Definition: shape.h:94

References PNS::buildHullForPrimitiveShape(), m_hole, SH_COMPOUND, SHAPE_COMPOUND::Shapes(), and SHAPE_BASE::Type().

Referenced by Hull().

◆ Hull()

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

Reimplemented from PNS::ITEM.

Definition at line 93 of file pns_solid.cpp.

94 {
95  if( !ROUTER::GetInstance()->GetInterface()->IsFlashedOnLayer( this, aLayer ) )
96  return HoleHull( aClearance, aWalkaroundThickness, aLayer );
97 
98  if( !m_shape )
99  return SHAPE_LINE_CHAIN();
100 
101  if( m_shape->Type() == SH_COMPOUND )
102  {
103  SHAPE_COMPOUND* cmpnd = static_cast<SHAPE_COMPOUND*>( m_shape );
104 
105  if ( cmpnd->Shapes().size() == 1 )
106  {
107  return buildHullForPrimitiveShape( cmpnd->Shapes()[0], aClearance,
108  aWalkaroundThickness );
109  }
110  else
111  {
112  // fixme - shouldn't happen but one day we should move
113  // TransformShapeWithClearanceToPolygon() to the Geometry Library
114  return SHAPE_LINE_CHAIN();
115  }
116  }
117  else
118  {
119  return buildHullForPrimitiveShape( m_shape, aClearance, aWalkaroundThickness );
120  }
121 }
compound shape, consisting of multiple simple shapes
Definition: shape.h:49
static const SHAPE_LINE_CHAIN buildHullForPrimitiveShape(const SHAPE *aShape, int aClearance, int aWalkaroundThickness)
Definition: pns_solid.cpp:37
const SHAPE_LINE_CHAIN HoleHull(int aClearance, int aWalkaroundThickness, int aLayer) const override
Definition: pns_solid.cpp:124
SHAPE * m_shape
Definition: pns_solid.h:125
const std::vector< SHAPE * > & Shapes() const
SHAPE_LINE_CHAIN.
SHAPE_TYPE Type() const
Return the type of the shape.
Definition: shape.h:94
static ROUTER * GetInstance()
Definition: pns_router.cpp:79

References PNS::buildHullForPrimitiveShape(), PNS::ROUTER::GetInstance(), HoleHull(), m_shape, SH_COMPOUND, SHAPE_COMPOUND::Shapes(), and SHAPE_BASE::Type().

◆ IsLocked()

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

Definition at line 223 of file pns_item.h.

224  {
225  return Marker() & MK_LOCKED;
226  }
virtual int Marker() const
Definition: pns_item.h:208

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

229 { return m_routable; }
bool m_routable
Definition: pns_item.h:245

References PNS::ITEM::m_routable.

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

◆ Kind()

◆ KindStr()

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

Returns the kind of the item, as string.

Definition at line 126 of file pns_item.cpp.

127 {
128  switch( m_kind )
129  {
130  case ARC_T: return "arc";
131  case LINE_T: return "line";
132  case SEGMENT_T: return "segment";
133  case VIA_T: return "via";
134  case JOINT_T: return "joint";
135  case SOLID_T: return "solid";
136  case DIFF_PAIR_T: return "diff-pair";
137  default: return "unknown";
138  }
139 }
PnsKind m_kind
Definition: pns_item.h:235

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

150 { return m_layers; }
LAYER_RANGE m_layers
Definition: pns_item.h:239

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(), PNS::ARC::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(), 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(), 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 159 of file pns_item.h.

160  {
161  return Layers().Overlaps( aOther->Layers() );
162  }
bool Overlaps(const LAYER_RANGE &aOther) const
Definition: pns_layerset.h:67
const LAYER_RANGE & Layers() const
Definition: pns_item.h:150

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

206 { m_marker = aMarker; }
int m_marker
Definition: pns_item.h:243

References PNS::ITEM::m_marker.

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

◆ Marker()

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

◆ Net()

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

◆ Offset()

VECTOR2I PNS::SOLID::Offset ( ) const
inline

Definition at line 117 of file pns_solid.h.

117 { return m_offset; }
VECTOR2I m_offset
Definition: pns_solid.h:127

References m_offset.

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

◆ OfKind()

◆ Owner()

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

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

Definition at line 167 of file pns_item.h.

167 { return m_owner; }
NODE * m_owner
Definition: pns_item.h:238

References PNS::ITEM::m_owner.

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

◆ Parent()

◆ Pos()

const VECTOR2I& PNS::SOLID::Pos ( ) const
inline

Definition at line 101 of file pns_solid.h.

101 { return m_pos; }
VECTOR2I m_pos
Definition: pns_solid.h:124

References m_pos.

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

◆ Rank()

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

Reimplemented in PNS::LINE.

Definition at line 211 of file pns_item.h.

211 { return m_rank; }
int m_rank
Definition: pns_item.h:244

References PNS::ITEM::m_rank.

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

◆ SetHole()

void PNS::SOLID::SetHole ( SHAPE shape)
inline

Definition at line 95 of file pns_solid.h.

96  {
97  delete m_hole;
98  m_hole = shape;
99  }
SHAPE * m_hole
Definition: pns_solid.h:126

References m_hole.

◆ SetLayer()

◆ SetLayers()

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

Definition at line 151 of file pns_item.h.

151 { m_layers = aLayers; }
LAYER_RANGE m_layers
Definition: pns_item.h:239

References PNS::ITEM::m_layers.

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

◆ SetNet()

◆ SetOffset()

void PNS::SOLID::SetOffset ( const VECTOR2I aOffset)
inline

Definition at line 118 of file pns_solid.h.

118 { m_offset = aOffset; }
VECTOR2I m_offset
Definition: pns_solid.h:127

References m_offset.

◆ SetOrientation()

void PNS::SOLID::SetOrientation ( double  aOrientation)
inline

Definition at line 121 of file pns_solid.h.

121 { m_orientation = aOrientation; }
double m_orientation
Definition: pns_solid.h:129

References m_orientation.

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

172 { m_owner = aOwner; }
NODE * m_owner
Definition: pns_item.h:238

References PNS::ITEM::m_owner.

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

◆ SetPadToDie()

void PNS::SOLID::SetPadToDie ( int  aLen)
inline

Definition at line 105 of file pns_solid.h.

105 { m_padToDie = aLen; }
int m_padToDie
Definition: pns_solid.h:128

References m_padToDie.

◆ SetParent()

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

Definition at line 144 of file pns_item.h.

144 { m_parent = aParent; }
BOARD_ITEM * m_parent
Definition: pns_item.h:237

References PNS::ITEM::m_parent.

Referenced by PNS_KICAD_IFACE::AddItem().

◆ SetPos()

void PNS::SOLID::SetPos ( const VECTOR2I aCenter)

Definition at line 158 of file pns_solid.cpp.

159 {
160  VECTOR2I delta = aCenter - m_pos;
161 
162  if( m_shape )
163  m_shape->Move( delta );
164 
165  m_pos = aCenter;
166 }
SHAPE * m_shape
Definition: pns_solid.h:125
virtual void Move(const VECTOR2I &aVector)=0
VECTOR2I m_pos
Definition: pns_solid.h:124

References m_pos, m_shape, and SHAPE::Move().

◆ SetRank()

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

Reimplemented in PNS::LINE.

Definition at line 210 of file pns_item.h.

210 { m_rank = aRank; }
int m_rank
Definition: pns_item.h:244

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

228 { m_routable = aRoutable; }
bool m_routable
Definition: pns_item.h:245

References PNS::ITEM::m_routable.

◆ SetShape()

void PNS::SOLID::SetShape ( SHAPE shape)
inline

Definition at line 89 of file pns_solid.h.

90  {
91  delete m_shape;
92  m_shape = shape;
93  }
SHAPE * m_shape
Definition: pns_solid.h:125

References m_shape.

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

◆ Shape()

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

Return the geometrical shape of the item.

Used for collision detection and spatial indexing.

Reimplemented from PNS::ITEM.

Definition at line 79 of file pns_solid.h.

79 { return m_shape; }
SHAPE * m_shape
Definition: pns_solid.h:125

References m_shape.

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

◆ Unmark()

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

Reimplemented in PNS::LINE.

Definition at line 207 of file pns_item.h.

207 { m_marker &= ~aMarker; }
int m_marker
Definition: pns_item.h:243

References PNS::ITEM::m_marker.

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

Member Data Documentation

◆ m_hole

SHAPE* PNS::SOLID::m_hole
private

Definition at line 126 of file pns_solid.h.

Referenced by Hole(), HoleHull(), SetHole(), SOLID(), and ~SOLID().

◆ m_kind

PnsKind PNS::ITEM::m_kind
protectedinherited

◆ m_layers

◆ m_marker

◆ m_movable

bool PNS::ITEM::m_movable
protectedinherited

Definition at line 241 of file pns_item.h.

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

◆ m_net

◆ m_offset

VECTOR2I PNS::SOLID::m_offset
private

Definition at line 127 of file pns_solid.h.

Referenced by Offset(), and SetOffset().

◆ m_orientation

double PNS::SOLID::m_orientation
private

Definition at line 129 of file pns_solid.h.

Referenced by GetOrientation(), SetOrientation(), and SOLID().

◆ m_owner

NODE* PNS::ITEM::m_owner
protectedinherited

◆ m_padToDie

int PNS::SOLID::m_padToDie
private

Definition at line 128 of file pns_solid.h.

Referenced by GetPadToDie(), SetPadToDie(), and SOLID().

◆ m_parent

BOARD_ITEM* PNS::ITEM::m_parent
protectedinherited

◆ m_pos

VECTOR2I PNS::SOLID::m_pos
private

Definition at line 124 of file pns_solid.h.

Referenced by Anchor(), Pos(), SetPos(), and SOLID().

◆ m_rank

◆ m_routable

bool PNS::ITEM::m_routable
protectedinherited

Definition at line 245 of file pns_item.h.

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

◆ m_shape

SHAPE* PNS::SOLID::m_shape
private

Definition at line 125 of file pns_solid.h.

Referenced by Hull(), SetPos(), SetShape(), Shape(), SOLID(), and ~SOLID().

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