CADSTAR PCB Archive Importer: Fix component mirroring

Need to invert mirror angle before calling MODULE::Flip
This commit is contained in:
Roberto Fernandez Bautista 2020-10-18 17:41:17 +01:00 committed by Jon Evans
parent dcf69d53f0
commit a514817c57
1 changed files with 4 additions and 2 deletions

View File

@ -1079,8 +1079,10 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadComponents()
if( comp.Mirror )
{
m->Flip( getKiCadPoint( comp.Origin ), false );
m->SetOrientation( m->GetOrientation() + 1800.0 );
double mirroredAngle = - getAngleTenthDegree( comp.OrientAngle );
NORMALIZE_ANGLE_180( mirroredAngle );
m->SetOrientation( mirroredAngle );
m->Flip( getKiCadPoint( comp.Origin ), true );
}
loadComponentAttributes( comp, m );