From 7d975bd3a7bc0dcbf2ecb7336e193f50a05b96d9 Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Thu, 16 Sep 2021 15:34:10 +1000 Subject: [PATCH] fix: adding set item for fold frame to change the feature representing a coordinate --- .../modelling/features/structural_frame.py | 17 +++++++++++++++-- .../modelling/fold/fold_rotation_angle.py | 3 --- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/LoopStructural/modelling/features/structural_frame.py b/LoopStructural/modelling/features/structural_frame.py index aeecd120b..506f2fa4c 100644 --- a/LoopStructural/modelling/features/structural_frame.py +++ b/LoopStructural/modelling/features/structural_frame.py @@ -28,7 +28,20 @@ def __init__(self, name, features, fold=None): self.fold = fold self.builder = None - def __getitem__(self, item): + def __getitem__(self, key): + """ + + Parameters + ---------- + key index of feature to access + + Returns + ------- + the structural frame geological feature + """ + return self.features[key] + + def __setitem__(self, key, value): """ Parameters @@ -39,7 +52,7 @@ def __getitem__(self, item): ------- the structural frame geological feature """ - return self.features[item] + self.features[key] = value def set_model(self, model): """Link the model that created the frame to the frame diff --git a/LoopStructural/modelling/fold/fold_rotation_angle.py b/LoopStructural/modelling/fold/fold_rotation_angle.py index b6a555f90..7c4b57c01 100644 --- a/LoopStructural/modelling/fold/fold_rotation_angle.py +++ b/LoopStructural/modelling/fold/fold_rotation_angle.py @@ -12,9 +12,6 @@ class FoldRotationAngle: - """ - - """ def __init__(self, rotation_angle, fold_frame_coordinate, svario=False): """