Skip to content

Commit 2e36743

Browse files
committed
fix: allow scalar field of feature without a model
1 parent 71c2dcc commit 2e36743

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

LoopStructural/modelling/features/_base_geological_feature.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,14 @@ def scalar_field(self, bounding_box=None):
334334
bounding_box = self.model.bounding_box
335335
grid = bounding_box.structured_grid(name=self.name)
336336
value = self.evaluate_value(
337-
self.model.scale(bounding_box.regular_grid(local=False, order='F'))
337+
bounding_box.regular_grid(local=False, order='F')
338338
)
339+
if self.model is not None:
340+
341+
value = self.evaluate_value(
342+
self.model.scale(bounding_box.regular_grid(local=False, order='F'))
343+
)
344+
339345
grid.properties[self.name] = value
340346

341347
value = self.evaluate_value(bounding_box.cell_centres(order='F'))

0 commit comments

Comments
 (0)