Skip to content

Commit 29175b4

Browse files
committed
fix: use cell centres for vector field and rescale points into model bb
1 parent 35cd5e6 commit 29175b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

LoopStructural/modelling/features/_base_geological_feature.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ def vector_field(self, bounding_box=None, tolerance=0.05, scale=1.0):
341341
if self.model is None:
342342
raise ValueError("Must specify bounding box")
343343
bounding_box = self.model.bounding_box
344-
grid = bounding_box.vtk()
345-
points = grid.points
344+
points = bounding_box.cell_centers()
346345
value = self.evaluate_gradient(points)
347-
346+
if self.model is not None:
347+
points = self.model.rescale(points)
348348
return VectorPoints(points, value, self.name)
349349

350350
@abstractmethod

0 commit comments

Comments
 (0)