subsurface-terra 2025.1.0rc12__py3-none-any.whl → 2025.1.0rc13__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.
subsurface/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2025.1.0rc12'
21
- __version_tuple__ = version_tuple = (2025, 1, 0, 'rc12')
20
+ __version__ = version = '2025.1.0rc13'
21
+ __version_tuple__ = version_tuple = (2025, 1, 0, 'rc13')
@@ -131,12 +131,29 @@ class StructuredData:
131
131
  def values(self) -> np.ndarray:
132
132
  return self.data[self.active_data_array_name].values
133
133
 
134
+ _bounds: Tuple[float, float, float, float, float, float] = None
135
+
134
136
  @property
135
137
  def bounds(self):
138
+ if self._bounds is not None:
139
+ return self._bounds
140
+
136
141
  array_: xr.DataArray = self.data[self.active_data_array_name]
137
- bounds = self._get_bounds(array_)
142
+ bounds = self._get_bounds_from_coord(array_)
138
143
  return bounds
139
144
 
145
+ @bounds.setter
146
+ def bounds(self, bounds: Tuple[float, float, float, float, float, float]):
147
+ """
148
+ Set the bounds of the structured data. This is useful for defining the
149
+ spatial extent of the data in a structured grid.
150
+
151
+ Args:
152
+ bounds (Tuple[float, float, float, float, float, float]): A tuple containing
153
+ the minimum and maximum values for each dimension (xmin, xmax, ymin, ymax, zmin, zmax).
154
+ """
155
+ self._bounds = bounds
156
+
140
157
  @property
141
158
  def shape(self):
142
159
  return self.active_data_array.shape
@@ -146,7 +163,7 @@ class StructuredData:
146
163
  return self.data[self.active_data_array_name]
147
164
 
148
165
  @staticmethod
149
- def _get_bounds(xr_obj: xr.DataArray):
166
+ def _get_bounds_from_coord(xr_obj: xr.DataArray):
150
167
  bounds = {}
151
168
  for coord in xr_obj.coords:
152
169
  bounds[coord] = (xr_obj[coord].min().item(), xr_obj[coord].max().item())
