From 69d75b90b1152788a4fda1bcc2edc9258fa69683 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sat, 18 Jul 2020 12:22:45 -0700 Subject: [PATCH] Adding failed arc test This test implements a case where the current arc calculations fail --- qa/libs/kimath/geometry/test_shape_arc.cpp | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/qa/libs/kimath/geometry/test_shape_arc.cpp b/qa/libs/kimath/geometry/test_shape_arc.cpp index 52cd3f5493..f107363ff3 100644 --- a/qa/libs/kimath/geometry/test_shape_arc.cpp +++ b/qa/libs/kimath/geometry/test_shape_arc.cpp @@ -173,6 +173,44 @@ struct ARC_CPA_CASE }; static const std::vector arc_cases = { + { + "C(0,0) 114 + 360 degree", + { + { 0, 0 }, + { -306451, 687368 }, + 360, + }, + 0, + { + { 0, 0 }, + { -306451, 687368 }, + { -306451, 687368 }, + 360, + 113.95929, + 113.95929, + 752587, + { { -752587, -752587 }, { 1505174, 1505174 } }, + }, + }, + { + "C(0,0) 180 + 360 degree", + { + { 0, 0 }, + { -100, 0 }, + 360, + }, + 0, + { + { 0, 0 }, + { -100, 0 }, + { -100, 0 }, + 360, + 180, + 180, + 100, + { { -100, -100 }, { 200, 200 } }, + }, + }, { "C(0,0) 180 + 90 degree", {