engeom 0.2.10__cp38-abi3-macosx_11_0_arm64.whl → 0.2.12__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.
engeom/engeom.abi3.so CHANGED
Binary file
engeom/geom2.pyi CHANGED
@@ -138,6 +138,22 @@ class Vector2(Iterable[float]):
138
138
  """
139
139
  ...
140
140
 
141
+ def with_x(self, x: float) -> Vector2:
142
+ """
143
+ Return a new vector with the same y component as this vector, but with the x component set to the given value.
144
+ :param x: the new x component of the vector.
145
+ :return: a new vector with the same y component as this vector, but with the x component set to the given value.
146
+ """
147
+ ...
148
+
149
+ def with_y(self, y: float) -> Vector2:
150
+ """
151
+ Return a new vector with the same x component as this vector, but with the y component set to the given value.
152
+ :param y: the new y component of the vector.
153
+ :return: a new vector with the same x component as this vector, but with the y component set to the given value.
154
+ """
155
+ ...
156
+
141
157
 
142
158
  class Point2(Iterable[float]):
143
159
  """
@@ -243,6 +259,22 @@ class Point2(Iterable[float]):
243
259
  """
244
260
  ...
245
261
 
262
+ def with_x(self, x: float) -> Point2:
263
+ """
264
+ Return a new point with the same y component as this point, but with the x component set to the given value.
265
+ :param x: the new x component of the point.
266
+ :return: a new point with the same y component as this point, but with the x component set to the given value.
267
+ """
268
+ ...
269
+
270
+ def with_y(self, y: float) -> Point2:
271
+ """
272
+ Return a new point with the same x component as this point, but with the y component set to the given value.
273
+ :param y: the new y component of the point.
274
+ :return: a new point with the same x component as this point, but with the y component set to the given value.
275
+ """
276
+ ...
277
+
246
278
 
247
279
  class SurfacePoint2:
248
280
  """
@@ -950,6 +982,43 @@ class Circle2:
950
982
  """
951
983
  ...
952
984
 
985
+ @staticmethod
986
+ def fitting(points: NDArray[float], guess: Circle2 | None = None, sigma: float | None = None) -> Circle2:
987
+ """
988
+ Fit a circle to a set of points using an unconstrained Levenberg-Marquardt minimization of the sum of
989
+ squared errors between the points and the boundary of the circle.
990
+
991
+ The initial guess is used to provide a starting point for the optimization. If no guess is provided, the
992
+ unit circle will be used.
993
+
994
+ The sigma parameter is used to weight the points in the optimization. If no sigma is provided, all points
995
+ will be weighted equally, otherwise points beyond `sigma` standard deviations from the mean will be
996
+ assigned a weight of 0.0.
997
+ :param points: the points to fit the circle to.
998
+ :param guess: an optional initial guess for the circle. If None, the unit circle will be used.
999
+ :param sigma: an optional standard deviation to use for weighting the points. If None, all points will be
1000
+ weighted equally.
1001
+ :return: a new `Circle2` object representing the fitted circle.
1002
+ """
1003
+ ...
1004
+
1005
+ @staticmethod
1006
+ def ransac(points: NDArray[float], tol: float, iterations: int | None = None, min_r: float | None = None,
1007
+ max_r: float | None = None) -> Circle2:
1008
+ """
1009
+ Fit a circle to a set of points using the RANSAC algorithm. The algorithm will randomly sample points from the
1010
+ input set and fit a circle to them, then check how many points are within the given tolerance of the fitted
1011
+ circle. The best fitting circle will be returned.
1012
+
1013
+ :param points: the points to fit the circle to.
1014
+ :param tol: the tolerance for the RANSAC algorithm.
1015
+ :param iterations: the number of iterations to run. If None, a default value of 500 will be used.
1016
+ :param min_r: the minimum radius of the circle. If None, no minimum will be enforced.
1017
+ :param max_r: the maximum radius of the circle. If None, no maximum will be enforced.
1018
+ :return: a new `Circle2` object representing the fitted circle.
1019
+ """
1020
+ ...
1021
+
953
1022
 
954
1023
  class Arc2:
955
1024
  """
@@ -1148,3 +1217,11 @@ class Aabb2:
1148
1217
  :return: a new AABB object with the shrunk bounds.
1149
1218
  """
1150
1219
  ...
1220
+
1221
+ def merged(self, other: Aabb2) -> Aabb2:
1222
+ """
1223
+ Merge this AABB with another AABB and return a new AABB.
1224
+ :param other: the other AABB to merge with.
1225
+ :return: a new AABB object that is the result of merging this AABB with the other AABB.
1226
+ """
1227
+ ...
engeom/geom3.pyi CHANGED
@@ -150,6 +150,33 @@ class Vector3(Iterable[float]):
150
150
  """
