From 7a3c404ceeaaca6375b12bb032c31496683fbfc5 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 25 May 2023 19:35:32 +0200 Subject: [PATCH] Add unit test for QGIS reported offset curve weirdness See https://github.com/qgis/QGIS/issues/53165 --- tests/unit/operation/buffer/OffsetCurveTest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/unit/operation/buffer/OffsetCurveTest.cpp b/tests/unit/operation/buffer/OffsetCurveTest.cpp index 8ac3a22260..7f37902ceb 100644 --- a/tests/unit/operation/buffer/OffsetCurveTest.cpp +++ b/tests/unit/operation/buffer/OffsetCurveTest.cpp @@ -553,6 +553,20 @@ void object::test<40> () ); } +// See https://github.com/qgis/QGIS/issues/53165 +template<> +template<> +void object::test<41> () +{ + checkOffsetCurve( + "LINESTRING (421.3851855669636279 622.2522632932523265, 446.2721764058806002 625.2150002978742123, 448.8256617572624236 626.8399455213802867)", + 112.369, // distance + 0, // number of segments + BufferParameters::JOIN_MITRE, + 2, // mitre limit + "LINESTRING (509.1540012679829488 532.0382691415252339, 484.9905620941226516 516.6615351227474093, 434.6686888251484220 510.6708359240824961)" + ); +} } // namespace tut