add default box height to ensure non-zero z dimension in the landscape

This commit is contained in:
Pim Nelissen
2026-02-13 14:56:27 +01:00
parent 49a0dcd301
commit e8bf687563

View File

@ -42,14 +42,18 @@ class Path:
def __init__(
self,
coord_list: Sequence[tuple[float, float]],
z: float = 0
z: float = 0.,
z_box: float = 50.
):
"""Construct a path of sequences based on a list of coordinates.
Args:
coord_list (Sequence[tuple[float, float]]): List of x,y
coordinates.
z (float, optional): Height of the path. Defaults to 0.
z (float, optional): position of the path in z-direction in meters.
Defaults to 0 meters.
z_box (float, optional): How much empty space to set
above the path in meters. Defaults to 50 meters.
"""
if len(coord_list) < 2:
@ -73,7 +77,7 @@ class Path:
self.size = (
np.ceil(max(self.x_list)),
np.ceil(max(self.y_list)),
z
z + z_box
)
logger.debug("Path created.")