File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
LoopStructural/modelling/features/builders Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 33from ._folded_feature_builder import FoldedFeatureBuilder
44from ._structural_frame_builder import StructuralFrameBuilder
55from ._fault_builder import FaultBuilder
6+ from ._analytical_fold_builder import AnalyticalFoldBuilder
Original file line number Diff line number Diff line change 1+ from ._base_builder import BaseBuilder
2+ from .._lambda_geological_feature import LambdaGeologicalFeature
3+ import numpy as np
4+ class AnalyticalFoldBuilder (BaseBuilder ):
5+ def __init__ (self , model , name : str = 'Feature' ):
6+ super ().__init__ (model = model ,name = name )
7+ self ._wavelength = np .max (model .bounding_box .length )
8+ self ._amplitude = np .min (model .bounding_box .length )
9+ self ._centre = model .bounding_box
10+ @property
11+ def amplitude (self ):
12+ return self ._amplitude
13+ @property
14+ def wavelength (self ):
15+ return self ._wavelength
16+
17+ @property
18+ def feature (self ):
19+ def function (xyz ):
20+ return xyz [:,2 ]+ np .sin (xyz [:,0 ]/ self .wavelength )* self .amplitude
21+ return LambdaGeologicalFeature (function = function ,model = self .model ,name = self .name )
You can’t perform that action at this time.
0 commit comments