From f7212e1d16ef7a830e59f815f4f5fcd1980bb53d Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Fri, 7 Jan 2022 21:40:44 +0100 Subject: [PATCH] Default result on intersection fix --- deps/martinez-rueda-php/src/Algorithm.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deps/martinez-rueda-php/src/Algorithm.php b/deps/martinez-rueda-php/src/Algorithm.php index 948a752..3529d1c 100644 --- a/deps/martinez-rueda-php/src/Algorithm.php +++ b/deps/martinez-rueda-php/src/Algorithm.php @@ -103,6 +103,10 @@ class Algorithm $result = ($subject->ncontours() == 0) ? $clipping : $subject; } + if ($operation == self::OPERATION_INTERSECTION) { + $result = new Polygon([]); + } + return $result; } @@ -130,6 +134,10 @@ class Algorithm } } + if ($operation == self::OPERATION_INTERSECTION) { + $result = new Polygon([]); + } + return $result; }