Formatting.

This commit is contained in:
Jeff Young 2021-01-02 18:38:17 +00:00
parent 85e42890c4
commit 13094fdc28
1 changed files with 19 additions and 53 deletions

View File

@ -57,9 +57,9 @@ public:
m_isFree = false; m_isFree = false;
} }
VIA( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int aDiameter, int aDrill, int aNet = -1, VIA( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int aDiameter, int aDrill,
VIATYPE aViaType = VIATYPE::THROUGH ) int aNet = -1, VIATYPE aViaType = VIATYPE::THROUGH ) :
: ITEM( VIA_T ) ITEM( VIA_T )
{ {
SetNet( aNet ); SetNet( aNet );
SetLayers( aLayers ); SetLayers( aLayers );
@ -72,7 +72,6 @@ public:
m_isFree = false; m_isFree = false;
} }
VIA( const VIA& aB ) : VIA( const VIA& aB ) :
ITEM( aB ) ITEM( aB )
{ {
@ -94,11 +93,7 @@ public:
return aItem && VIA_T == aItem->Kind(); return aItem && VIA_T == aItem->Kind();
} }
const VECTOR2I& Pos() const { return m_pos; }
const VECTOR2I& Pos() const
{
return m_pos;
}
void SetPos( const VECTOR2I& aPos ) void SetPos( const VECTOR2I& aPos )
{ {
@ -106,20 +101,10 @@ public:
m_shape.SetCenter( aPos ); m_shape.SetCenter( aPos );
} }
VIATYPE ViaType() const VIATYPE ViaType() const { return m_viaType; }
{ void SetViaType( VIATYPE aViaType ) { m_viaType = aViaType; }
return m_viaType;
}
void SetViaType( VIATYPE aViaType ) int Diameter() const { return m_diameter; }
{
m_viaType = aViaType;
}
int Diameter() const
{
return m_diameter;
}
void SetDiameter( int aDiameter ) void SetDiameter( int aDiameter )
{ {
@ -127,43 +112,24 @@ public:
m_shape.SetRadius( m_diameter / 2 ); m_shape.SetRadius( m_diameter / 2 );
} }
int Drill() const int Drill() const { return m_drill; }
{ void SetDrill( int aDrill ) { m_drill = aDrill; }
return m_drill;
}
void SetDrill( int aDrill )
{
m_drill = aDrill;
}
bool IsFree() const { return m_isFree; } bool IsFree() const { return m_isFree; }
void SetIsFree( bool aIsFree ) { m_isFree = aIsFree; } void SetIsFree( bool aIsFree ) { m_isFree = aIsFree; }
bool PushoutForce( NODE* aNode, bool PushoutForce( NODE* aNode, const VECTOR2I& aDirection, VECTOR2I& aForce,
const VECTOR2I& aDirection, bool aSolidsOnly = true, int aMaxIterations = 10 );
VECTOR2I& aForce,
bool aSolidsOnly = true,
int aMaxIterations = 10 );
const SHAPE* Shape() const override const SHAPE* Shape() const override { return &m_shape; }
{
return &m_shape;
}
const SHAPE_CIRCLE* Hole() const override const SHAPE_CIRCLE* Hole() const override { return &m_hole; }
{ void SetHole( const SHAPE_CIRCLE& aHole ) { m_hole = aHole; }
return &m_hole;
}
void SetHole( const SHAPE_CIRCLE& aHole )
{
m_hole = aHole;
}
VIA* Clone() const override; VIA* Clone() const override;
const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0, int aLayer = -1 ) const override; const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0,
int aLayer = -1 ) const override;
virtual VECTOR2I Anchor( int n ) const override virtual VECTOR2I Anchor( int n ) const override
{ {