25 #include <geometry/shape_line_chain.h>
26 #include <geometry/shape_circle.h>
27 #include "layers_id_colors_and_visibility.h"
29 #include "../class_track.h"
37 class VIA :
public ITEM
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 )
69 VIA(
const VIA& aB ) :
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;