Skip to content

Commit

Permalink
fix: allow faults without trace to be built if centre exists
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed May 21, 2024
1 parent 07b6078 commit 436540b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LoopStructural/modelling/features/builders/_fault_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def create_data_from_geometry(
"""
trace_mask = np.logical_and(fault_frame_data["coord"] == 0, fault_frame_data["val"] == 0)
logger.info(f"There are {np.sum(trace_mask)} points on the fault trace")
if np.sum(trace_mask) == 0:
if np.sum(trace_mask) == 0 and fault_center is None:
logger.error("You cannot model a fault without defining the location of the fault")
raise ValueError("There are no points on the fault trace")
# find the middle point on the fault trace if center is not provided
Expand Down Expand Up @@ -483,7 +483,7 @@ def set_mesh_geometry(self, buffer, rotation):
buffer : double
percentage of length to add to edges
"""
length = np.max(self.maximum - self.origin)
length = np.nanmax(self.maximum - self.origin)
# for builder in self.builders:
# all three coordinates share the same support
self.builders[0].set_interpolation_geometry(
Expand Down

0 comments on commit 436540b

Please sign in to comment.