120 for(
const auto& [layer, shape] : aB.
m_shapes )
146 for(
const auto& [layer, shape] : aB.
m_shapes )
181 for(
auto& [layer, shape] :
m_shapes )
182 shape.SetCenter( aPos );
206 m_shapes[layer].SetRadius( aDiameter / 2 );
225 int aCollisionMask =
ITEM::ANY_T,
int aMaxIterations = 10 );
232 wxCHECK(
m_shapes.contains( layer ),
nullptr );
239 int aLayer = -1 )
const override;
267 virtual bool HasHole()
const override {
return true; }
270 virtual const std::string
Format()
const override;
296 bool HasHole()
const override {
return false; }
std::optional< BOX2I > OPT_BOX2I
void SetCenter(const VECTOR2I &aCenter)
void SetRadius(int aRadius)
void SetParentPadVia(ITEM *aParent)
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)
const PNS_LAYER_RANGE & Layers() const
virtual NET_HANDLE Net() const
PnsKind Kind() const
Return the type (kind) of the item.
void SetNet(NET_HANDLE aNet)
Keep the router "world" - i.e.
void SetOwner(const ITEM_OWNER *aOwner)
Set the node that owns this item.
bool BelongsTo(const ITEM_OWNER *aNode) const
int Diameter(int aLayer) const
void SetDiameter(int aLayer, int aDiameter)
OPT_BOX2I ChangedArea(const VIA *aOther) const
std::vector< int > UniqueShapeLayers() const override
Return a list of layers that have unique (potentially different) shapes.
static bool ClassOf(const ITEM *aItem)
virtual VECTOR2I Anchor(int n) const override
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.
VIA(const VECTOR2I &aPos, const PNS_LAYER_RANGE &aLayers, int aDiameter, int aDrill, NET_HANDLE aNet=nullptr, VIATYPE aViaType=VIATYPE::THROUGH)
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)
virtual int AnchorCount() const override
std::map< int, SHAPE_CIRCLE > m_shapes
virtual HOLE * Hole() const override
void SetIsFree(bool aIsFree)
void SetViaType(VIATYPE aViaType)
int EffectiveLayer(int aLayer) const
void SetPos(const VECTOR2I &aPos)
VIA & operator=(const VIA &aB)
void SetDrill(int aDrill)
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)
bool HasUniqueShapeLayers() const override
STACK_MODE StackMode() const
virtual bool HasHole() const override
VIA * Clone() const override
Return a deep copy of the item.
VVIA(const VECTOR2I &aPos, int aLayer, int aDiameter, NET_HANDLE aNet)
bool HasHole() const override
Represent a contiguous set of PCB layers.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
An abstract shape on 2D plane.
Push and Shove diff pair dimensions (gap) settings dialog.
VIA_HANDLE(VECTOR2I aPos, PNS_LAYER_RANGE aLayers, NET_HANDLE aNet)