Pin junction dot size to no less than 170% of wire width.
Fixes https://gitlab.com/kicad/code/kicad/issues/4917
This commit is contained in:
parent
e88dda2c01
commit
310613a941
|
@ -184,6 +184,22 @@ COLOR4D SCH_JUNCTION::GetColor() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int SCH_JUNCTION::GetDiameter() const
|
||||||
|
{
|
||||||
|
int diameter = m_diameter;
|
||||||
|
|
||||||
|
if( diameter == 0 )
|
||||||
|
diameter = Schematic()->Settings().m_JunctionSize;
|
||||||
|
|
||||||
|
NETCLASSPTR netclass = NetClass();
|
||||||
|
|
||||||
|
if( netclass )
|
||||||
|
diameter = std::max( diameter, KiROUND( netclass->GetWireWidth() * 1.7 ) );
|
||||||
|
|
||||||
|
return std::max( diameter, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SCH_JUNCTION::HitTest( const wxPoint& aPosition, int aAccuracy ) const
|
bool SCH_JUNCTION::HitTest( const wxPoint& aPosition, int aAccuracy ) const
|
||||||
{
|
{
|
||||||
EDA_RECT rect = GetBoundingBox();
|
EDA_RECT rect = GetBoundingBox();
|
||||||
|
|
|
@ -97,7 +97,7 @@ public:
|
||||||
wxPoint GetPosition() const override { return m_pos; }
|
wxPoint GetPosition() const override { return m_pos; }
|
||||||
void SetPosition( const wxPoint& aPosition ) override { m_pos = aPosition; }
|
void SetPosition( const wxPoint& aPosition ) override { m_pos = aPosition; }
|
||||||
|
|
||||||
int GetDiameter() const { return m_diameter; }
|
int GetDiameter() const;
|
||||||
void SetDiameter( int aDiameter ) { m_diameter = aDiameter; }
|
void SetDiameter( int aDiameter ) { m_diameter = aDiameter; }
|
||||||
|
|
||||||
COLOR4D GetColor() const;
|
COLOR4D GetColor() const;
|
||||||
|
|
|
@ -1179,10 +1179,7 @@ void SCH_PAINTER::draw( SCH_JUNCTION *aJct, int aLayer )
|
||||||
|
|
||||||
COLOR4D color = getRenderColor( aJct, aJct->GetLayer(), drawingShadows );
|
COLOR4D color = getRenderColor( aJct, aJct->GetLayer(), drawingShadows );
|
||||||
|
|
||||||
int junctionSize = m_schSettings.m_JunctionSize / 2.0;
|
int junctionSize = aJct->GetDiameter() / 2;
|
||||||
|
|
||||||
if( aJct->GetDiameter() != 0 )
|
|
||||||
junctionSize = aJct->GetDiameter() / 2;
|
|
||||||
|
|
||||||
m_gal->SetIsStroke( drawingShadows );
|
m_gal->SetIsStroke( drawingShadows );
|
||||||
m_gal->SetLineWidth( getLineWidth( aJct, drawingShadows ) );
|
m_gal->SetLineWidth( getLineWidth( aJct, drawingShadows ) );
|
||||||
|
|
Loading…
Reference in New Issue