Skip to content

Commit 5c9dfe7

Browse files
committed
fix: convert from structural frame to fold frame
1 parent a027910 commit 5c9dfe7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

loopstructural/main/model_manager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from LoopStructural.datatypes import BoundingBox
1010
from LoopStructural.modelling.core.fault_topology import FaultRelationshipType
1111
from LoopStructural.modelling.core.stratigraphic_column import StratigraphicColumn
12-
from LoopStructural.modelling.features import FeatureType
12+
from LoopStructural.modelling.features import FeatureType, StructuralFrame
13+
from LoopStructural.modelling.features.fold import FoldFrame
1314
from loopstructural.toolbelt.preferences import PlgSettingsStructure
1415

1516

@@ -397,12 +398,14 @@ def add_unconformity(self, foliation_name: str, value: float, type: FeatureType
397398
self.model.add_unconformity(foliation, value)
398399
elif type == FeatureType.ONLAPUNCONFORMITY:
399400
self.model.add_onlap_unconformity(foliation, value)
400-
401+
401402
def add_fold_to_feature(self, feature_name: str, fold_frame_name: str, fold_weights={}):
402403

403404
from LoopStructural.modelling.features._feature_converters import add_fold_to_feature
404405

405406
fold_frame = self.model.get_feature_by_name(fold_frame_name)
407+
if isinstance(fold_frame,StructuralFrame):
408+
fold_frame = FoldFrame(fold_frame.name,fold_frame.features, None, fold_frame.model)
406409
if fold_frame is None:
407410
raise ValueError(f"Fold frame '{fold_frame_name}' not found in the model.")
408411
feature = self.model.get_feature_by_name(feature_name)

0 commit comments

Comments
 (0)