engeom 0.2.15__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
engeom/geom3.pyi CHANGED
@@ -537,6 +537,14 @@ class Iso3:
537
537
  Create an isometry from a translation and a quaternion representing the rotation.
538
538
  :return: an isometry containing both translation and rotation components.
539
539
  """
540
+ ...
541
+
542
+ def to_quaternion(self) -> Tuple[float, float, float, float, float, float, float]:
543
+ """
544
+ Convert the isometry to a tuple containing the translation and quaternion components.
545
+ :return: a tuple of 7 floats in the order (tx, ty, tz, i, j, k, w)
546
+ """
547
+ ...
540
548
 
541
549
  @staticmethod
542
550
  def from_translation(x: float, y: float, z: float) -> Iso3:
@@ -1317,6 +1325,18 @@ class Mesh:
1317
1325
  :return: a `SurfacePoint3` object containing the closest point and normal
1318
1326
  """
1319
1327
  ...
1328
+
1329
+ def barycentric_closest_to(self, x: float, y: float, z: float) -> Tuple[int, List[float]]:
1330
+ """
1331
+ Find the closest point on the surface of the mesh to a given point in space, returning the triangle index and
1332
+ the barycentric coordinates of the closest point within that triangle.
1333
+ :param x: the x coordinate of the point to find the closest point to
1334
+ :param y: the y coordinate of the point to find the closest point to
1335
+ :param z: the z coordinate of the point to find the closest point to
1336
+ :return: a tuple containing the triangle index and a list of three barycentric coordinates
1337
+ """
1338
+ ...
1339
+
1320
1340
  def point_closest_to(self, x: float, y: float, z: float) -> Point3:
1321
1341
  """
1322
1342
  Find the closest point on the surface of the mesh to a given point in space, returning the point
@@ -1998,6 +2018,17 @@ class PointCloud:
1998
2018
  """
1999
2019
  ...
2000
2020
 
2021
+ @staticmethod
2022
+ def load_bxyz(path: str | Path) -> PointCloud:
2023
+ """
2024
+ Load a point cloud from a BXYZ file. The BXYZ format is a binary format for storing 3D point clouds with
2025
+ optional normals and colors.
2026
+
2027
+ :param path: the path to the BXYZ file to load.
2028
+ :return: a new `PointCloud` object containing the points, normals, and colors from the BXYZ file.
2029
+ """
2030
+ ...
2031
+
2001
2032
  def append(self, other: PointCloud) -> PointCloud:
2002
2033
  """
2003
2034
  Append another point cloud to this one. The points, normals, and colors from the other point cloud will be
@@ -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.15
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,25 +1,27 @@
1
- engeom-0.2.15.dist-info/METADATA,sha256=WoxcP2de4LzW9Sr6URHa3m7fL68MYDvBonV6MtEKYm4,340
2
- engeom-0.2.15.dist-info/WHEEL,sha256=ZVGxA8yt9_vb48aMHrAuBUBZuM5pTkr3DlHD0kSTpS8,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=M3rjS60H0ux3jnOnr7j6d_mFq89SDz8h_DZDIU1cKlI,4401280
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
16
- engeom/geom3.pyi,sha256=S6PIfcGDxc4kMZDn6uJO_L-DBepzMnUM8RzjiDkQcOU,92982
16
+ engeom/geom3.pyi,sha256=aO8kj5POqXtHpwV5kNxLJg1yLB9ZhlHadONfgM0NlBw,94397
17
17
  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.15.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.3)
2
+ Generator: maturin (1.9.6)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp38-abi3-macosx_11_0_arm64