CalcArcCenter(): fix broken calculation of the arc center.
This function is used in the graphic items properties dialog, and each arc edition from this dialog breaks the arc center position Fixes #11703 https://gitlab.com/kicad/code/kicad/issues/11703
This commit is contained in:
parent
abba1b04bd
commit
046045f9de
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||||
* Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2014-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -328,7 +328,7 @@ const VECTOR2D CalcArcCenter( const VECTOR2D& aStart, const VECTOR2D& aEnd,
|
||||||
VECTOR2D vec2 = (end - start).Resize( d );
|
VECTOR2D vec2 = (end - start).Resize( d );
|
||||||
VECTOR2D vc = (end - start).Resize( chord / 2 );
|
VECTOR2D vc = (end - start).Resize( chord / 2 );
|
||||||
|
|
||||||
RotatePoint( vec2, ANGLE_90 );
|
RotatePoint( vec2, -ANGLE_90 );
|
||||||
|
|
||||||
return VECTOR2D( start + vc + vec2 );
|
return VECTOR2D( start + vc + vec2 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue