GerbView: incorrect handling of polygon primitive: broken parameters rotation and drill size.
Fixes: lp:1778459 https://bugs.launchpad.net/kicad/+bug/1778459
This commit is contained in:
parent
1f6f76beb9
commit
ef38a198d1
|
@ -407,12 +407,10 @@ void D_CODE::ConvertShapeToPolygon()
|
|||
|
||||
addHoleToPolygon( &m_Polygon, m_DrillShape, m_Drill, initialpos );
|
||||
|
||||
if( m_Rotation ) // vertical oval, rotate polygon.
|
||||
if( m_Rotation ) // rotate polygonal shape:
|
||||
{
|
||||
int angle = KiROUND( m_Rotation * 10 );
|
||||
|
||||
for( auto it = m_Polygon.Iterate( 0 ); it; ++it )
|
||||
it->Rotate( -angle );
|
||||
double angle = m_Rotation * M_PI / 180;
|
||||
m_Polygon.Rotate( angle, VECTOR2I( 0, 0 ) );
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -824,7 +824,7 @@ bool GERBER_FILE_IMAGE::ExecuteRS274XCommand( int aCommand, char* aBuff,
|
|||
{
|
||||
aText++;
|
||||
dcode->m_Drill.x = KiROUND( ReadDouble( aText ) * conv_scale );
|
||||
dcode->m_Drill.y = dcode->m_Drill.x =
|
||||
dcode->m_Drill.y = dcode->m_Drill.x;
|
||||
dcode->m_DrillShape = APT_DEF_ROUND_HOLE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue