36    printf( 
"&&&& %zu obstacles: \n", obstacles.size() );
 
   38    for( 
const auto& obs : obstacles )
 
   40        printf( 
"%p [%s] - %p [%s], clearance %d\n",
 
   41                obs.m_head, obs.m_head->KindStr().c_str(),
 
   42                obs.m_item, obs.m_item->KindStr().c_str(),
 
 
   59        if( !parentH || !parentI )
 
   76        if( parentViaI && parentViaH && parentViaI->
Pos() == parentViaH->
Pos()
 
   78            && parentViaI->
Net() == parentViaH->
Net()
 
   79            && parentViaI->
Drill() == parentViaH->
Drill() )
 
   82        return parentI != parentH;
 
 
  106    std::set<int> relevantLayers;
 
  108    std::set_union( myLayers.begin(), myLayers.end(), otherLayers.begin(), otherLayers.end(),
 
  109                    std::inserter( relevantLayers, relevantLayers.begin() ) );
 
  111    return relevantLayers;
 
 
  128    bool         collisionsFound = 
false;
 
  142        if( line->EndsWithVia() )
 
  143            collisionsFound |= line->Via().collideSimple( aHead, aNode, aLayer, aCtx );
 
  148        if( line->EndsWithVia() )
 
  149            collisionsFound |= line->Via().collideSimple( 
this, aNode, aLayer, aCtx );
 
  157            collisionsFound |= 
collideSimple( holeH, aNode, aLayer, aCtx );
 
  162        collisionsFound |= holeI->
collideSimple( aHead, aNode, aLayer, aCtx );
 
  168        lineWidthI = 
static_cast<const LINE*
>( this )->Width() / 2;
 
  171        lineWidthH = 
static_cast<const LINE*
>( aHead )->Width() / 2;
 
  180    bool          differentNetsOnly = 
true;
 
  181    bool          enforce = 
false;
 
  189        differentNetsOnly = 
false;
 
  191    if( differentNetsOnly && 
Net() == aHead->
Net() && aHead->
Net() )
 
  240        if( checkCastellation || checkNetTie )
 
  259                    collisionsFound = 
true;
 
  284                    collisionsFound = 
true;
 
  301    return collisionsFound;
 
 
  319    case ARC_T:       
return "arc";
 
  320    case LINE_T:      
return "line";
 
  322    case VIA_T:       
return "via";
 
  326    case HOLE_T:      
return "hole";
 
  328    default:          
return "unknown";
 
 
  343    std::stringstream ss;
 
 
  359        return static_cast<const NODE*
>( 
Owner() );
 
 
virtual NET_HANDLE Net() const override
 
ITEM * ParentPadVia() const override
 
Base class for PNS router board items.
 
virtual bool HasUniqueShapeLayers() const
 
virtual const std::string Format() const
 
virtual ITEM * ParentPadVia() const
 
virtual std::vector< int > UniqueShapeLayers() const
Return a list of layers that have unique (potentially different) shapes.
 
virtual const SHAPE * Shape(int aLayer) const
Return the geometrical shape of the item.
 
const PNS_LAYER_RANGE & Layers() const
 
virtual NET_HANDLE Net() const
 
PnsKind Kind() const
Return the type (kind) of the item.
 
std::set< int > RelevantShapeLayers(const ITEM *aOther) const
Returns the set of layers on which either this or the other item can have a unique shape.
 
bool Collide(const ITEM *aHead, const NODE *aNode, int aLayer, COLLISION_SEARCH_CONTEXT *aCtx=nullptr) const
Check for a collision (clearance violation) with between us and item aOther.
 
bool collideSimple(const ITEM *aHead, const NODE *aNode, int aLayer, COLLISION_SEARCH_CONTEXT *aCtx) const
 
virtual const NODE * OwningNode() const
 
bool OfKind(int aKindMask) const
 
std::string KindStr() const
 
virtual HOLE * Hole() const
 
virtual bool HasHole() const
 
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
 
static UNIQ_ID genNextUid()
 
Keep the router "world" - i.e.
 
int GetClearance(const ITEM *aA, const ITEM *aB, bool aUseClearanceEpsilon=true) const
Return the pre-set worst case clearance between any pair of items.
 
bool QueryEdgeExclusions(const VECTOR2I &aPos) const
 
RULE_RESOLVER * GetRuleResolver() const
Return the number of joints.
 
std::set< OBSTACLE > OBSTACLES
 
const ITEM_OWNER * Owner() const
Return the owner of this item, or NULL if there's none.
 
virtual wxString GetNetName(PNS::NET_HANDLE aNet) const =0
 
virtual bool IsFlashedOnLayer(const PNS::ITEM *aItem, int aLayer) const =0
 
ROUTER_IFACE * GetInterface() const
 
static ROUTER * GetInstance()
 
virtual bool IsNonPlatedSlot(const PNS::ITEM *aItem)=0
 
virtual bool IsNetTieExclusion(const ITEM *aItem, const VECTOR2I &aCollisionPos, const ITEM *aCollidingItem)=0
 
virtual bool IsKeepout(const ITEM *aObstacle, const ITEM *aItem, bool *aEnforce)=0
 
virtual bool IsInNetTie(const ITEM *aA)=0
 
const VECTOR2I & Pos() const
 
bool PadstackMatches(const VIA &aOther) const
 
An abstract shape on 2D plane.
 
virtual bool Collide(const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const
Check if the boundary of shape (this) lies closer to the point aP than aClearance,...
 
VECTOR2_TRAITS< int32_t >::extended_type extended_type
 
Push and Shove diff pair dimensions (gap) settings dialog.
 
static void dumpObstacles(const PNS::NODE::OBSTACLES &obstacles)
 
static bool shouldWeConsiderHoleCollisions(const ITEM *aItem, const ITEM *aHead)
 
VECTOR2I::extended_type ecoord
 
const COLLISION_SEARCH_OPTIONS options
 
std::set< OBSTACLE > & obstacles
 
bool m_useClearanceEpsilon
 
Hold an object colliding with another object, along with some useful data about the collision.
 
int m_distFirst
... and the distance thereof
 
int m_maxFanoutWidth
worst case (largest) width of the tracks connected to the item
 
ITEM * m_head
Line we search collisions against.
 
ITEM * m_item
Item found to be colliding with m_head.
 
Casted dyn_cast(From aObject)
A lightweight dynamic downcast.
 
VECTOR2< int32_t > VECTOR2I