CADSTAR PCB Archive Importer: Fix imported Text Angle when mirrored
Angle needs to be negated in KiCad
This commit is contained in:
parent
7839a508b3
commit
6fb338d136
|
@ -1572,6 +1572,10 @@ void CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText( const TEXT& aCadstarText,
|
|||
txt->SetPosition( rotatedTextPos );
|
||||
|
||||
txt->SetTextAngle( getAngleTenthDegree( aCadstarText.OrientAngle ) + aRotationAngle );
|
||||
|
||||
if( !aCadstarText.Mirror != !aMirrorInvert ) // If mirroring, invert angle to match CADSTAR
|
||||
txt->SetTextAngle( -txt->GetTextAngle() );
|
||||
|
||||
txt->SetMirrored( aCadstarText.Mirror );
|
||||
|
||||
TEXTCODE tc = getTextCode( aCadstarText.TextCodeID );
|
||||
|
@ -2165,6 +2169,9 @@ void CADSTAR_PCB_ARCHIVE_LOADER::addAttribute( const ATTRIBUTE_LOCATION& aCadsta
|
|||
txt->SetTextAngle(
|
||||
getAngleTenthDegree( aCadstarAttrLoc.OrientAngle ) - aModule->GetOrientation() );
|
||||
|
||||
if( aCadstarAttrLoc.Mirror ) // If mirroring, invert angle to match CADSTAR
|
||||
txt->SetTextAngle( -txt->GetTextAngle() );
|
||||
|
||||
TEXTCODE tc = getTextCode( aCadstarAttrLoc.TextCodeID );
|
||||
|
||||
txt->SetTextThickness( getKiCadLength( tc.LineWidth ) );
|
||||
|
|
Loading…
Reference in New Issue