mirror of
https://github.com/pim-n/pg-rad
synced 2026-03-10 19:48:12 +01:00
add default box height to ensure non-zero z dimension in the landscape
This commit is contained in:
@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user