Skip to content

Commit 0b3dbf1

Browse files
--
1 parent 355349c commit 0b3dbf1

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

energyml-utils/src/energyml/utils/data/crs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ def apply_from_crs_info(
767767
Transform pipeline (order matters):
768768
769769
1. **Areal rotation** (RESQML convention: *clockwise* angle) →
770-
``x' = x·cos θ + y·sin θ``, ``y' = x·sin θ + y·cos θ``
770+
``x' = x·cos θ + y·sin θ``, ``y' = -x·sin θ + y·cos θ``
771771
2. **Translation** — add ``(x_offset, y_offset, z_offset)``
772772
3. **Z-axis flip** — negate Z when the CRS *is*
773773
z-increasing-downward (i.e. the local CRS stores depth as positive Z,

energyml-utils/src/energyml/utils/data/helper.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ class RgbaColor:
15131513
a: float = 1.0
15141514

15151515
def to_uint8(self) -> Tuple[int, int, int, int]:
1516-
"""Return (R, G, B, A) in [0, 255] ready for VTK / PyVista."""
1516+
"""Return (R, G, B, A) in [0, 255] - ready for VTK / PyVista."""
15171517
return (
15181518
int(round(self.r * 255)),
15191519
int(round(self.g * 255)),
@@ -1610,7 +1610,7 @@ def to_vtk_lut(self, n_colors: int = 256) -> np.ndarray:
16101610
sorted_entries = sorted(self.entries, key=lambda e: e.index)
16111611

16121612
if not self.is_continuous:
1613-
# One exact row per integer entry no interpolation needed.
1613+
# One exact row per integer entry - no interpolation needed.
16141614
return np.array(
16151615
[e.color.to_uint8() for e in sorted_entries], dtype=np.uint8
16161616
)
@@ -1689,7 +1689,7 @@ class ScalarRenderingInfo:
16891689

16901690

16911691
# ─────────────────────────────────────────────────────────────────────────────
1692-
# Color-map readers (Group 1 both return ColorMapInfo)
1692+
# Color-map readers (Group 1 - both return ColorMapInfo)
16931693
# ─────────────────────────────────────────────────────────────────────────────
16941694

16951695

@@ -1734,7 +1734,7 @@ def read_discrete_color_map(color_map_obj: Any) -> ColorMapInfo:
17341734
17351735
**Output**: :class:`ColorMapInfo` with ``is_continuous=False`` and one
17361736
entry per integer code. ``to_vtk_lut()`` returns exactly one RGBA row per
1737-
entry suitable for VTK's categorical lookup table
1737+
entry - suitable for VTK's categorical lookup table
17381738
(``vtkLookupTable.SetAnnotation`` workflow).
17391739
"""
17401740
entries = sorted(
@@ -1897,6 +1897,6 @@ def read_graphical_rendering_info(
18971897
result.contour_show_major_every = getattr(info, "show_major_line_every", None)
18981898

18991899
# AnnotationInformation is intentionally not mapped to ScalarRenderingInfo
1900-
# because it drives label text, not colour/size handle separately if needed.
1900+
# because it drives label text, not colour/size - handle separately if needed.
19011901

19021902
return result if found else None

energyml-utils/src/energyml/utils/data/mesh_numpy.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
1010
Design goals
1111
------------
12-
* **No list conversion** no ``.tolist()`` calls anywhere. Arrays stay as
12+
* **No list conversion** - no ``.tolist()`` calls anywhere. Arrays stay as
1313
numpy throughout.
14-
* **Best-effort zero-copy** geometry is read via
14+
* **Best-effort zero-copy** - geometry is read via
1515
:meth:`EnergymlStorageInterface.read_array_view`. For contiguous,
1616
uncompressed HDF5 datasets this returns a numpy view backed directly by the
1717
memory-mapped file buffer (no RAM copy). Chunked / compressed datasets fall
1818
back silently to a copy.
19-
* **PyVista-ready connectivity** ``faces`` / ``lines`` / ``cells`` arrays
19+
* **PyVista-ready connectivity** - ``faces`` / ``lines`` / ``cells`` arrays
2020
use the VTK flat-count-prefixed format consumed directly by
2121
``pyvista.PolyData`` and ``pyvista.UnstructuredGrid`` without additional
2222
allocation.
23-
* **Backward compatible** :mod:`mesh.py` is untouched; both modules can be
23+
* **Backward compatible** - :mod:`mesh.py` is untouched; both modules can be
2424
used side by side.
2525
2626
Usage
@@ -91,7 +91,7 @@ def __init__(self, ws: EnergymlStorageInterface) -> None:
9191
def __getattr__(self, name: str) -> Any:
9292
return getattr(self._ws, name)
9393

94-
def read_array( # noqa: D102 mirrors EnergymlStorageInterface
94+
def read_array( # noqa: D102 - mirrors EnergymlStorageInterface
9595
self,
9696
proxy: Any,
9797
path_in_external: str,
@@ -121,8 +121,8 @@ class NumpyMesh:
121121
"""Base class for all numpy-backed mesh objects.
122122
123123
Subclasses guarantee:
124-
* ``points`` shape ``(N, 3)``, dtype ``float64``
125-
* Connectivity arrays dtype ``int64``, VTK flat format
124+
* ``points`` - shape ``(N, 3)``, dtype ``float64``
125+
* Connectivity arrays - dtype ``int64``, VTK flat format
126126
"""
127127

128128
energyml_object: Any = field(default=None)
@@ -169,7 +169,7 @@ class NumpySurfaceMesh(NumpyMesh):
169169
class NumpyVolumeMesh(NumpyMesh):
170170
"""A volumetric mesh (hexahedral, polyhedral, …).
171171
172-
``cells`` VTK flat format, ``cell_types`` uint8 VTK cell-type codes.
172+
``cells`` - VTK flat format, ``cell_types`` - uint8 VTK cell-type codes.
173173
``pyvista.UnstructuredGrid(cells, cell_types, points)`` accepts them
174174
directly.
175175
"""

0 commit comments

Comments
 (0)