diff --git a/pcbnew/pcb_io/altium/altium_pcb.cpp b/pcbnew/pcb_io/altium/altium_pcb.cpp index a164a87f08..7bc4a04c8c 100644 --- a/pcbnew/pcb_io/altium/altium_pcb.cpp +++ b/pcbnew/pcb_io/altium/altium_pcb.cpp @@ -4109,8 +4109,8 @@ void ALTIUM_PCB::ConvertFills6ToBoardItem( const AFILL6& aElem ) if( aElem.rotation != 0. ) { - VECTOR2I center( ( aElem.pos1.x + aElem.pos2.x ) / 2, - ( aElem.pos1.y + aElem.pos2.y ) / 2 ); + VECTOR2I center( aElem.pos1.x / 2 + aElem.pos2.x / 2, + aElem.pos1.y / 2 + aElem.pos2.y / 2 ); shape.Rotate( center, EDA_ANGLE( aElem.rotation, DEGREES_T ) ); } @@ -4140,8 +4140,8 @@ void ALTIUM_PCB::ConvertFills6ToFootprintItem( FOOTPRINT* aFootprint, const AFIL if( aElem.rotation != 0. ) { - VECTOR2I center( ( aElem.pos1.x + aElem.pos2.x ) / 2, - ( aElem.pos1.y + aElem.pos2.y ) / 2 ); + VECTOR2I center( aElem.pos1.x / 2 + aElem.pos2.x / 2, + aElem.pos1.y / 2 + aElem.pos2.y / 2 ); shape.Rotate( center, EDA_ANGLE( aElem.rotation, DEGREES_T ) ); } @@ -4182,7 +4182,8 @@ void ALTIUM_PCB::ConvertFills6ToBoardItemOnLayer( const AFILL6& aElem, PCB_LAYER if( aElem.rotation != 0. ) { // TODO: Do we need SHAPE_T::POLY for non 90° rotations? - VECTOR2I center( ( aElem.pos1.x + aElem.pos2.x ) / 2, ( aElem.pos1.y + aElem.pos2.y ) / 2 ); + VECTOR2I center( aElem.pos1.x / 2 + aElem.pos2.x / 2, + aElem.pos1.y / 2 + aElem.pos2.y / 2 ); fill->Rotate( center, EDA_ANGLE( aElem.rotation, DEGREES_T ) ); } @@ -4205,7 +4206,8 @@ void ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, con if( aElem.rotation != 0. ) { // TODO: Do we need SHAPE_T::POLY for non 90° rotations? - VECTOR2I center( ( aElem.pos1.x + aElem.pos2.x ) / 2, ( aElem.pos1.y + aElem.pos2.y ) / 2 ); + VECTOR2I center( aElem.pos1.x / 2 + aElem.pos2.x / 2, + aElem.pos1.y / 2 + aElem.pos2.y / 2 ); fill->Rotate( center, EDA_ANGLE( aElem.rotation, DEGREES_T ) ); }