Skip to content

Commit 483019d

Browse files
committed
(QUICKFIX) can pass fold axis to fold frame for
calculating fold axis rotation angle
1 parent 0cdb254 commit 483019d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

LoopStructural/modelling/core/geological_model.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,13 +695,16 @@ def create_and_add_folded_foliation(self, foliation_data, fold_frame=None,
695695
self._add_faults(series_builder)
696696

697697
series_builder.add_data_to_interpolator(True)
698-
if "fold_axis" in kwargs:
699-
fold.fold_axis = kwargs['fold_axis']
698+
fold_axis = kwargs.get('fold_axis')
699+
if fold_axis not None:
700+
if len(fold_axis.shape) == 1:
701+
fold.fold_axis = fold_axis
702+
700703
if "av_fold_axis" in kwargs:
701704
_calculate_average_intersection(series_builder, fold_frame, fold)
702705
if fold.fold_axis is None:
703706
far, fad = fold_frame.calculate_fold_axis_rotation(
704-
series_builder)
707+
series_builder,fold_axis=fold_axis)
705708
fold_axis_rotation = FoldRotationAngle(far, fad)
706709
a_wl = kwargs.get("axis_wl", None)
707710
if 'axis_function' in kwargs:

LoopStructural/modelling/fold/foldframe.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self, name, features, fold=None):
2222
super().__init__(name, features, fold)
2323
self.model = None
2424

25-
def calculate_fold_axis_rotation(self, feature_builder):
25+
def calculate_fold_axis_rotation(self, feature_builder,fold_axis=None):
2626
"""
2727
Calculate the fold axis rotation angle by finding the angle between the
2828
intersection lineation and the gradient to the 1st coordinate of the
@@ -43,6 +43,9 @@ def calculate_fold_axis_rotation(self, feature_builder):
4343
points.append(gpoints)
4444
if npoints.shape[0] > 0:
4545
points.append(npoints)
46+
if fold_axis not None:
47+
if fold_axis.shape[0] > 0 and fold_axis.shape[1] == 6:
48+
points.append(fold_axis)
4649
if len(points) == 0:
4750
return 0, 0
4851
points = np.vstack(points)

0 commit comments

Comments
 (0)