151
151
  ...
152
152
 
153
+ def with_x(self, x: float) -> Vector3:
154
+ """
155
+ Return a new vector with the same y and z components as this vector, but with the x component set to the
156
+ specified value.
157
+ :param x: the new x component of the vector.
158
+ :return: a new vector with the specified x component.
159
+ """
160
+ ...
161
+
162
+ def with_y(self, y: float) -> Vector3:
163
+ """
164
+ Return a new vector with the same x and z components as this vector, but with the y component set to the
165
+ specified value.
166
+ :param y: the new y component of the vector.
167
+ :return: a new vector with the specified y component.
168
+ """
169
+ ...
170
+
171
+ def with_z(self, z: float) -> Vector3:
172
+ """
173
+ Return a new vector with the same x and y components as this vector, but with the z component set to the
174
+ specified value.
175
+ :param z: the new z component of the vector.
176
+ :return: a new vector with the specified z component.
177
+ """
178
+ ...
179
+
153
180
 
154
181
  class Point3(Iterable[float]):
155
182
  """
@@ -267,6 +294,33 @@ class Point3(Iterable[float]):
267
294
  """
268
295
  ...
269
296
 
297
+ def with_x(self, x: float) -> Point3:
298
+ """
299
+ Return a new point with the same y and z coordinates as this point, but with the x coordinate set to the
300
+ specified value.
301
+ :param x: the new x coordinate of the point.
302
+ :return: a new point with the specified x coordinate.
303
+ """
304
+ ...
305
+
306
+ def with_y(self, y: float) -> Point3:
307
+ """
308
+ Return a new point with the same x and z coordinates as this point, but with the y coordinate set to the
309
+ specified value.
310
+ :param y: the new y coordinate of the point.
311
+ :return: a new point with the specified y coordinate.
312
+ """
313
+ ...
314
+
315
+ def with_z(self, z: float) -> Point3:
316
+ """
317
+ Return a new point with the same x and y coordinates as this point, but with the z coordinate set to the
318
+ specified value.
319
+ :param z: the new z coordinate of the point.
320
+ :return: a new point with the specified z coordinate.
321
+ """
322
+ ...
323
+
270
324
 
271
325
  class SurfacePoint3:
272
326
  """
@@ -461,6 +515,29 @@ class Iso3:
461
515
  """
462
516
  ...
463
517
 
518
+ @staticmethod
519
+ def from_xyzwpr(x: float, y: float, z: float, w: float, p: float, r: float) -> Iso3:
520
+ """
521
+ Create an isometry from the specified translation and rotation angles in yaw, pitch, and roll format, following
522
+ the convention typically used in robotics. The angles are specified in degrees.
523
+ :param x:
524
+ :param y:
525
+ :param z:
526
+ :param w:
527
+ :param p:
528
+ :param r:
529
+ :return:
530
+ """
531
+ ...
532
+
533
+ def to_xyzwpr(self) -> List[float]:
534
+ """
535
+ Convert the isometry to a list of translation and rotation angles in yaw, pitch, and roll format, following the
536
+ convention typically used in robotics. The angles are returned in degrees.
537
+ :return: a list of 6 floats representing the translation and rotation angles.
538
+ """
539
+ ...
540
+
464
541
  def __matmul__(self, other: Transformable3) -> Transformable3:
465
542
  """
466
543
  Multiply another object by the isometry, transforming it and returning a new object of the same type.
@@ -537,6 +614,14 @@ class Iso3:
537
614
  """
538
615
  ...
539
616
 
617
+ @property
618
+ def origin(self) -> Point3:
619
+ """
620
+ Get the origin of the isometry as a Point3 object.
621
+ :return: a Point3 object representing the origin of the isometry.
622
+ """
623
+ ...
624
+
540
625
  def translation(self) -> Iso3:
541
626
  """
542
627
  Return the translation component of the isometry as a separate isometry.
@@ -1157,14 +1242,14 @@ class Mesh:
1157
1242
  ...
1158
1243
 
1159
1244
  @staticmethod
1160
- def create_box(width: float, height: float, depth: float) -> Mesh:
1245
+ def create_box(length: float, width: float, height: float) -> Mesh:
1161
1246
  """
1162
- Creates a box with the corner at the origin and the specified width, height, and depth all positive.
1247
+ Creates a box with the center at the origin and the specified length, width, and height
1163
1248
 
1164
- :param width:
1165
- :param height:
1166
- :param depth:
1167
- :return:
1249
+ :param length: the size of the box along the X-axis
1250
+ :param width: the size of the box along the Y-axis
1251
+ :param height: the size of the box along the Z-axis
1252
+ :return: a new `Mesh` object representing the box
1168
1253
  """
1169
1254
  ...
1170
1255
 
@@ -1172,14 +1257,92 @@ class Mesh:
1172
1257
  def create_cylinder(radius: float, height: float, steps: int) -> Mesh:
1173
1258
  """
