engeom 0.2.16__cp38-abi3-macosx_11_0_arm64.whl → 0.2.17__cp38-abi3-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -253,6 +253,15 @@ else:
253
253
  x, y = zip(*[_tuplefy(p) for p in points])
254
254
  return self.ax.plot(x, y, marker, markersize=markersize, **kwargs)
255
255
 
256
+ def surface_points(self, *points: SurfacePoint2, arrow_len=1, marker="o", markersize="5", **kwargs):
257
+ x, y = zip(*[(p.point.x, p.point.y) for p in points])
258
+ color = kwargs.get("color", "black")
259
+ kwargs["color"] = color
260
+ self.ax.plot(x, y, marker, markersize=markersize, **kwargs)
261
+ for p in points:
262
+ p: SurfacePoint2
263
+ self.arrow(p.point, p.at_distance(arrow_len), arrow="->", color=color)
264
+
256
265
  def labeled_arrow(self, start: PlotCoords, end: PlotCoords, text: str, fraction: float = 0.5,
257
266
  shift: PlotCoords | None = None,
258
267
  arrow="->", color="black", linewidth: float | None = None, linestyle="-",
engeom/engeom.abi3.so CHANGED
Binary file
@@ -0,0 +1,9 @@
1
+ """
2
+ This module provides a number of classes and functions for working with 2D raster (pixel) data.
3
+ """
4
+
5
+ from ..engeom import _raster2
6
+
7
+ # Global import of all functions
8
+ for name in [n for n in dir(_raster2) if not n.startswith("_")]:
9
+ globals()[name] = getattr(_raster2, name)
engeom/raster2.pyi ADDED
@@ -0,0 +1,59 @@
1
+ from __future__ import annotations
2
+ from typing import List
3
+ from numpy.typing import NDArray
4
+ from engeom.geom3 import Mesh
5
+
6
+
7
+ class ScalarRaster:
8
+ """
9
+ A class representing a 2D scalar raster grid.
10
+ """
11
+
12
+ @property
13
+ def px_size(self) -> float:
14
+ """
15
+ Get the pixel size of the raster grid.
16
+ :return: the pixel size as a float.
17
+ """
18
+ ...
19
+
20
+ @property
21
+ def min_z(self) -> float:
22
+ """
23
+ Get the minimum Z value in the raster grid.
24
+ :return: the minimum Z value as a float.
25
+ """
26
+ ...
27
+
28
+ @property
29
+ def max_z(self) -> float:
30
+ """
31
+ Get the maximum Z value in the raster grid.
32
+ :return: the maximum Z value as a float.
33
+ """
34
+ ...
35
+
36
+ def f_at(self, x: int, y: int) -> float:
37
+ """
38
+ Get the scalar value at the specified grid coordinates.
39
+ :param x: The x-coordinate (column index).
40
+ :param y: The y-coordinate (row index).
41
+ :return: The scalar value at the specified coordinates. If out of bounds, returns NaN.
42
+ """
43
+ ...
44
+
45
+ @staticmethod
46
+ def from_serialized_bytes(data: bytes) -> ScalarRaster:
47
+ """
48
+ Create a ScalarRaster instance from serialized byte data.
49
+ :param data: The byte data representing the serialized raster.
50
+ :return: A ScalarRaster instance.
51
+ """
52
+ ...
53
+
54
+ def build_depth_mesh(self) -> Mesh:
55
+ """
56
+ Build a 3D mesh representation of the raster grid.
57
+ :return: A Mesh object representing the raster grid in 3D space.
58
+ """
59
+ ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: engeom
3
- Version: 0.2.16
3
+ Version: 0.2.17
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -1,15 +1,15 @@
1
- engeom-0.2.16.dist-info/METADATA,sha256=sX-tpGK0jbTlLML0_gcyGd-VcC_Y6Zw7ZdCgHKNnfp0,340
2
- engeom-0.2.16.dist-info/WHEEL,sha256=pgebPsjem356u4Zy3N85L1Dehhqu58lh0UH7yY_Kf14,102
1
+ engeom-0.2.17.dist-info/METADATA,sha256=wrYkV28q2YsVTappCTYf_FD1iZHO_DpnjlNTo4XF0aw,340
2
+ engeom-0.2.17.dist-info/WHEEL,sha256=gnJiauUA-C9eduukCSYPRAnEnckuUqP6yenZ8c1xV7c,102
3
3
  engeom/__init__.py,sha256=QN5uETqrN442w41foyrcCPV_x6NP-mrxkPJhdvdey1g,109
4
4
  engeom/_plot/__init__.py,sha256=F_KviZtxzZGwfEjjn8Ep46N4UVl8VpFJWBzbBUE_J7A,30
5
5
  engeom/_plot/common.py,sha256=Py78ufN3yi59hPwv21SoGcqyZUJS-_PmK8tlAKgSG7Q,517
6
- engeom/_plot/matplotlib.py,sha256=ahLfgE3QHUFcNig6cHkFu9mwSwfMbDcNqkZmGaBh4Zk,15267
6
+ engeom/_plot/matplotlib.py,sha256=uh33uuLCNHF5ZNQ-ihgKF-79F1yXel7Bj3uWJ8lZ8gw,15758
7
7
  engeom/_plot/pyvista.py,sha256=lzwDWUFTbq1cR46nwVtuK4nn_hzbZnXiJPdoxHcKVDU,13930
8
8
  engeom/airfoil.pyi,sha256=SivSrUo3LZSVgXwIFJtgUUejhPh71y8rekzBwaX6exI,24165
9
9
  engeom/airfoil/__init__.py,sha256=gpS9pVepUu90XJ-ePndNupbUMKI0RGxNXPxD9x0iVHY,274
10
10
  engeom/align.pyi,sha256=SaC46l0mqANzp3JAtIk4DdXTLtKBrEr9_xW21algMTk,1935
11
11
  engeom/align/__init__.py,sha256=SEeMqeqLKqJC73Mg8GwPwd9NwWnl-dcCqJ4rPdh8yyc,196
12
- engeom/engeom.abi3.so,sha256=rrwjv5au75FGIAZ4404aWs99fTY0Wd5-UrWgiLwPbJo,4406432
12
+ engeom/engeom.abi3.so,sha256=XI_vnOHEIiJ4Ix6YofKG-n8xuWUFK0H9Fog_B_CivKI,5946144
13
13
  engeom/engeom.pyi,sha256=BtUBtYZ_MX8Xk2x_FyzVxRXjJQIazQ1xscbCLO_Y3HA,1516
14
14
  engeom/geom2.pyi,sha256=oUSner8BEJzJLv82POfOGyjAESw-McZzPq51o9VbdYg,51601
15
15
  engeom/geom2/__init__.py,sha256=JFpiLyROUh6vyakG-7JDSlCMCn4QB2MQ8bz3uVCaAIk,373
@@ -18,8 +18,10 @@ engeom/geom3/__init__.py,sha256=l8B0iDhJ4YiRbslJLN791XWai2DWrpmZptnzIETMS9g,370
18
18
  engeom/metrology.pyi,sha256=9I5un86VB_2gmQBrVYhX8JzILTUADMLB9Em8ttJxrWg,4044
19
19
  engeom/metrology/__init__.py,sha256=XvEhG8uDm1olWwZHDDrQv9LFP5zXhbsGx27PqRq8WE0,304
20
20
  engeom/plot.py,sha256=LTqqO-h1EJL6wanM0hB79s9ohWwaCIijMOHVplY3vmc,1079
21
+ engeom/raster2.pyi,sha256=x7QbaTtSbictfyHACp1YbOCJIkS7Kg3Bq3q2DU96hIc,1648
22
+ engeom/raster2/__init__.py,sha256=jPRqoJ0DeBvPP6n9ieBV8tRbWS5BMrCgiW-oqJprfh0,289
21
23
  engeom/raster3.pyi,sha256=sBXXYXcDBiDU_OFDQiwa7Q3GcwSiUc4CLy6nJ1MwFqM,790
22
24
  engeom/raster3/__init__.py,sha256=iaayLrvco-ZMZPyeK47ox7rYne_51DNb2T2Q0iNNeKE,289
23
25
  engeom/sensors.pyi,sha256=8dQS6PVkbBOdbO17x9UskBOIIh6cP0EILhJXxPVXDNw,4525
24
26
  engeom/sensors/__init__.py,sha256=vy1CXX3gQcaBL25imYmpSAJhlc8v5aDBEBtF6L0PVCs,182
25
- engeom-0.2.16.dist-info/RECORD,,
27
+ engeom-0.2.17.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.9.5)
2
+ Generator: maturin (1.9.6)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp38-abi3-macosx_11_0_arm64