![]() |
KiCad PCB EDA Suite
|
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads, junctions between multiple traces or two traces different widths and combinations of these). More...
#include <pns_line.h>
Public Types | |
typedef std::vector< LINKED_ITEM * > | LINKS |
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 | |
LINE () | |
Makes an empty line. More... | |
LINE (const LINE &aOther) | |
LINE (const LINE &aBase, const SHAPE_LINE_CHAIN &aLine) | |
Copy properties (net, layers, etc.) from a base line and replaces the shape by another. More... | |
LINE (const VIA &aVia) | |
Construct a LINE for a lone VIA (ie a stitching via). More... | |
~LINE () | |
virtual LINE * | Clone () const override |
Return a deep copy of the item. More... | |
LINE & | operator= (const LINE &aOther) |
bool | IsLinkedChecked () const |
Assign a shape to the line (a polyline/line chain). More... | |
void | SetShape (const SHAPE_LINE_CHAIN &aLine) |
Return the shape of the line. More... | |
const SHAPE * | Shape () const override |
Modifiable accessor to the underlying shape. More... | |
SHAPE_LINE_CHAIN & | Line () |
const SHAPE_LINE_CHAIN & | CLine () const |
int | SegmentCount () const |
int | PointCount () const |
int | ArcCount () const |
int | ShapeCount () const |
Return the aIdx-th point of the line. More... | |
const VECTOR2I & | CPoint (int aIdx) const |
const SEG | CSegment (int aIdx) const |
Set line width. More... | |
void | SetWidth (int aWidth) |
Return line width. More... | |
int | Width () const |
Return true if the line is geometrically identical as line aOther. More... | |
bool | CompareGeometry (const LINE &aOther) |
Reverse the point/vertex order. More... | |
void | Reverse () |
Clip the line to the nearest obstacle, traversing from the line's start vertex (0). More... | |
const LINE | ClipToNearestObstacle (NODE *aNode) const |
Clip the line to a given range of vertices. More... | |
void | ClipVertexRange (int aStart, int aEnd) |
Return the number of corners of angles specified by mask aAngles. More... | |
int | CountCorners (int aAngles) const |
bool | Walkaround (SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN &aPre, SHAPE_LINE_CHAIN &aWalk, SHAPE_LINE_CHAIN &aPost, bool aCw) const |
Calculate a line tightly wrapping a convex hull of an obstacle object (aObstacle). More... | |
bool | Walkaround (const SHAPE_LINE_CHAIN &aObstacle, SHAPE_LINE_CHAIN &aPath, bool aCw) const |
bool | Is45Degree () const |
Print out all linked segments. More... | |
void | ShowLinks () const |
bool | EndsWithVia () const |
void | AppendVia (const VIA &aVia) |
void | RemoveVia () |
const VIA & | Via () const |
void | SetViaDiameter (int aDiameter) |
void | SetViaDrill (int aDrill) |
virtual void | Mark (int aMarker) const override |
virtual void | Unmark (int aMarker=-1) const override |
virtual int | Marker () const override |
void | SetBlockingObstacle (ITEM *aObstacle) |
ITEM * | GetBlockingObstacle () const |
void | DragSegment (const VECTOR2I &aP, int aIndex, bool aFreeAngle=false) |
void | DragCorner (const VECTOR2I &aP, int aIndex, bool aFreeAngle=false) |
void | SetRank (int aRank) override |
int | Rank () const override |
bool | HasLoops () const |
bool | HasLockedSegments () const |
void | Clear () |
OPT_BOX2I | ChangedArea (const LINE *aOther) const |
void | SetSnapThreshhold (int aThreshhold) |
int | GetSnapThreshhold () const |
void | Link (LINKED_ITEM *aLink) |
Return the list of links from the owning node that constitute this line (or NULL if the line is not linked). More... | |
LINKS & | Links () |
const LINKS & | Links () const |
bool | IsLinked () const |
Check if the segment aLink is a part of the line. More... | |
bool | ContainsLink (const LINKED_ITEM *aItem) const |
LINKED_ITEM * | GetLink (int aIndex) const |
Erase the linking information. Used to detach the line from the owning node. More... | |
virtual void | ClearLinks () |
Return the number of segments that were assembled together to form this line. More... | |
int | LinkCount () const |
virtual const SHAPE_LINE_CHAIN | Hull (int aClearance=0, int aWalkaroundThickness=0, int aLayer=-1) 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_ITEM * | Parent () const |
void | SetNet (int aNet) |
int | Net () const |
const LAYER_RANGE & | Layers () 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... | |
NODE * | Owner () 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 SHAPE * | Hole () const |
virtual VECTOR2I | Anchor (int n) const |
virtual int | AnchorCount () 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 Member Functions | |
void | copyLinks (const LINK_HOLDER *aParent) |
< Copy m_links from the line aParent. More... | |
Protected Attributes | |
LINKS | m_links |
PnsKind | m_kind |
BOARD_ITEM * | m_parent |
NODE * | m_owner |
LAYER_RANGE | m_layers |
bool | m_movable |
int | m_net |
int | m_marker |
int | m_rank |
bool | m_routable |
Private Member Functions | |
void | dragSegment45 (const VECTOR2I &aP, int aIndex) |
void | dragCorner45 (const VECTOR2I &aP, int aIndex) |
void | dragSegmentFree (const VECTOR2I &aP, int aIndex) |
void | dragCornerFree (const VECTOR2I &aP, int aIndex) |
VECTOR2I | snapToNeighbourSegments (const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex) const |
VECTOR2I | snapDraggedCorner (const SHAPE_LINE_CHAIN &aPath, const VECTOR2I &aP, int aIndex) const |
Private Attributes | |
SHAPE_LINE_CHAIN | m_line |
The actual shape of the line. More... | |
int | m_width |
Our width. More... | |
int | m_snapThreshhold |
Width to smooth out jagged segments. More... | |
bool | m_hasVia |
Optional via at the end point. More... | |
VIA | m_via |
ITEM * | m_blockingObstacle |
For mark obstacle mode. More... | |
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads, junctions between multiple traces or two traces different widths and combinations of these).
PNS_LINEs are NOT stored in the model (NODE). Instead, they are assembled on-the-fly, based on a via/pad/segment that belongs to/starts/ends them.
PNS_LINEs can be either loose (consisting of segments that do not belong to any NODE) or owned (with segments taken from a NODE) - these are returned by #NODE::AssembleLine and friends.
A LINE may have a VIA attached at its end (i.e. the last point) - this is used by via dragging/force propagation stuff.
Definition at line 60 of file pns_line.h.
|
inherited |
Definition at line 36 of file pns_link_holder.h.
|
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.
|
inline |
Makes an empty line.
Definition at line 66 of file pns_line.h.
References m_hasVia, m_snapThreshhold, and m_width.
Referenced by Clone().
PNS::LINE::LINE | ( | const LINE & | aOther | ) |
Definition at line 37 of file pns_line.cpp.
References PNS::LINK_HOLDER::copyLinks(), m_blockingObstacle, 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.
|
inline |
Copy properties (net, layers, etc.) from a base line and replaces the shape by another.
Definition at line 80 of file pns_line.h.
References m_hasVia, PNS::ITEM::m_layers, and PNS::ITEM::m_net.
|
inline |
Construct a LINE for a lone VIA (ie a stitching via).
Definition at line 95 of file pns_line.h.
References PNS::VIA::Diameter(), PNS::ITEM::Layers(), m_hasVia, PNS::ITEM::m_layers, PNS::ITEM::m_net, PNS::ITEM::m_rank, m_snapThreshhold, m_via, m_width, PNS::ITEM::Net(), and PNS::ITEM::Rank().
PNS::LINE::~LINE | ( | ) |
Definition at line 56 of file pns_line.cpp.
|
inlinevirtualinherited |
Reimplemented in PNS::VIA, PNS::SEGMENT, PNS::SOLID, and PNS::ARC.
Definition at line 213 of file pns_item.h.
Referenced by PNS::DP_PRIMITIVE_PAIR::anchorDirection(), PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), PNS::DP_PRIMITIVE_PAIR::DP_PRIMITIVE_PAIR(), PNS::NODE::followLine(), PNS::getDanglingAnchor(), PNS::ROUTER::isStartingPointRoutable(), PNS::TOOL_BASE::pickSingleItem(), and PNS::TOOL_BASE::snapToItem().
|
inlinevirtualinherited |
Reimplemented in PNS::VIA, PNS::SEGMENT, PNS::SOLID, and PNS::ARC.
Definition at line 218 of file pns_item.h.
void PNS::LINE::AppendVia | ( | const VIA & | aVia | ) |
Definition at line 870 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().
|
inline |
Definition at line 141 of file pns_line.h.
References SHAPE_LINE_CHAIN::ArcCount(), and m_line.
Referenced by PNS::OPTIMIZER::Optimize().
|
inlineinherited |
Definition at line 177 of file pns_item.h.
References PNS::ITEM::m_owner.
Referenced by PNS::NODE::doRemove().
Definition at line 1008 of file pns_line.cpp.
References SEG::Contains(), CPoint(), SHAPE_LINE_CHAIN::CPoint(), PNS::extendBox(), BOX2< Vec >::Inflate(), m_line, SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN::Simplify(), and Width().
Referenced by PNS::ChangedArea(), and PNS::DRAGGER::optimizeAndUpdateDraggedLine().
|
inlinestatic |
Definition at line 110 of file pns_line.h.
References PNS::ITEM::Kind(), and PNS::ITEM::LINE_T.
void PNS::LINE::Clear | ( | ) |
Definition at line 1099 of file pns_line.cpp.
References SHAPE_LINE_CHAIN::Clear(), m_hasVia, and m_line.
|
inlinevirtualinherited |
Return the number of segments that were assembled together to form this line.
Reimplemented in PNS::DIFF_PAIR.
Definition at line 69 of file pns_link_holder.h.
References PNS::LINK_HOLDER::m_links.
Referenced by PNS::DIFF_PAIR::ClearLinks(), PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dragViaMarkObstacles(), PNS::DRAGGER::dragViaWalkaround(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onReverseCollidingVia(), PNS::OPTIMIZER::Optimize(), PNS::DRAGGER::optimizeAndUpdateDraggedLine(), PNS::NODE::Remove(), PNS::SHOVE::ShoveLines(), PNS::SHOVE::ShoveMultiLines(), and PNS::SHOVE::ShoveObstacleLine().
|
inline |
Definition at line 137 of file pns_line.h.
References m_line.
Referenced by PNS::COST_ESTIMATOR::Add(), PNS::DIFF_PAIR_PLACER::attemptWalk(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), PNS::NODE::CheckColliding(), PNS::SHOVE::checkShoveDirection(), PNS::COST_ESTIMATOR::CornerCost(), PNS::DIFF_PAIR::DIFF_PAIR(), PNS::MEANDER_PLACER::doMove(), PNS::DRAGGER::dragViaMarkObstacles(), PNS::DRAGGER::dragViaWalkaround(), PNS::OPTIMIZER::fanoutCleanup(), PNS::NODE::FindLinesBetweenJoints(), PNS::LINE_PLACER::FixRoute(), PNS::TOPOLOGY::followTrivialPath(), PNS::LINE_PLACER::Move(), PNS::NODE::NearestObstacle(), PNS::SHOVE::onCollidingArc(), PNS::SHOVE::onCollidingLine(), PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onReverseCollidingVia(), PNS::DRAGGER::optimizeAndUpdateDraggedLine(), PNS::LINE_PLACER::optimizeTailHeadTransition(), PNS::COST_ESTIMATOR::Remove(), PNS::LINE_PLACER::removeLoops(), PNS::COST_ESTIMATOR::Replace(), PNS_TEST_ENVIRONMENT::ReplayLog(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), PNS::WALKAROUND::Route(), PNS::SHOVE::runOptimizer(), PNS::SHOVE::ShoveLines(), PNS::SHOVE::shoveLineToHullSet(), PNS::SHOVE::ShoveObstacleLine(), PNS::TOPOLOGY::SimplifyLine(), PNS::WALKAROUND::singleStep(), PNS::OPTIMIZER::smartPadsSingle(), PNS::Tighten(), PNS::LINE_PLACER::Trace(), PNS::DRAGGER::tryWalkaround(), and Walkaround().
Clip the line to a given range of vertices.
Definition at line 456 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().
void PNS::LINE::ClipVertexRange | ( | int | aStart, |
int | aEnd | ||
) |
Return the number of corners of angles specified by mask aAngles.
We need to figure out which joints to keep after the clip operation, because arcs will have multiple vertices. It is assumed that anything calling this method will have determined the vertex range to clip based on joints, meaning we will never clip in the middle of an arc. Clipping in the middle of an arc would break this and various other things...
Definition at line 912 of file pns_line.cpp.
References SHAPE_LINE_CHAIN::CShapes(), PNS::LINK_HOLDER::IsLinked(), m_line, PNS::LINK_HOLDER::m_links, SHAPE_LINE_CHAIN::PointCount(), and SHAPE_LINE_CHAIN::Slice().
Referenced by PNS::NODE::FindLinesBetweenJoints().
|
overridevirtual |
Return a deep copy of the item.
Implements PNS::ITEM.
Definition at line 82 of file pns_line.cpp.
References LINE().
Referenced by PNS::ITEM_SET::Add(), and PNS::ITEM_SET::Prepend().
|
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.
aOther | is the item to check collision against. |
Definition at line 97 of file pns_item.cpp.
References PNS::ITEM::collideSimple(), EndsWithVia(), PNS::ITEM::LINE_T, PNS::ITEM::m_kind, and 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().
bool PNS::LINE::CompareGeometry | ( | const LINE & | aOther | ) |
Reverse the point/vertex order.
Definition at line 856 of file pns_line.cpp.
References SHAPE_LINE_CHAIN::CompareGeometry(), and m_line.
|
inlineinherited |
Definition at line 58 of file pns_link_holder.h.
References alg::contains(), and PNS::LINK_HOLDER::m_links.
|
inlineprotectedinherited |
< Copy m_links from the line aParent.
List of segments in the owning NODE (ITEM::m_owner) that constitute this line, or NULL if the line is not a part of any node.
Definition at line 98 of file pns_link_holder.h.
References PNS::LINK_HOLDER::m_links.
Referenced by LINE(), and operator=().
int PNS::LINE::CountCorners | ( | int | aAngles | ) | const |
Definition at line 136 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().
|
inline |
Definition at line 145 of file pns_line.h.
References SHAPE_LINE_CHAIN::CPoint(), and m_line.
Referenced by ChangedArea(), PNS::AREA_CONSTRAINT::Check(), PNS::SHOVE::checkShoveDirection(), PNS::OPTIMIZER::fanoutCleanup(), PNS::NODE::FindLineEnds(), PNS::TOPOLOGY::followTrivialPath(), HasLoops(), PNS::TOPOLOGY::LeadingRatLine(), PNS::LINE_PLACER::Move(), PNS::LINE_PLACER::rhShoveOnly(), PNS::LINE_PLACER::rhWalkOnly(), PNS::WALKAROUND::Route(), PNS::LINE_PLACER::route(), PNS::SHOVE::sanityCheck(), PNS::SHOVE::shoveLineFromLoneVia(), PNS::SHOVE::ShoveLines(), PNS::SHOVE::shoveLineToHullSet(), and PNS::WALKAROUND::singleStep().
|
inline |
Set line width.
Definition at line 146 of file pns_line.h.
References SHAPE_LINE_CHAIN::CSegment(), and m_line.
Referenced by PNS::DIFF_PAIR::EndingPrimitives(), PNS::LINE_PLACER::FixRoute(), PNS::OPTIMIZER::mergeStep(), PNS::LINE_PLACER::optimizeTailHeadTransition(), and PNS::SHOVE::ShoveObstacleLine().
void PNS::LINE::DragCorner | ( | const VECTOR2I & | aP, |
int | aIndex, | ||
bool | aFreeAngle = false |
||
) |
Definition at line 594 of file pns_line.cpp.
References dragCorner45(), and dragCornerFree().
Referenced by PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dragViaMarkObstacles(), PNS::DRAGGER::dragViaWalkaround(), and PNS::DRAGGER::dragWalkaround().
|
private |
Definition at line 565 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 DragCorner().
|
private |
Definition at line 588 of file pns_line.cpp.
References m_line, SHAPE_LINE_CHAIN::SetPoint(), and SHAPE_LINE_CHAIN::Simplify().
Referenced by DragCorner().
void PNS::LINE::DragSegment | ( | const VECTOR2I & | aP, |
int | aIndex, | ||
bool | aFreeAngle = false |
||
) |
Definition at line 606 of file pns_line.cpp.
References dragSegment45().
Referenced by PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), and PNS::DRAGGER::dragWalkaround().
|
private |
Definition at line 705 of file pns_line.cpp.
References SEG::A, DIRECTION_45::ANG_HALF_FULL, DIRECTION_45::ANG_OBTUSE, DIRECTION_45::Angle(), SHAPE_LINE_CHAIN::Append(), SEG::B, SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::CSegment(), SHAPE_LINE_CHAIN::Insert(), SEG::Intersect(), DIRECTION_45::Left(), SHAPE_LINE_CHAIN::Length(), m_line, SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN::Replace(), DIRECTION_45::Right(), SHAPE_LINE_CHAIN::SegmentCount(), SHAPE_LINE_CHAIN::Simplify(), snapToNeighbourSegments(), and DIRECTION_45::ToVector().
Referenced by DragSegment().
|
private |
|
inline |
Definition at line 191 of file pns_line.h.
References m_hasVia.
Referenced by PNS::NODE::CheckColliding(), PNS::ITEM::Collide(), PNS::OPTIMIZER::fanoutCleanup(), PNS::LINE_PLACER::FixRoute(), PNS::TOPOLOGY::LeadingRatLine(), PNS::ROUTER::markViolations(), PNS::ROUTER::movePlacing(), PNS::NODE::NearestObstacle(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onCollidingVia(), PNS::SHOVE::onReverseCollidingVia(), PNS::WALKAROUND::Route(), PNS::SHOVE::shoveIteration(), PNS::SHOVE::ShoveLines(), PNS::SHOVE::ShoveMultiLines(), PNS::SHOVE::ShoveObstacleLine(), and PNS::LINE_PLACER::UpdateSizes().
|
inline |
Definition at line 206 of file pns_line.h.
References m_blockingObstacle.
Referenced by PNS::ROUTER::markViolations().
|
inlineinherited |
Erase the linking information. Used to detach the line from the owning node.
Definition at line 63 of file pns_link_holder.h.
References PNS::LINK_HOLDER::m_links.
Referenced by PNS::LINE_PLACER::removeLoops(), PNS::TOPOLOGY::SimplifyLine(), PNS::MEANDER_SKEW_PLACER::Start(), and PNS::DP_MEANDER_PLACER::Start().
|
inline |
Definition at line 226 of file pns_line.h.
References m_snapThreshhold.
bool PNS::LINE::HasLockedSegments | ( | ) | const |
Definition at line 1089 of file pns_line.cpp.
References PNS::LINK_HOLDER::m_links, and PNS::MK_LOCKED.
Referenced by PNS::SHOVE::onCollidingArc(), and PNS::SHOVE::onCollidingSegment().
bool PNS::LINE::HasLoops | ( | ) | const |
Definition at line 979 of file pns_line.cpp.
References CPoint(), and PointCount().
Referenced by PNS::SHOVE::onCollidingSolid(), and PNS::LINE_PLACER::rhShoveOnly().
|
inlinevirtualinherited |
Reimplemented in PNS::VIA, and PNS::SOLID.
Definition at line 201 of file pns_item.h.
Referenced by PNS::ITEM::collideSimple().
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Reimplemented in PNS::VIA, PNS::SEGMENT, PNS::ARC, and PNS::SOLID.
Definition at line 111 of file pns_item.h.
bool PNS::LINE::Is45Degree | ( | ) | const |
Print out all linked segments.
Definition at line 427 of file pns_line.cpp.
References SEG::A, PNS::angle(), SEG::B, SHAPE_LINE_CHAIN::CSegment(), SHAPE_LINE_CHAIN::isArc(), SEG::Length(), m_line, SHAPE_LINE_CHAIN::SegmentCount(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PNS::LINE_PLACER::routeStep().
|
inlineinherited |
Check if the segment aLink is a part of the line.
Definition at line 52 of file pns_link_holder.h.
References PNS::LINK_HOLDER::m_links.
Referenced by PNS::NODE::Add(), ClipVertexRange(), PNS::TOPOLOGY::followTrivialPath(), IsLinkedChecked(), PNS::DIFF_PAIR::NLine(), PNS::DIFF_PAIR::PLine(), Rank(), PNS::OPTIMIZER::removeCachedSegments(), and PNS::TOPOLOGY::SimplifyLine().
|
inline |
Assign a shape to the line (a polyline/line chain).
Definition at line 120 of file pns_line.h.
References PNS::LINK_HOLDER::IsLinked(), PNS::LINK_HOLDER::LinkCount(), and SegmentCount().
Referenced by PNS::SHOVE::pushLineStack().
|
inlineinherited |
Definition at line 223 of file pns_item.h.
References PNS::ITEM::Marker(), and PNS::MK_LOCKED.
Referenced by ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::performDragging(), and PNS::SHOVE::pushOrShoveVia().
|
inlineinherited |
Definition at line 229 of file pns_item.h.
References PNS::ITEM::m_routable.
Referenced by PNS::NODE::addSolid(), and PNS::NODE::removeSolidIndex().
|
inlineinherited |
Return the type (kind) of the item.
Definition at line 126 of file pns_item.h.
References PNS::ITEM::m_kind.
Referenced by PNS_KICAD_IFACE::AddItem(), PNS::NODE::AssembleLine(), PNS::OPTIMIZER::CacheRemove(), PNS::NODE::CheckColliding(), PNS::SEGMENT::ClassOf(), PNS::ARC::ClassOf(), PNS::SOLID::ClassOf(), PNS::VIA::ClassOf(), ClassOf(), PNS::DIFF_PAIR::ClassOf(), PNS::OPTIMIZER::computeBreakouts(), PNS::NODE::DEFAULT_OBSTACLE_VISITOR::DEFAULT_OBSTACLE_VISITOR(), PNS::DIFF_PAIR_PLACER::FindDpPrimitivePair(), PNS::NODE::followLine(), PNS::getDanglingAnchor(), PNS::MEANDER_PLACER_BASE::getSnappedStartPoint(), PNS_PCBNEW_RULE_RESOLVER::holeRadius(), PNS_KICAD_IFACE_BASE::inheritTrackWidth(), PNS::OPTIMIZER::CACHE_VISITOR::operator()(), PNS_PCBNEW_RULE_RESOLVER::QueryConstraint(), PNS::NODE::Remove(), PNS::SHOVE::shoveIteration(), PNS::OPTIMIZER::smartPadsSingle(), PNS::TOOL_BASE::snapToItem(), PNS::DRAGGER::Start(), PNS::LINE_PLACER::Start(), ROUTER_PREVIEW_ITEM::Update(), and PNS_KICAD_IFACE::UpdateItem().
|
inherited |
Returns the kind of the item, as string.
Definition at line 126 of file pns_item.cpp.
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().
|
inlinevirtualinherited |
Definition at line 154 of file pns_item.h.
References PNS::ITEM::Layers(), and LAYER_RANGE::Start().
Referenced by PNS_PCBNEW_RULE_RESOLVER::Clearance(), PNS::ITEM::collideSimple(), PNS::DRAGGER::CurrentLayer(), PNS::OPTIMIZER::fanoutCleanup(), PNS_PCBNEW_RULE_RESOLVER::HoleClearance(), PNS_PCBNEW_RULE_RESOLVER::HoleToHoleClearance(), PNS_KICAD_IFACE_BASE::ImportSizes(), PNS::ROUTER::markViolations(), PNS::NODE::NearestObstacle(), PNS::OPTIMIZER::runSmartPads(), PNS::SHOVE::shoveLineFromLoneVia(), and PNS::SHOVE::ShoveObstacleLine().
|
inlineinherited |
Definition at line 150 of file pns_item.h.
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(), 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_KICAD_IFACE::UpdateItem(), PNS::DIFF_PAIR::updateLine(), PNS::TOOL_BASE::updateStartItem(), and PNS::VIA::VIA().
|
inlineinherited |
Return true if the set of layers spanned by aOther overlaps our layers.
Definition at line 159 of file pns_item.h.
References PNS::ITEM::Layers(), and LAYER_RANGE::Overlaps().
Referenced by PNS::SHOVE::onCollidingArc(), PNS::SHOVE::onCollidingSegment(), PNS::NODE::rebuildJoint(), and PNS::SHOVE::ShoveObstacleLine().
|
inline |
Definition at line 136 of file pns_line.h.
References m_line.
Referenced by PNS::NODE::Add(), PNS::NODE::AssembleLine(), PNS::DIFF_PAIR_PLACER::attemptWalk(), ClipToNearestObstacle(), PNS::LINE_PLACER::FixRoute(), PNS::LINE_PLACER::handlePullback(), PNS::LINE_PLACER::handleSelfIntersections(), PNS::LINE_PLACER::initPlacement(), PNS::OPTIMIZER::mergeColinear(), PNS::OPTIMIZER::mergeFull(), PNS::LINE_PLACER::mergeHead(), PNS::OPTIMIZER::mergeObtuse(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onReverseCollidingVia(), PNS::LINE_PLACER::optimizeTailHeadTransition(), PNS::LINE_PLACER::reduceTail(), PNS::LINE_PLACER::rhShoveOnly(), PNS::WALKAROUND::Route(), PNS::OPTIMIZER::runSmartPads(), PNS::LINE_PLACER::SetLayer(), PNS::WALKAROUND::singleStep(), PNS::LINE_PLACER::Trace(), and PNS::LINE_PLACER::UnfixRoute().
|
inlineinherited |
Return the list of links from the owning node that constitute this line (or NULL if the line is not linked).
Definition at line 42 of file pns_link_holder.h.
References PNS::LINK_HOLDER::m_links.
Referenced by PNS::NODE::Add(), and PNS::NODE::AssembleLine().
|
inlineinherited |
Definition at line 75 of file pns_link_holder.h.
References PNS::LINK_HOLDER::m_links.
Referenced by IsLinkedChecked(), and PNS::LINE_PLACER::removeLoops().
|
inlineinherited |
Definition at line 49 of file pns_link_holder.h.
References PNS::LINK_HOLDER::m_links.
Referenced by PNS::TOPOLOGY::followTrivialPath(), PNS::SHOVE::popLineStack(), PNS::NODE::Remove(), PNS::OPTIMIZER::removeCachedSegments(), PNS::SHOVE::ShoveObstacleLine(), and PNS::SHOVE::unwindLineStack().
|
inlineinherited |
|
overridevirtual |
Reimplemented from PNS::ITEM.
Definition at line 90 of file pns_line.cpp.
References PNS::LINK_HOLDER::m_links, and PNS::ITEM::m_marker.
Referenced by PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::ShoveLines(), PNS::SHOVE::ShoveMultiLines(), and PNS::SHOVE::ShoveObstacleLine().
|
overridevirtual |
Reimplemented from PNS::ITEM.
Definition at line 109 of file pns_line.cpp.
References PNS::LINK_HOLDER::m_links, and PNS::ITEM::m_marker.
Referenced by PNS::ARC::ARC(), PNS::SHOVE::onCollidingArc(), PNS::SHOVE::onCollidingLine(), PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::onCollidingSolid(), PNS::SEGMENT::SEGMENT(), PNS::SHOVE::shoveLineToHullSet(), and PNS::SHOVE::ShoveObstacleLine().
|
inlineinherited |
Definition at line 148 of file pns_item.h.
References PNS::ITEM::m_net.
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::LINE_PLACER::buildInitialLine(), PNS::KEEP_TOPOLOGY_CONSTRAINT::Check(), PNS::VIA::Clone(), PNS::MEANDER_PLACER::CurrentNets(), PNS::DRAGGER::CurrentNets(), PNS::DIFF_PAIR::DIFF_PAIR(), PNS::OPTIMIZER::fanoutCleanup(), PNS::DIFF_PAIR_PLACER::FindDpPrimitivePair(), PNS::NODE::FindJoint(), PNS::NODE::findRedundantArc(), PNS::NODE::findRedundantSegment(), PNS::LINE_PLACER::FixRoute(), PNS_PCBNEW_RULE_RESOLVER::IsDiffPair(), PNS::ROUTER::isStartingPointRoutable(), LINE(), PNS::NODE::LockJoint(), PNS::VIA::MakeHandle(), ROUTER_TOOL::performDragging(), LENGTH_TUNER_TOOL::performTuning(), ROUTER_TOOL::prepareInteractive(), PNS_PCBNEW_RULE_RESOLVER::QueryConstraint(), PNS::NODE::rebuildJoint(), PNS::INDEX::Remove(), PNS::NODE::removeArcIndex(), PNS::NODE::removeSegmentIndex(), PNS::NODE::removeSolidIndex(), PNS::NODE::removeViaIndex(), PNS::OPTIMIZER::runSmartPads(), PNS::SEGMENT::SEGMENT(), PNS::SHOVE::ShoveObstacleLine(), PNS::MEANDER_SKEW_PLACER::Start(), PNS::DIFF_PAIR_PLACER::Start(), PNS::LINE_PLACER::Start(), PNS_KICAD_IFACE::UpdateItem(), and PNS::VIA::VIA().
|
inlineinherited |
Return true if the item's type matches the mask aKindMask.
Definition at line 134 of file pns_item.h.
References PNS::ITEM::m_kind.
Referenced by PNS::DP_PRIMITIVE_PAIR::anchorDirection(), ROUTER_TOOL::breakTrack(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), PNS::ChangedArea(), PNS::TOOL_BASE::checkSnap(), PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), PNS::DP_PRIMITIVE_PAIR::Directional(), PNS::OPTIMIZER::fanoutCleanup(), PNS::ROUTER::isStartingPointRoutable(), PNS::SHOVE::onCollidingVia(), PNS::NODE::DEFAULT_OBSTACLE_VISITOR::operator()(), PNS_KICAD_IFACE::RemoveItem(), PNS::LINE_PLACER::SetLayer(), PNS::SHOVE::shoveIteration(), PNS::LINE_PLACER::simplifyNewLine(), PNS::LINE_PLACER::SplitAdjacentSegments(), PNS::MEANDER_SKEW_PLACER::Start(), PNS::MEANDER_PLACER::Start(), PNS::DP_MEANDER_PLACER::Start(), PNS::SHOVE::unwindLineStack(), and ROUTER_PREVIEW_ITEM::Update().
Definition at line 61 of file pns_line.cpp.
References PNS::LINK_HOLDER::copyLinks(), m_blockingObstacle, m_hasVia, PNS::ITEM::m_layers, m_line, PNS::ITEM::m_marker, PNS::ITEM::m_movable, PNS::ITEM::m_net, PNS::ITEM::m_owner, PNS::ITEM::m_rank, m_snapThreshhold, m_via, and m_width.
|
inlineinherited |
Return the owner of this item, or NULL if there's none.
Definition at line 167 of file pns_item.h.
References PNS::ITEM::m_owner.
Referenced by PNS_KICAD_IFACE_BASE::inheritTrackWidth(), and PNS::LINE_PLACER::Move().
|
inlineinherited |
Definition at line 145 of file pns_item.h.
References PNS::ITEM::m_parent.
Referenced by PNS_KICAD_IFACE::AddItem(), PNS_PCBNEW_RULE_RESOLVER::DpNetPair(), PNS_KICAD_IFACE::HideItem(), PNS_PCBNEW_RULE_RESOLVER::holeRadius(), isCopper(), isEdge(), PNS_KICAD_IFACE::IsFlashedOnLayer(), PNS_KICAD_IFACE::IsItemVisible(), PNS_PCBNEW_RULE_RESOLVER::QueryConstraint(), PNS_KICAD_IFACE::RemoveItem(), and PNS_KICAD_IFACE::UpdateItem().
|
inline |
Definition at line 140 of file pns_line.h.
References m_line, and SHAPE_LINE_CHAIN::PointCount().
Referenced by PNS::LINE_PLACER::buildInitialLine(), PNS::OPTIMIZER::fanoutCleanup(), HasLoops(), PNS::TOPOLOGY::LeadingRatLine(), PNS::LINE_PLACER::Move(), PNS::OPTIMIZER::removeCachedSegments(), PNS::LINE_PLACER::rhShoveOnly(), PNS::WALKAROUND::Route(), PNS::LINE_PLACER::route(), PNS::TOPOLOGY::SimplifyLine(), and PNS::WALKAROUND::singleStep().
|
overridevirtual |
Reimplemented from PNS::ITEM.
Definition at line 893 of file pns_line.cpp.
References PNS::LINK_HOLDER::IsLinked(), PNS::LINK_HOLDER::m_links, and PNS::ITEM::m_rank.
Referenced by PNS::ARC::ARC(), PNS::SHOVE::onCollidingArc(), PNS::SHOVE::onCollidingLine(), PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onReverseCollidingVia(), PNS::SEGMENT::SEGMENT(), and PNS::SHOVE::shoveIteration().
|
inline |
Definition at line 194 of file pns_line.h.
References m_hasVia.
Referenced by ClipToNearestObstacle(), PNS::LINE_PLACER::FixRoute(), PNS::LINE_PLACER::initPlacement(), PNS::SHOVE::onReverseCollidingVia(), PNS::LINE_PLACER::ToggleVia(), and PNS::LINE_PLACER::UnfixRoute().
void PNS::LINE::Reverse | ( | ) |
Clip the line to the nearest obstacle, traversing from the line's start vertex (0).
Returns the clipped line.
Definition at line 862 of file pns_line.cpp.
References m_line, PNS::LINK_HOLDER::m_links, and SHAPE_LINE_CHAIN::Reverse().
Referenced by AppendVia(), dragCorner45(), PNS::DRAGGER::findViaFanoutByHandle(), and PNS::TOPOLOGY::followTrivialPath().
|
inline |
Definition at line 139 of file pns_line.h.
References m_line, and SHAPE_LINE_CHAIN::SegmentCount().
Referenced by PNS::NODE::AssembleLine(), PNS::MEANDER_PLACER::HasPlacedAnything(), IsLinkedChecked(), PNS::OPTIMIZER::mergeStep(), PNS::LINE_PLACER::Move(), PNS::LINE_PLACER::optimizeTailHeadTransition(), PNS::SHOVE::pushLineStack(), PNS::LINE_PLACER::removeLoops(), PNS::WALKAROUND::Route(), PNS::LINE_PLACER::setInitialDirection(), PNS::SHOVE::ShoveLines(), PNS::SHOVE::ShoveMultiLines(), PNS::SHOVE::ShoveObstacleLine(), PNS::TOPOLOGY::SimplifyLine(), PNS::MEANDER_SKEW_PLACER::Start(), PNS::DP_MEANDER_PLACER::Start(), PNS::Tighten(), and ROUTER_PREVIEW_ITEM::Update().
|
inline |
Definition at line 205 of file pns_line.h.
References m_blockingObstacle.
Referenced by PNS::LINE_PLACER::rhMarkObstacles().
|
inlineinherited |
Definition at line 153 of file pns_item.h.
References PNS::ITEM::m_layers.
Referenced by PNS::LINE_PLACER::buildInitialLine(), PNS::LINE_PLACER::FixRoute(), PNS::LINE_PLACER::initPlacement(), PNS::ROUTER::isStartingPointRoutable(), PNS::DIFF_PAIR_PLACER::propagateDpHeadForces(), PNS::DIFF_PAIR_PLACER::routeHead(), PNS::LINE_PLACER::SetLayer(), PNS::LINE_PLACER::UnfixRoute(), and PNS::DIFF_PAIR::updateLine().
|
inlineinherited |
Definition at line 151 of file pns_item.h.
References PNS::ITEM::m_layers.
Referenced by PNS::TOPOLOGY::AssembleDiffPair(), PNS::NODE::AssembleLine(), PNS::VIA::Clone(), and PNS::VIA::VIA().
|
inlineinherited |
Definition at line 147 of file pns_item.h.
References PNS::ITEM::m_net.
Referenced by AppendVia(), PNS::NODE::AssembleLine(), PNS::LINE_PLACER::buildInitialLine(), PNS::VIA::Clone(), PNS::LINE_PLACER::FixRoute(), PNS::LINE_PLACER::initPlacement(), PNS::ROUTER::isStartingPointRoutable(), PNS::DIFF_PAIR_PLACER::makeVia(), PNS::DIFF_PAIR::updateLine(), and PNS::VIA::VIA().
|
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.
References PNS::ITEM::m_owner.
Referenced by PNS::NODE::AssembleLine(), PNS::NODE::doRemove(), and PNS::NODE::Remove().
|
inlineinherited |
Definition at line 144 of file pns_item.h.
References PNS::ITEM::m_parent.
Referenced by PNS_KICAD_IFACE::AddItem().
|
overridevirtual |
Reimplemented from PNS::ITEM.
Definition at line 883 of file pns_line.cpp.
References PNS::LINK_HOLDER::m_links, and PNS::ITEM::m_rank.
Referenced by PNS::SHOVE::onCollidingArc(), PNS::SHOVE::onCollidingLine(), PNS::SHOVE::onCollidingSegment(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onReverseCollidingVia(), PNS::SHOVE::ShoveLines(), and PNS::SHOVE::ShoveMultiLines().
|
inlineinherited |
|
inline |
Return the shape of the line.
Definition at line 126 of file pns_line.h.
References m_line, m_width, and SHAPE_LINE_CHAIN::SetWidth().
Referenced by PNS::LINE_PLACER::buildInitialLine(), PNS::OPTIMIZER::fanoutCleanup(), PNS::ROUTER::isStartingPointRoutable(), PNS::OPTIMIZER::mergeFull(), PNS::SHOVE::onReverseCollidingVia(), PNS::LINE_PLACER::rhWalkOnly(), PNS::WALKAROUND::Route(), PNS::SHOVE::shoveLineFromLoneVia(), PNS::SHOVE::shoveLineToHullSet(), PNS::TOPOLOGY::SimplifyLine(), PNS::WALKAROUND::singleStep(), PNS::OPTIMIZER::smartPadsSingle(), test2_main_func(), PNS::tightenSegment(), PNS::LINE_PLACER::Trace(), and PNS::DIFF_PAIR::updateLine().
|
inline |
Definition at line 221 of file pns_line.h.
References m_snapThreshhold.
Referenced by PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), and PNS::DRAGGER::dragWalkaround().
|
inline |
Definition at line 198 of file pns_line.h.
References m_via, and PNS::VIA::SetDiameter().
Referenced by PNS::LINE_PLACER::UpdateSizes().
|
inline |
Definition at line 199 of file pns_line.h.
References m_via, and PNS::VIA::SetDrill().
Referenced by PNS::LINE_PLACER::UpdateSizes().
|
inline |
Return line width.
Definition at line 149 of file pns_line.h.
References m_line, m_width, and SHAPE_LINE_CHAIN::SetWidth().
Referenced by PNS::NODE::AssembleLine(), PNS::LINE_PLACER::initPlacement(), PNS::ROUTER::isStartingPointRoutable(), PNS::DIFF_PAIR::updateLine(), and PNS::LINE_PLACER::UpdateSizes().
|
inlineoverridevirtual |
Modifiable accessor to the underlying shape.
Reimplemented from PNS::ITEM.
Definition at line 133 of file pns_line.h.
References m_line.
Referenced by PNS::SHOVE::onCollidingVia().
|
inline |
Return the aIdx-th point of the line.
Definition at line 142 of file pns_line.h.
References m_line, and SHAPE_LINE_CHAIN::ShapeCount().
Referenced by PNS::LINE_PLACER::routeStep().
void PNS::LINE::ShowLinks | ( | ) | const |
|
private |
Definition at line 618 of file pns_line.cpp.
References SHAPE_LINE_CHAIN::CSegment(), EuclideanNorm(), SEG::IntersectLines(), m_snapThreshhold, and SHAPE_LINE_CHAIN::SegmentCount().
Referenced by dragCorner45().
|
private |
Definition at line 660 of file pns_line.cpp.
References SEG::A, SHAPE_LINE_CHAIN::CSegment(), SEG::LineDistance(), m_snapThreshhold, and SHAPE_LINE_CHAIN::SegmentCount().
Referenced by dragSegment45().
|
overridevirtual |
Reimplemented from PNS::ITEM.
Definition at line 100 of file pns_line.cpp.
References PNS::LINK_HOLDER::m_links, and PNS::ITEM::m_marker.
Referenced by PNS::DRAGGER::dragShove(), PNS::SHOVE::onCollidingSolid(), and PNS::DRAGGER::optimizeAndUpdateDraggedLine().
|
inline |
Definition at line 196 of file pns_line.h.
References m_via.
Referenced by PNS::NODE::CheckColliding(), PNS::ITEM::Collide(), PNS::DIFF_PAIR_PLACER::FixRoute(), PNS::LINE_PLACER::FixRoute(), PNS::ROUTER::markViolations(), PNS::ROUTER::movePlacing(), PNS::NODE::NearestObstacle(), PNS::SHOVE::onCollidingSolid(), PNS::SHOVE::onCollidingVia(), PNS::SHOVE::onReverseCollidingVia(), PNS::WALKAROUND::Route(), PNS::SHOVE::shoveLineFromLoneVia(), PNS::SHOVE::ShoveLines(), PNS::SHOVE::ShoveMultiLines(), and PNS::SHOVE::ShoveObstacleLine().
bool PNS::LINE::Walkaround | ( | SHAPE_LINE_CHAIN | aObstacle, |
SHAPE_LINE_CHAIN & | aPre, | ||
SHAPE_LINE_CHAIN & | aWalk, | ||
SHAPE_LINE_CHAIN & | aPost, | ||
bool | aCw | ||
) | const |
Calculate a line tightly wrapping a convex hull of an obstacle object (aObstacle).
aPrePath | is the path from origin to the obstacle. |
aWalkaroundPath | is the path around the obstacle. |
aPostPath | is the path from obstacle till the end. |
aCW | determines whether to walk around in clockwise or counter-clockwise direction. |
Referenced by PNS::SHOVE::shoveLineFromLoneVia(), PNS::SHOVE::shoveLineToHullSet(), PNS::WALKAROUND::singleStep(), and test2_main_func().
bool PNS::LINE::Walkaround | ( | const SHAPE_LINE_CHAIN & | aObstacle, |
SHAPE_LINE_CHAIN & | aPath, | ||
bool | aCw | ||
) | const |
Definition at line 157 of file pns_line.cpp.
References SHAPE_LINE_CHAIN::Append(), CLine(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::Find(), findVertex(), SHAPE_LINE_CHAIN::Intersect(), OUTSIDE, SHAPE_LINE_CHAIN::INTERSECTION::p, SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN_BASE::PointInside(), SHAPE_LINE_CHAIN_BASE::PointOnEdge(), SHAPE_LINE_CHAIN::Reverse(), SHAPE_LINE_CHAIN::SegmentCount(), SHAPE_LINE_CHAIN::Simplify(), SHAPE_LINE_CHAIN::Slice(), and SHAPE_LINE_CHAIN::Split().
|
inline |
Return true if the line is geometrically identical as line aOther.
Definition at line 156 of file pns_line.h.
References m_width.
Referenced by PNS::TOPOLOGY::AssembleDiffPair(), ChangedArea(), PNS::MEANDER_PLACER::doMove(), PNS::DRAGGER::dragMarkObstacles(), PNS::DRAGGER::dragShove(), PNS::DRAGGER::dragWalkaround(), PNS::OPTIMIZER::fanoutCleanup(), PNS::LINE_PLACER::FixRoute(), PNS::NODE::NearestObstacle(), PNS::SHOVE::onCollidingVia(), PNS::SHOVE::shoveLineFromLoneVia(), PNS::SHOVE::ShoveLines(), PNS::SHOVE::ShoveObstacleLine(), PNS::OPTIMIZER::smartPadsSingle(), PNS::MEANDER_SKEW_PLACER::Start(), PNS::MEANDER_PLACER::Start(), and PNS::LINE_PLACER::Start().
|
private |
For mark obstacle mode.
Definition at line 252 of file pns_line.h.
Referenced by GetBlockingObstacle(), LINE(), operator=(), and SetBlockingObstacle().
|
private |
Optional via at the end point.
Definition at line 249 of file pns_line.h.
Referenced by AppendVia(), Clear(), EndsWithVia(), LINE(), operator=(), and RemoveVia().
|
protectedinherited |
Definition at line 235 of file pns_item.h.
Referenced by PNS::ITEM::Collide(), PNS::ITEM::collideSimple(), PNS::ITEM::ITEM(), PNS::ITEM::Kind(), PNS::ITEM::KindStr(), and PNS::ITEM::OfKind().
|
protectedinherited |
Definition at line 239 of file pns_item.h.
Referenced by PNS::ARC::ARC(), PNS::SEGMENT::Clone(), PNS::ARC::Clone(), PNS::ITEM::collideSimple(), PNS::JOINT::Dump(), PNS::ITEM::ITEM(), PNS::JOINT::JOINT(), PNS::ITEM::Layers(), LINE(), PNS::JOINT::Merge(), operator=(), PNS::JOINT::Overlaps(), PNS::SEGMENT::SEGMENT(), PNS::ITEM::SetLayer(), and PNS::ITEM::SetLayers().
|
private |
The actual shape of the line.
Definition at line 243 of file pns_line.h.
Referenced by AppendVia(), ArcCount(), ChangedArea(), Clear(), CLine(), ClipVertexRange(), CompareGeometry(), CountCorners(), CPoint(), CSegment(), dragCorner45(), dragCornerFree(), dragSegment45(), Is45Degree(), Line(), operator=(), PointCount(), Reverse(), SegmentCount(), SetShape(), SetWidth(), Shape(), and ShapeCount().
|
protectedinherited |
Definition at line 105 of file pns_link_holder.h.
Referenced by PNS::LINK_HOLDER::ClearLinks(), PNS::DIFF_PAIR::ClearLinks(), ClipVertexRange(), PNS::LINK_HOLDER::ContainsLink(), PNS::LINK_HOLDER::copyLinks(), PNS::LINK_HOLDER::GetLink(), HasLockedSegments(), PNS::LINK_HOLDER::IsLinked(), PNS::LINK_HOLDER::Link(), PNS::LINK_HOLDER::LinkCount(), PNS::LINK_HOLDER::Links(), Mark(), Marker(), Rank(), Reverse(), SetRank(), PNS::LINK_HOLDER::ShowLinks(), and Unmark().
|
mutableprotectedinherited |
Definition at line 243 of file pns_item.h.
Referenced by PNS::ARC::ARC(), PNS::SEGMENT::Clone(), PNS::ARC::Clone(), PNS::VIA::Clone(), PNS::ITEM::ITEM(), LINE(), Mark(), PNS::ITEM::Mark(), Marker(), PNS::ITEM::Marker(), operator=(), PNS::SEGMENT::SEGMENT(), Unmark(), PNS::ITEM::Unmark(), and PNS::VIA::VIA().
|
protectedinherited |
Definition at line 241 of file pns_item.h.
Referenced by PNS::ITEM::ITEM(), LINE(), operator=(), and PNS::SOLID::SOLID().
|
protectedinherited |
Definition at line 242 of file pns_item.h.
Referenced by AppendVia(), PNS::ARC::ARC(), PNS::SEGMENT::Clone(), PNS::ARC::Clone(), PNS::ITEM::collideSimple(), PNS::ITEM::ITEM(), LINE(), PNS::ITEM::Net(), operator=(), PNS::SEGMENT::SEGMENT(), and PNS::ITEM::SetNet().
|
protectedinherited |
Definition at line 238 of file pns_item.h.
Referenced by PNS::ITEM::BelongsTo(), PNS::ITEM::ITEM(), operator=(), PNS::ITEM::Owner(), and PNS::ITEM::SetOwner().
|
protectedinherited |
Definition at line 237 of file pns_item.h.
Referenced by PNS::VIA::Clone(), PNS::ITEM::ITEM(), PNS::ITEM::Parent(), and PNS::ITEM::SetParent().
|
protectedinherited |
Definition at line 244 of file pns_item.h.
Referenced by PNS::ARC::ARC(), PNS::SEGMENT::Clone(), PNS::ARC::Clone(), PNS::VIA::Clone(), PNS::ITEM::ITEM(), LINE(), operator=(), PNS::ITEM::Rank(), Rank(), PNS::SEGMENT::SEGMENT(), PNS::ITEM::SetRank(), SetRank(), and PNS::VIA::VIA().
|
protectedinherited |
Definition at line 245 of file pns_item.h.
Referenced by PNS::ITEM::IsRoutable(), PNS::ITEM::ITEM(), and PNS::ITEM::SetRoutable().
|
private |
Width to smooth out jagged segments.
Definition at line 247 of file pns_line.h.
Referenced by GetSnapThreshhold(), LINE(), operator=(), SetSnapThreshhold(), snapDraggedCorner(), and snapToNeighbourSegments().
|
private |
Definition at line 250 of file pns_line.h.
Referenced by AppendVia(), LINE(), operator=(), SetViaDiameter(), SetViaDrill(), and Via().
|
private |
Our width.
Definition at line 244 of file pns_line.h.
Referenced by LINE(), operator=(), SetShape(), SetWidth(), and Width().
|
staticinherited |