@@ -47,7 +47,7 @@ def load_with_trimesh(path_to_file_or_buffer, file_type: Optional[str] = None,
47
47
  case TriMeshTransformations.RIGHT_HANDED_Z_UP_Y_REVERSED:
48
48
  # * Forward Z Up Y
49
49
  transform=np.array([
50
- [1, 0, 0, 0],
50
+ [-1, 0, 0, 0],
51
51
  [0, 0, 1, 0],
52
52
  [0, 1, 0, 0],
53
53
  [0, 0, 0, 1],
@@ -109,6 +109,10 @@ class LoadWithTrimesh:
109
109
  # If there's already an image reference in the material, let the user know
110
110
  if hasattr(material, 'image') and material.image is not None:
111
111
  print(" -> Material already has an image:", material.image)
112
+
113
+ if geometry.visual.uv is None:
114
+ raise ValueError("Geometry does not have UV coordinates for texture mapping, despite having a material."
115
+ "This can also happen if the geometry is given in quads instead of triangles.")
112
116
  else:
113
117
  print("No material found or no 'material' attribute on this geometry.")
114
118
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: subsurface_terra
3
- Version: 2025.1.0rc12
3
+ Version: 2025.1.0rc13
4
4
  Summary: Subsurface data types and utilities. This version is the one used by Terranigma Solutions. Please feel free to take anything in this repository for the original one.
5
5
  Home-page: https://softwareunderground.github.io/subsurface
6
6
  Author: Software Underground
@@ -1,5 +1,5 @@
1
1
  subsurface/__init__.py,sha256=0D2rCUem3fiHsXFXXSmwheLiPS4cXxEdfWdFBj0b-cY,930
2
- subsurface/_version.py,sha256=D_1QY4RtsEm2Eew8rPYqG7jASO3oDCF7p_cXgYN2Qzg,550
2
+ subsurface/_version.py,sha256=1lurCdEDo2HbEJ3FeUJE9c-X8kSa6DF_wZvcWmCLx3U,550
3
3
  subsurface/optional_requirements.py,sha256=Wg36RqxzPiLtN-3qSg5K9QVEeXCB0-EjSzHERAoO8EE,2883
4
4
  subsurface/api/__init__.py,sha256=E3R1fNn_d5XQdlZyjtzBcH_bYRzAvOc3xV38qFLqbZY,369
5
5
  subsurface/api/interfaces/__init__.py,sha256=rqUtJyMLicobcyhmr74TepjmUQAEmlazKT3vjV_n3aA,6
@@ -23,7 +23,7 @@ subsurface/core/structs/base_structures/__init__.py,sha256=VhMcVjc0pWT8G2IAoKcFe
23
23
  subsurface/core/structs/base_structures/_liquid_earth_mesh.py,sha256=e5hIJOv7GrufLlNlR4xBFuMduZYUHR12BAE1B1GuY3o,5850
24
24
  subsurface/core/structs/base_structures/_unstructured_data_constructor.py,sha256=aqQwAXs9mUqDoMfadEdKDZTirHrkgRjcmmSwqwxaXjQ,2741
25
25
  subsurface/core/structs/base_structures/base_structures_enum.py,sha256=l9uovc8JWskHmT8tgSE8p4Ep4RjZi5jh_xuZCH-s8HM,96
26
- subsurface/core/structs/base_structures/structured_data.py,sha256=iaVmCMIwkxiGXtZJxKZRWFhsFGC-2ZW_B9QTufHzBwY,9917
26
+ subsurface/core/structs/base_structures/structured_data.py,sha256=QLTlfQLrXnMvGm6EkrTvQq9m5eqHKwIG8nYGuM1jwHI,10592
27
27
  subsurface/core/structs/base_structures/unstructured_data.py,sha256=_cB64U0d8VlWgod0eHNluLmtLQZKLOwJYkmdtqYocXs,12904
28
28
  subsurface/core/structs/structured_elements/__init__.py,sha256=wQ8z6vioC98TNwnqMHlDMVFJ1yOKsmlVa6kHL1SOfZQ,43
29
29
  subsurface/core/structs/structured_elements/octree_mesh.py,sha256=vI30DW46oGP_h_3v85MiFmwFDoKh1HWdVBATdTmC-yA,240
@@ -45,7 +45,7 @@ subsurface/modules/reader/faults/faults.py,sha256=s144Gq0tFvjSUkB66dB86kYjW2l2e1
45
45
  subsurface/modules/reader/geo_object/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  subsurface/modules/reader/mesh/_GOCAD_mesh.py,sha256=_MwNy4iVMGnemvT01hhB-nbCc8a1r8ETEAkD-AWcBz4,3304
47
47
  subsurface/modules/reader/mesh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- subsurface/modules/reader/mesh/_trimesh_reader.py,sha256=D28DrNuC8QDZpmmctjf6KRHWeHPidvavn2V8NIF9roo,17549
48
+ subsurface/modules/reader/mesh/_trimesh_reader.py,sha256=Skg1D52RuG70Ov02OrMwUdUG_3zbQ6QeS4XlMPOM5Qw,17844
49
49
  subsurface/modules/reader/mesh/csv_mesh_reader.py,sha256=0iXYg-JOLUg7yH6Rw6qCoxXvKh0hOUTwjYxbhSlGfGM,1969
50
50
  subsurface/modules/reader/mesh/dxf_reader.py,sha256=JDhzFRE46sdwMGBB8enHNluH07ohqt6LhgLHiSQRL-I,6525
51
51
  subsurface/modules/reader/mesh/glb_reader.py,sha256=dierR9AYM5Q2szLuemfLlM_JcPRNtDrD5fpF8zNjBS8,1118
@@ -89,8 +89,8 @@ subsurface/modules/writer/to_rex/material_encoder.py,sha256=zGlqF9X_Civ9VvtGwo-I
89
89
  subsurface/modules/writer/to_rex/mesh_encoder.py,sha256=6TBtJhYJEAMEBHxQkbweXrJO1jIUx1ClM8l5ajVCrLc,6443
90
90
  subsurface/modules/writer/to_rex/to_rex.py,sha256=njsm2d3e69pRVfF_TOC_hexvXPmgNTZdJvhbnXcvyIo,3800
91
91
  subsurface/modules/writer/to_rex/utils.py,sha256=HEpJ95LjHOK24ePpmLpPP5uFyv6i_kN3AWh031q-1Uc,379
92
- subsurface_terra-2025.1.0rc12.dist-info/licenses/LICENSE,sha256=GSXh9K5TZauM89BeGbYg07oST_HMhOTiZoEGaUeKBtA,11606
93
- subsurface_terra-2025.1.0rc12.dist-info/METADATA,sha256=-JXdGryaR_k9plZ3-3GoFQKbYYS2kVZfe_4oH6haLkw,7094
94
- subsurface_terra-2025.1.0rc12.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
95
- subsurface_terra-2025.1.0rc12.dist-info/top_level.txt,sha256=f32R_tUSf83CfkpB4vjv5m2XcD8TmDX9h7F4rnEXt5A,11
96
- subsurface_terra-2025.1.0rc12.dist-info/RECORD,,
92
+ subsurface_terra-2025.1.0rc13.dist-info/licenses/LICENSE,sha256=GSXh9K5TZauM89BeGbYg07oST_HMhOTiZoEGaUeKBtA,11606
93
+ subsurface_terra-2025.1.0rc13.dist-info/METADATA,sha256=K1xYEpRZttYYsycjsY58onE91vsou9A1-B3Z1gpDW6k,7094
94
+ subsurface_terra-2025.1.0rc13.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
95
+ subsurface_terra-2025.1.0rc13.dist-info/top_level.txt,sha256=f32R_tUSf83CfkpB4vjv5m2XcD8TmDX9h7F4rnEXt5A,11
96
+ subsurface_terra-2025.1.0rc13.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.1)
2
+ Generator: setuptools (80.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5