@@ -115,6 +115,7 @@ def __init__(
115115 reuse_supports = False ,
116116 logfile = None ,
117117 loglevel = "info" ,
118+ epsilon = 0.04 ,
118119 ):
119120 """
120121 Parameters
@@ -125,7 +126,8 @@ def __init__(
125126 specifying the maximum extent of the model
126127 rescale : bool
127128 whether to rescale the model to between 0/1
128-
129+ epsion : float
130+ a fudge factor for isosurfacing, used to make sure surfaces appear
129131 Examples
130132 --------
131133 Demo data
@@ -184,6 +186,7 @@ def __init__(
184186 )
185187
186188 self .bounding_box /= self .scale_factor
189+ self .epsilon = epsilon * float (np .max (lengths )) / self .scale_factor
187190 self .support = {}
188191 self .reuse_supports = reuse_supports
189192 if self .reuse_supports :
@@ -1252,7 +1255,7 @@ def _add_unconformity_above(self, feature):
12521255
12531256 for f in reversed (self .features ):
12541257 if f .type == FeatureType .UNCONFORMITY and f .name != feature .name :
1255- feature .add_region (lambda pos : f . evaluate ( pos ) )
1258+ feature .add_region (f )
12561259 break
12571260
12581261 def create_and_add_unconformity (self , unconformity_surface_data , ** kwargs ):
@@ -1327,7 +1330,7 @@ def add_unconformity(
13271330 logger .debug (f"Adding { uc_feature .name } as unconformity to { f .name } " )
13281331 if f .type == FeatureType .FAULT :
13291332 continue
1330- f .add_region (lambda pos : ~ uc_feature .evaluate ( pos ))
1333+ f .add_region (uc_feature .inverse ( ))
13311334 # now add the unconformity to the feature list
13321335 self ._add_feature (uc_feature )
13331336 return uc_feature
@@ -1353,12 +1356,12 @@ def add_onlap_unconformity(
13531356 """
13541357
13551358 uc_feature = UnconformityFeature (feature , value , True )
1356- feature .add_region (lambda pos : ~ uc_feature .evaluate ( pos ))
1359+ feature .add_region (uc_feature .inverse ( ))
13571360 for f in reversed (self .features ):
13581361 if f .type == FeatureType .UNCONFORMITY :
13591362 break
13601363 if f != feature :
1361- f .add_region (lambda pos : uc_feature . evaluate ( pos ) )
1364+ f .add_region (uc_feature )
13621365 self ._add_feature (uc_feature )
13631366
13641367 return uc_feature
@@ -1593,7 +1596,7 @@ def create_and_add_fault(
15931596
15941597 for f in reversed (self .features ):
15951598 if f .type == FeatureType .UNCONFORMITY :
1596- fault .add_region (lambda pos : f . evaluate_value ( pos ) <= 0 )
1599+ fault .add_region (f )
15971600 break
15981601 if displacement == 0 :
15991602 fault .type = "fault_inactive"
0 commit comments