Skip to content

Commit 436540b

Browse files
committed
fix: allow faults without trace to be built if centre exists
1 parent 07b6078 commit 436540b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LoopStructural/modelling/features/builders/_fault_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def create_data_from_geometry(
116116
"""
117117
trace_mask = np.logical_and(fault_frame_data["coord"] == 0, fault_frame_data["val"] == 0)
118118
logger.info(f"There are {np.sum(trace_mask)} points on the fault trace")
119-
if np.sum(trace_mask) == 0:
119+
if np.sum(trace_mask) == 0 and fault_center is None:
120120
logger.error("You cannot model a fault without defining the location of the fault")
121121
raise ValueError("There are no points on the fault trace")
122122
# find the middle point on the fault trace if center is not provided
@@ -483,7 +483,7 @@ def set_mesh_geometry(self, buffer, rotation):
483483
buffer : double
484484
percentage of length to add to edges
485485
"""
486-
length = np.max(self.maximum - self.origin)
486+
length = np.nanmax(self.maximum - self.origin)
487487
# for builder in self.builders:
488488
# all three coordinates share the same support
489489
self.builders[0].set_interpolation_geometry(

0 commit comments

Comments
 (0)