Skip to content

Commit

Permalink
fix(methods.py): flip surface polygon for surface matrices, assuming …
Browse files Browse the repository at this point in the history
…interior surfaces facing inside"

;
  • Loading branch information
Taoning Wang committed Jan 12, 2024
1 parent 8be18ac commit 8398269
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frads/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
XENON,
)

__version__ = "1.2.2"
__version__ = "1.2.3"

logger: logging.Logger = logging.getLogger(__name__)

Expand Down
5 changes: 4 additions & 1 deletion frads/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
minutes_to_datetime,
parse_polygon,
parse_rad_header,
polygon_primitive,
random_string,
)
import numpy as np
Expand Down Expand Up @@ -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,
)

Expand Down

0 comments on commit 8398269

Please sign in to comment.