From 8398269594b9be6382166ece4b9146f8a8fac1e8 Mon Sep 17 00:00:00 2001 From: Taoning Wang Date: Fri, 12 Jan 2024 14:21:33 -0800 Subject: [PATCH] fix(methods.py): flip surface polygon for surface matrices, assuming interior surfaces facing inside" ; --- frads/__init__.py | 2 +- frads/methods.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frads/__init__.py b/frads/__init__.py index 6617a7a..ae748cc 100755 --- a/frads/__init__.py +++ b/frads/__init__.py @@ -100,7 +100,7 @@ XENON, ) -__version__ = "1.2.2" +__version__ = "1.2.3" logger: logging.Logger = logging.getLogger(__name__) diff --git a/frads/methods.py b/frads/methods.py index 28aa561..a78e671 100755 --- a/frads/methods.py +++ b/frads/methods.py @@ -37,6 +37,7 @@ minutes_to_datetime, parse_polygon, parse_rad_header, + polygon_primitive, random_string, ) import numpy as np @@ -472,8 +473,10 @@ def __init__(self, config: WorkflowConfig): view.view, xres=view.xres, yres=view.yres ) for name, surface in self.config.model.surfaces.items(): + polygons = [parse_polygon(p) for p in surface.primitives] + flipped_primitives = [polygon_primitive(p.flip(), s.modifier, s.identifier) for p, s in zip(polygons, surface.primitives)] self.surface_senders[name] = SurfaceSender( - surfaces=surface.primitives, + surfaces=flipped_primitives, basis=surface.basis, )