1174
1259
  Creates a cylinder with a radius and height. The cylinder will be centered at the origin and oriented along the
1175
- Z-axis. The bottom of the cylinder will be at Z = 0 and the top will be at Z = height. The cylinder will be
1176
- created with a number of steps around the circumference, which will determine the number of vertices used to
1177
- create the cylinder. The number of steps should be at least 3. The first set of vertices will be at X = radius,
1178
- Y = 0.
1179
- :param radius:
1180
- :param height:
1181
- :param steps:
1182
- :return:
1260
+ Y-axis.
1261
+
1262
+ :param radius: the radius of the cylinder
1263
+ :param height: the size of the cylinder along the Y-axis
1264
+ :param steps: the number of subdivisions to create vertices around the cylinder. The more steps the smoother the
1265
+ cylinder will be.
1266
+ :return: a new `Mesh` object representing the cylinder
1267
+ """
1268
+ ...
1269
+
1270
+ @staticmethod
1271
+ def create_sphere(radius: float, n_theta: int, n_phi: int) -> Mesh:
1272
+ """
1273
+ Creates a sphere with a radius. The sphere will be centered at the origin. The step counts `n_theta` and `n_phi`
1274
+ will determine the smoothness of the sphere in the radial (n_theta) and polar (n_phi) directions. The poles
1275
+ will be located at Y=+radius and Y=-radius, and the equator will lie in the XZ plane.
1276
+
1277
+ :param radius: the radius of the sphere
1278
+ :param n_theta: the number of subdivisions to create vertices around the sphere in the theta direction
1279
+ :param n_phi: the number of subdivisions to create vertices around the sphere in the phi direction
1280
+ :return: a new `Mesh` object representing the sphere
1281
+ """
1282
+ ...
1283
+
1284
+ @staticmethod
1285
+ def create_cone(radius: float, height: float, steps: int) -> Mesh:
1286
+ """
1287
+ Creates a cone with a radius and height. The cone will be centered at the origin and oriented so that the
1288
+ point of the cone is located at Y=height/2 and the base is located at Y=-height/2.
1289
+
1290
+ :param radius: the radius of the base of the cone
1291
+ :param height: the size of the cone along the Y-axis
1292
+ :param steps: the number of subdivisions to create vertices around the cone. The more steps the smoother the
1293
+ cone will be.
1294
+ :return: a new `Mesh` object representing the cone
1295
+ """
1296
+ ...
1297
+
1298
+ @staticmethod
1299
+ def create_capsule(p0: Point3, p1: Point3, radius: float, n_theta: int, n_phi: int) -> Mesh:
1300
+ """
1301
+ Creates a capsule shape between two points with a specified radius. The capsule will be centered between the two
1302
+ points and oriented along the line connecting them. The step counts `n_theta` and `n_phi` will determine the
1303
+ smoothness of the sphere in the radial (n_theta) and polar (n_phi) directions.
1304
+
1305
+ :param p0: the first point of the capsule
1306
+ :param p1: the second point of the capsule
1307
+ :param radius: the radius of the capsule
1308
+ :param n_theta: the number of subdivisions to create vertices around the sphere in the theta direction
1309
+ :param n_phi: the number of subdivisions to create vertices around the sphere in the phi direction
1310
+ :return: a new `Mesh` object representing the capsule
1311
+ """
1312
+ ...
1313
+
1314
+ @staticmethod
1315
+ def create_cylinder_between(p0: Point3, p1: Point3, radius: float, steps: int) -> Mesh:
1316
+ """
1317
+ Creates a cylinder between two points with a specified radius. The cylinder will be centered between the two
1318
+ points and oriented along the line connecting them.
1319
+
1320
+ :param p0: the first point of the cylinder
1321
+ :param p1: the second point of the cylinder
1322
+ :param radius: the radius of the cylinder
1323
+ :param steps: the number of subdivisions to create vertices around the cylinder. The more steps the smoother the
1324
+ cylinder will be.
1325
+ :return: a new `Mesh` object representing the cylinder
1326
+ """
1327
+ ...
1328
+
1329
+ @staticmethod
1330
+ def create_rect_beam_between(p0: Point3, p1: Point3, width: float, height: float,
1331
+ up: Vector3 | None = None) -> Mesh:
1332
+ """
1333
+ Create a rectangular cross-sectioned prism between two points with a specified width and height. The prism will
1334
+ be centered between the two points and oriented along the line connecting them. The up vector's projection onto
1335
+ the line connecting the two end points will determine the direction of the height of the prism. If None, the
1336
+ height will be aligned with the projection of the Z-axis.
1337
+
1338
+ If the up vector is parallel to the line connecting the two points, an error will be thrown.
1339
+
1340
+ :param p0: the first point of the prism
1341
+ :param p1: the second point of the prism
1342
+ :param width: the width of the prism
1343
+ :param height: the height of the prism
1344
+ :param up: the up vector to use for the height direction. If None, the Z-axis will be used
1345
+ :return: a new `Mesh` object representing the prism
1183
1346
  """
1184
1347
  ...
1185
1348
 
@@ -1304,6 +1467,7 @@ class MeshCollisionSet:
1304
1467
  """
