From 4e73489ef8e272be3ff35f2f0e7e54065c61ff3e Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Tue, 22 Oct 2024 09:15:28 +1100 Subject: [PATCH] add getters for fold axis/limb profiles for builder --- .../features/builders/_folded_feature_builder.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/LoopStructural/modelling/features/builders/_folded_feature_builder.py b/LoopStructural/modelling/features/builders/_folded_feature_builder.py index 91ae86fe..d38b9525 100644 --- a/LoopStructural/modelling/features/builders/_folded_feature_builder.py +++ b/LoopStructural/modelling/features/builders/_folded_feature_builder.py @@ -57,6 +57,19 @@ def __init__( self.axis_profile_type = axis_profile_type self.limb_profile_type = limb_profile_type + @property + def fold_axis_rotation(self): + if self.fold.fold_axis_rotation is None: + self.set_fold_axis() + return self.fold.fold_axis_rotation + + @property + def fold_limb_rotation(self): + _axis = self.fold.fold_axis # get axis to make sure its initialised + if self.fold.fold_limb_rotation is None: + self.set_fold_limb_rotation() + return self.fold.fold_limb_rotation + def set_fold_axis(self): """calculates the fold axis/ fold axis rotation and adds this to the fold""" kwargs = self.kwargs