From 7e90ff4c8b5c36797fbd525d5285a45f31e0916e Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 1 May 2024 11:56:11 +0000 Subject: [PATCH] Logicx --- extremitypathfinder/extremitypathfinder.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extremitypathfinder/extremitypathfinder.py b/extremitypathfinder/extremitypathfinder.py index 0911494..4c6876e 100644 --- a/extremitypathfinder/extremitypathfinder.py +++ b/extremitypathfinder/extremitypathfinder.py @@ -86,6 +86,14 @@ def store( """ self.prepared = False # loading the map + + if boundary_coordinates is None: + min_x = min(coord[0] for hole in list_of_hole_coordinates for coord in hole) + max_x = max(coord[0] for hole in list_of_hole_coordinates for coord in hole) + min_y = min(coord[1] for hole in list_of_hole_coordinates for coord in hole) + max_y = max(coord[1] for hole in list_of_hole_coordinates for coord in hole) + boundary_coordinates = [(min_x, min_y), (max_x, min_y), (max_x, max_y), (min_x, max_y)] + boundary_coordinates = np.array(boundary_coordinates, dtype=configs.DTYPE_FLOAT) list_of_hole_coordinates = [ np.array(hole_coords, dtype=configs.DTYPE_FLOAT)