92                  wxT( 
"Cannot use FRONT_INNER_BACK with blind/buried vias!" ) );
 
 
  104    if( !std::equal( myLayers.begin(), myLayers.end(), otherLayers.begin() ) )
 
  107    for( 
int i : myLayers )
 
 
  127            aForce = elementForce;
 
  130    return ( aForce != 
VECTOR2I( 0, 0 ) );
 
 
  135                        int aCollisionMask, 
int aMaxIterations )
 
  142    PNS_DBG( dbg, AddPoint, 
Pos(), 
YELLOW, 100000, wxString::Format( 
"via-force-init-pos, iter %d", aMaxIterations ) );
 
  144    while( iter < aMaxIterations )
 
  148        opt.m_kindMask = aCollisionMask;
 
  149        opt.m_useClearanceEpsilon = 
false;
 
  157        bool     collFound = mv.
PushoutForce( aNode, obs->m_item, force );
 
  167            PNS_DBG( dbg, Message, wxString::Format( 
"no-coll %d", iter ) );
 
  178        if( iter > aMaxIterations / 2 && forceMag > threshold )
 
  189            PNS_DBG( dbg, AddShape, &ff, 
YELLOW, 100000, 
"via-force-lead" );
 
  196            if( forceMag > threshold )
 
  198                force.
Resize( threshold );
 
  209            PNS_DBG( dbg, AddShape, &ff, 
WHITE, 100000, 
"via-force-coll" );
 
  215    if( iter == aMaxIterations )
 
  218    PNS_DBG( dbg, AddPoint, ( 
Pos() + totalForce ), 
WHITE, 1000000, 
"via-force-new" );
 
 
  229                  wxT( 
"Warning: VIA::Hull called with invalid layer but viastack is complex" ) );
 
  231    int cl = ( aClearance + aWalkaroundThickness / 2 );
 
  235        width = 
m_hole->Radius() * 2;
 
  240                          cl, ( 2 * cl + width ) * ( 1.0 - M_SQRT1_2 ) );
 
 
  260    for( 
const auto& [layer, shape] : 
m_shapes )
 
 
  278    if( aOther->
Pos() != 
Pos() )
 
 
  308    std::stringstream ss;
 
 
std::optional< BOX2I > OPT_BOX2I
 
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
 
static HOLE * MakeCircularHole(const VECTOR2I &pos, int radius, PNS_LAYER_RANGE aLayers)
 
Base class for PNS router board items.
 
void SetLayers(const PNS_LAYER_RANGE &aLayers)
 
BOARD_ITEM * m_sourceItem
 
virtual const std::string Format() const
 
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
 
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.
 
void SetNet(NET_HANDLE aNet)
 
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.
 
OPT_OBSTACLE CheckColliding(const ITEM *aItem, int aKindMask=ITEM::ANY_T)
Check if the item collides with anything else in the world, and if found, returns the obstacle.
 
std::optional< OBSTACLE > OPT_OBSTACLE
 
virtual DEBUG_DECORATOR * GetDebugDecorator()=0
 
ROUTER_IFACE * GetInterface() const
 
static ROUTER * GetInstance()
 
int Diameter(int aLayer) const
 
OPT_BOX2I ChangedArea(const VIA *aOther) const
 
std::vector< int > UniqueShapeLayers() const override
Return a list of layers that have unique (potentially different) shapes.
 
const VECTOR2I & Pos() const
 
virtual void SetHole(HOLE *aHole) override
 
std::map< int, int > m_diameters
May contain 1..n diameters depending on m_stackMode.
 
const VIA_HANDLE MakeHandle() const
 
const SHAPE * Shape(int aLayer) const override
Return the geometrical shape of the item.
 
virtual const std::string Format() const override
 
bool PushoutForce(NODE *aNode, const VECTOR2I &aDirection, VECTOR2I &aForce, int aCollisionMask=ITEM::ANY_T, int aMaxIterations=10)
 
std::map< int, SHAPE_CIRCLE > m_shapes
 
int EffectiveLayer(int aLayer) const
 
void SetPos(const VECTOR2I &aPos)
 
bool ConnectsLayer(int aLayer) const
 
bool PadstackMatches(const VIA &aOther) const
 
const SHAPE_LINE_CHAIN Hull(int aClearance=0, int aWalkaroundThickness=0, int aLayer=-1) const override
 
static constexpr int ALL_LAYERS
 
static constexpr int INNER_LAYERS
 
void SetStackMode(STACK_MODE aStackMode)
 
PADSTACK::UNCONNECTED_LAYER_MODE m_unconnectedLayerMode
 
VIA * Clone() const override
Return a deep copy of the item.
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
 
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,...
 
virtual const std::string Format(bool aCplusPlus=true) const
 
virtual const BOX2I BBox(int aClearance=0) const =0
Compute a bounding box of the shape, with a margin of aClearance a collision.
 
constexpr extended_type SquaredEuclideanNorm() const
Compute the squared euclidean norm of the vector, which is defined as (x ** 2 + y ** 2).
 
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
 
VECTOR2< T > Resize(T aNewLength) const
Return a vector of the same direction, but length specified in aNewLength.
 
Push and Shove diff pair dimensions (gap) settings dialog.
 
const SHAPE_LINE_CHAIN OctagonalHull(const VECTOR2I &aP0, const VECTOR2I &aSize, int aClearance, int aChamfer)
 
#define PNS_DBG(dbg, method,...)
 
VECTOR2< int32_t > VECTOR2I