resqpy 4.14.2__py3-none-any.whl → 4.14.3__py3-none-any.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.
- resqpy/__init__.py +1 -1
- resqpy/surface/_surface.py +27 -1
- {resqpy-4.14.2.dist-info → resqpy-4.14.3.dist-info}/METADATA +1 -1
- {resqpy-4.14.2.dist-info → resqpy-4.14.3.dist-info}/RECORD +6 -6
- {resqpy-4.14.2.dist-info → resqpy-4.14.3.dist-info}/LICENSE +0 -0
- {resqpy-4.14.2.dist-info → resqpy-4.14.3.dist-info}/WHEEL +0 -0
resqpy/__init__.py
CHANGED
resqpy/surface/_surface.py
CHANGED
@@ -461,6 +461,30 @@ class Surface(rqsb.BaseSurface):
|
|
461
461
|
assert triangles is not None
|
462
462
|
return triangulate.edges(triangles)
|
463
463
|
|
464
|
+
def edge_lengths(self, required_uom = None):
|
465
|
+
"""Returns float array of shape (N, 3) being triangle edge lengths.
|
466
|
+
|
467
|
+
arguments:
|
468
|
+
required_uom (str, optional): the required length uom for the resulting edge lengths; default is crs xy units
|
469
|
+
|
470
|
+
returns:
|
471
|
+
numpy float array of shape (N, 3) where N is the number of triangles
|
472
|
+
"""
|
473
|
+
|
474
|
+
t, p = self.triangles_and_points()
|
475
|
+
crs = rqc.Crs(self.model, uuid = self.crs_uuid)
|
476
|
+
if required_uom is None:
|
477
|
+
required_uom = crs.xy_units
|
478
|
+
if crs.xy_units != required_uom or crs.z_units != required_uom:
|
479
|
+
p = p.copy()
|
480
|
+
wam.convert_lengths(p[:, :2], crs.xy_units, required_uom)
|
481
|
+
wam.convert_lengths(p[:, 2], crs.z_units, required_uom)
|
482
|
+
t_end = np.empty_like(t)
|
483
|
+
t_end[:, :2] = t[:, 1:]
|
484
|
+
t_end[:, 2] = t[:, 0]
|
485
|
+
edge_v = p[t_end, :] - p[t, :]
|
486
|
+
return vec.naive_lengths(edge_v)
|
487
|
+
|
464
488
|
def set_from_triangles_and_points(self, triangles, points):
|
465
489
|
"""Populate this (empty) Surface object from an array of triangle corner indices and an array of points."""
|
466
490
|
|
@@ -468,6 +492,8 @@ class Surface(rqsb.BaseSurface):
|
|
468
492
|
tri_patch.set_from_triangles_and_points(triangles, points)
|
469
493
|
self.patch_list = [tri_patch]
|
470
494
|
self.uuid = bu.new_uuid()
|
495
|
+
self.triangles = triangles.copy()
|
496
|
+
self.points = points.copy()
|
471
497
|
|
472
498
|
def set_from_point_set(self,
|
473
499
|
point_set,
|
@@ -1051,7 +1077,7 @@ class Surface(rqsb.BaseSurface):
|
|
1051
1077
|
# TODO: implement alternate solution using edge functions in olio triangulation to optimise
|
1052
1078
|
points_unique, inverse = np.unique(allpoints, axis = 0, return_inverse = True)
|
1053
1079
|
tris = np.array(tris)
|
1054
|
-
tris_unique = np.empty(shape = tris.shape)
|
1080
|
+
tris_unique = np.empty(shape = tris.shape, dtype = int)
|
1055
1081
|
tris_unique[:, 0] = inverse[tris[:, 0]]
|
1056
1082
|
tris_unique[:, 1] = inverse[tris[:, 1]]
|
1057
1083
|
tris_unique[:, 2] = inverse[tris[:, 2]]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
resqpy/__init__.py,sha256
|
1
|
+
resqpy/__init__.py,sha256=-VeTvfeoq0WOwGSxBrBxNDTrFmIrIvRmBqZxRvPR200,556
|
2
2
|
resqpy/crs.py,sha256=R7DfcTP5xGv5pu9Y8RHA2WVM9DjBCSVMoHcz4RmQ7Yw,27646
|
3
3
|
resqpy/derived_model/__init__.py,sha256=NFvMSOKI3cxmH7lAbddV43JjoUj-r2G7ExEfOqinD1I,1982
|
4
4
|
resqpy/derived_model/_add_edges_per_column_property_array.py,sha256=cpW3gwp6MSYIrtvFmCjoJXcyUsgGuCDbgmwlJCJebUs,6410
|
@@ -162,7 +162,7 @@ resqpy/surface/_base_surface.py,sha256=LsWrDrbuuaEVRgf2Dlbc-6ZvGQpjtrKuxF7Jjebvl
|
|
162
162
|
resqpy/surface/_combined_surface.py,sha256=8TnNbSywjej6tW_vRr5zoVgBbvnadCaqWk6WyHWHTYQ,3082
|
163
163
|
resqpy/surface/_mesh.py,sha256=bhHfIjRg9xWhv1aWW9oDhTK6LlwS5rZBST1ONJuG8pg,42192
|
164
164
|
resqpy/surface/_pointset.py,sha256=niTkBik9hAvqrY8340K1TRG7mg4FMQbbp12WZiiXPMs,27416
|
165
|
-
resqpy/surface/_surface.py,sha256=
|
165
|
+
resqpy/surface/_surface.py,sha256=cJx9KZIi9zaambDv7BiENepy3t4RZHP5-MxjXg8qDWc,66724
|
166
166
|
resqpy/surface/_tri_mesh.py,sha256=rqWk64m9mL4Gzk-R1bI-ThA0OEBdMUFjHyezbGMd0gg,26465
|
167
167
|
resqpy/surface/_tri_mesh_stencil.py,sha256=0FgsWSPUIIt3k9_-FURy4J2idA3Ps2AXWJpcFX1o8OU,16087
|
168
168
|
resqpy/surface/_triangulated_patch.py,sha256=cmZVssA5Yde0JzgawkahlZFNFcmgxJS59HxirOu7nQ4,25907
|
@@ -193,7 +193,7 @@ resqpy/well/_wellbore_marker_frame.py,sha256=xvYH2_2Ie3a18LReFymbUrZboOx7Rhv5DOD
|
|
193
193
|
resqpy/well/blocked_well_frame.py,sha256=Lg7TgynfPv9WkklXTLt9VN6uBXWUqX1LI-Xmv_FBqYk,22555
|
194
194
|
resqpy/well/well_object_funcs.py,sha256=LYTcC07ezlBxClfrug_B4iXXZUkXDPgsVufNzp361Wo,24703
|
195
195
|
resqpy/well/well_utils.py,sha256=zwpYjT85nXAwWBhYB1Pygu2SgouZ-44k6hEOnpoMfBI,5969
|
196
|
-
resqpy-4.14.
|
197
|
-
resqpy-4.14.
|
198
|
-
resqpy-4.14.
|
199
|
-
resqpy-4.14.
|
196
|
+
resqpy-4.14.3.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
|
197
|
+
resqpy-4.14.3.dist-info/METADATA,sha256=qSByFIxrYQx7D-jNFNqPz3ykqfoNuDBFLBe7SV38TTY,4028
|
198
|
+
resqpy-4.14.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
199
|
+
resqpy-4.14.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|