From 372082f19b08ae7259516a65d12d19aab2dcff5d Mon Sep 17 00:00:00 2001 From: Pim Nelissen Date: Sun, 3 May 2026 15:58:38 +0200 Subject: [PATCH] add bounds_check optional flag (default false) --- src/pg_rad/landscape/builder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pg_rad/landscape/builder.py b/src/pg_rad/landscape/builder.py index 78ef1cf..2ea096e 100644 --- a/src/pg_rad/landscape/builder.py +++ b/src/pg_rad/landscape/builder.py @@ -107,7 +107,8 @@ class LandscapeBuilder: def set_point_sources( self, - *sources: AbsolutePointSourceSpec | RelativePointSourceSpec + *sources: AbsolutePointSourceSpec | RelativePointSourceSpec, + bounds_check: bool = False ): """Add one or more point sources to the world. @@ -148,7 +149,7 @@ class LandscapeBuilder: # we dont support -x values, but negative y values are possible as # the path is centered in the y direction. - if not ( + if bounds_check and not ( (0 <= pos[0] <= self._size[0]) and (-0.5 * self._size[1] <= pos[1] <= 0.5 * self._size[1]) ):