15
15
from gempy_engine .core .data .transforms import Transform , GlobalAnisotropy
16
16
17
17
from .orientations import OrientationsTable
18
+ from .surface_points import SurfacePointsTable
18
19
from .structural_frame import StructuralFrame
19
20
from .grid import Grid
20
21
from ...modules .data_manipulation .engine_factory import interpolation_input_from_structural_frame
@@ -153,10 +154,10 @@ def solutions(self, value):
153
154
dc_mesh = self ._solutions .dc_meshes [e ]
154
155
if dc_mesh is None :
155
156
continue
156
-
157
+
157
158
# TODO: These meshes are in the order of the scalar field
158
159
world_coord_vertices = self .input_transform .apply_inverse (dc_mesh .vertices )
159
-
160
+
160
161
element .vertices = world_coord_vertices
161
162
element .edges = (dc_mesh .edges if dc_mesh is not None else None )
162
163
@@ -171,14 +172,14 @@ def surface_points_copy(self):
171
172
"""This is a copy! Returns a SurfacePointsTable for all surface points across the structural elements"""
172
173
surface_points_table = self .structural_frame .surface_points_copy
173
174
return surface_points_table
174
-
175
+
175
176
@property
176
- def surface_points_copy_transformed (self ):
177
+ def surface_points_copy_transformed (self ) -> SurfacePointsTable :
177
178
og_sp = self .surface_points_copy
178
179
total_transform : Transform = self .input_transform + self .grid .transform
179
180
og_sp .xyz_view = total_transform .apply (og_sp .xyz )
180
181
return og_sp
181
-
182
+
182
183
@property
183
184
def surface_points (self ):
184
185
raise AttributeError ("This property can only be set, not read. You can access the copy with `surface_points_copy` or"
@@ -192,17 +193,15 @@ def surface_points(self, value):
192
193
def orientations_copy (self ) -> OrientationsTable :
193
194
"""This is a copy! Returns a OrientationsTable for all orientations across the structural elements"""
194
195
orientations_table = self .structural_frame .orientations_copy
195
- if self .input_transform is not None :
196
- transform = self .input_transform + self .grid .transform
197
- orientations_table .model_transform = transform
198
196
return orientations_table
199
-
197
+
200
198
@property
201
- def orientations_copy_transformed (self ):
199
+ def orientations_copy_transformed (self ) -> OrientationsTable :
202
200
# ! This is not done
203
201
og_or = self .orientations_copy
204
202
total_transform : Transform = self .input_transform + self .grid .transform
205
203
og_or .xyz_view = total_transform .apply (og_or .xyz )
204
+ og_or .grads_view = total_transform .transform_gradient (og_or .grads )
206
205
return og_or
207
206
208
207
@property
@@ -217,28 +216,29 @@ def orientations(self, value):
217
216
@property
218
217
def project_bounds (self ) -> np .ndarray :
219
218
return self .grid .bounding_box
220
-
219
+
221
220
@property
222
221
def extent_transformed (self ) -> np .ndarray :
223
222
transformed = self .input_transform .apply (self .project_bounds ) # ! grid already has the grid transform applied
224
223
new_extents = np .array ([transformed [:, 0 ].min (), transformed [:, 0 ].max (),
225
224
transformed [:, 1 ].min (), transformed [:, 1 ].max (),
226
225
transformed [:, 2 ].min (), transformed [:, 2 ].max ()])
227
226
return new_extents
228
-
227
+
229
228
@property
230
229
def extent (self ) -> np .ndarray :
231
230
return self .grid .extent
232
231
233
232
@property
234
233
def interpolation_input_copy (self ):
234
+ warnings .warn ("This property is deprecated. Use directly "
235
+ "`interpolation_input_from_structural_frame` instead." , DeprecationWarning )
236
+
235
237
if self .structural_frame .is_dirty is False :
236
238
return self ._interpolationInput
237
239
238
240
self ._interpolationInput = interpolation_input_from_structural_frame (
239
- structural_frame = self .structural_frame ,
240
- grid = self .grid ,
241
- input_transform = self .input_transform
241
+ geo_model = self
242
242
)
243
243
244
244
return self ._interpolationInput
0 commit comments