25 #include <geometry/shape_line_chain.h>
26 #include <geometry/shape_circle.h>
29 #include "../class_track.h"
45 m_viaType = VIA_THROUGH;
49 int aDiameter,
int aDrill,
int aNet = -1, VIATYPE_T aViaType = VIA_THROUGH ) :
55 m_diameter = aDiameter;
61 if( aViaType == VIA_THROUGH )
75 m_diameter = aB.m_diameter;
77 m_marker = aB.m_marker;
80 m_viaType = aB.m_viaType;
83 static inline bool ClassOf(
const ITEM* aItem )
85 return aItem && VIA_T == aItem->
Kind();
97 m_shape.SetCenter( aPos );
100 VIATYPE_T ViaType()
const
105 void SetViaType( VIATYPE_T aViaType )
107 m_viaType = aViaType;
115 void SetDiameter(
int aDiameter )
117 m_diameter = aDiameter;
118 m_shape.SetRadius( m_diameter / 2 );
126 void SetDrill(
int aDrill )
131 bool PushoutForce(
NODE* aNode,
134 bool aSolidsOnly =
true,
135 int aMaxIterations = 10 );
144 const SHAPE_LINE_CHAIN Hull(
int aClearance = 0,
int aWalkaroundThickness = 0 )
const override;
146 virtual VECTOR2I Anchor(
int n )
const override
151 virtual int AnchorCount()
const override
156 OPT_BOX2I ChangedArea(
const VIA* aOther )
const;
Class LAYER_RANGE.
Definition: pns_layerset.h:33
Class ITEM.
Definition: pns_item.h:55
void SetLayers(const LAYER_RANGE &aLayers)
Function SetLayers()
Definition: pns_item.h:195
const LAYER_RANGE & Layers() const
Function Layers()
Definition: pns_item.h:215
void SetNet(int aNet)
Function SetNet()
Definition: pns_item.h:170
PnsKind Kind() const
Function Kind()
Definition: pns_item.h:123
int Net() const
Function Net()
Definition: pns_item.h:180
Class NODE.
Definition: pns_node.h:138
const SHAPE * Shape() const override
Function Shape()
Definition: pns_via.h:137
VIA * Clone() const override
Function Clone()
Definition: pns_via.cpp:84
Definition: shape_circle.h:31
Class SHAPE_LINE_CHAIN.
Definition: shape_line_chain.h:50
Class SHAPE.
Definition: shape.h:59
Board layer functions and definitions.