1305
1468
  ...
1306
1469
 
1470
+
1307
1471
  class CurveStation3:
1308
1472
  """
1309
1473
  A class representing a station along a curve in 3D space. The station is represented by a point on the curve, a
@@ -1578,6 +1742,15 @@ class Aabb3:
1578
1742
  """
1579
1743
  ...
1580
1744
 
1745
+ def merged(self, other: Aabb3) -> Aabb3:
1746
+ """
1747
+ Merge this AABB with another AABB. The resulting AABB will be the smallest AABB that contains both AABBs.
1748
+
1749
+ :param other: the other AABB to merge with.
1750
+ :return: a new AABB object representing the merged bounds.
1751
+ """
1752
+ ...
1753
+
1581
1754
 
1582
1755
  class RayBundle3:
1583
1756
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: engeom
3
- Version: 0.2.10
3
+ Version: 0.2.12
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -1,8 +1,8 @@
1
- engeom-0.2.10.dist-info/METADATA,sha256=pspg1fX2bXgPBv5Ohzo6PabHa0gSDMki855BQddwTOo,495
2
- engeom-0.2.10.dist-info/WHEEL,sha256=KOb2uEsUFKFV_GOdT9ev2YJZGn1-e8xqWy3VUx4M6FQ,102
1
+ engeom-0.2.12.dist-info/METADATA,sha256=oj_j8a0BXohXxgNPJ9iTWDa2cOEseTP6Kkq_pmad9Qk,495
2
+ engeom-0.2.12.dist-info/WHEEL,sha256=KOb2uEsUFKFV_GOdT9ev2YJZGn1-e8xqWy3VUx4M6FQ,102
3
3
  engeom/raster3.pyi,sha256=sBXXYXcDBiDU_OFDQiwa7Q3GcwSiUc4CLy6nJ1MwFqM,790
4
- engeom/geom2.pyi,sha256=uMi4WD6-DtFx8H-RZsKIi-p1fN4p8SzOfBZmEuvNGDU,44357
5
- engeom/geom3.pyi,sha256=VYxc9kZQhfHNN13E1DpAzea9z6R6gvpKtxyL8Wm9oWU,69140
4
+ engeom/geom2.pyi,sha256=Gg6Dw9yKOjc_1-sJiBPWDbGgQH5P5g6Ac80XRS-ziSQ,48330
5
+ engeom/geom3.pyi,sha256=p6wiyIRMNFVBe6zgNGkDVqC1JRysq5OwwO654BPWoOI,76829
6
6
  engeom/geom3/__init__.py,sha256=l8B0iDhJ4YiRbslJLN791XWai2DWrpmZptnzIETMS9g,370
7
7
  engeom/geom2/__init__.py,sha256=JFpiLyROUh6vyakG-7JDSlCMCn4QB2MQ8bz3uVCaAIk,373
8
8
  engeom/plot.py,sha256=LTqqO-h1EJL6wanM0hB79s9ohWwaCIijMOHVplY3vmc,1079
@@ -21,5 +21,5 @@ engeom/engeom.pyi,sha256=BtUBtYZ_MX8Xk2x_FyzVxRXjJQIazQ1xscbCLO_Y3HA,1516
21
21
  engeom/sensor.pyi,sha256=a9y62FqhG-CFFHnJiC03PqBpFtxtfkH0zoDkk9LXWnU,1399
22
22
  engeom/metrology.pyi,sha256=9I5un86VB_2gmQBrVYhX8JzILTUADMLB9Em8ttJxrWg,4044
23
23
  engeom/align.pyi,sha256=QCSKrTLkCoaIubcrPU9J-wDZe1lRP0GbPgWZmonXjo0,997
24
- engeom/engeom.abi3.so,sha256=AUo6dtmxpTG-aw6385vW5HNhzwKIJbxJd6FXLExO3ug,2983744
25
- engeom-0.2.10.dist-info/RECORD,,
24
+ engeom/engeom.abi3.so,sha256=CWsULIWo1ZV-Ux2V1q4w-f5oJdf2oswTO17T5NWutmk,3087152
25
+ engeom-0.2.12.dist-info/RECORD,,