Skip to content

Commit 82631a1

Browse files
committed
Merge branch 'dev' of github.com:Loop3D/LoopStructural into dev
2 parents 5ae2f46 + 3089324 commit 82631a1

File tree

5 files changed

+6998
-15
lines changed

5 files changed

+6998
-15
lines changed

LoopStructural/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
ch.setFormatter(formatter)
3232
ch.setLevel(logging.WARNING)
3333
loggers = {}
34-
__version__ = '1.0.5'
34+
__version__ = '1.0.6-dev'
3535
from .modelling.core.geological_model import GeologicalModel
3636
from .visualisation.model_visualisation import LavaVuModelViewer
3737
from .visualisation.map_viewer import MapView

LoopStructural/visualisation/model_visualisation.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,29 +147,26 @@ def add_section(self, geological_feature=None, axis='x', value=None, **kwargs):
147147
-------
148148
149149
"""
150-
print('aa')
151150
if axis == 'x':
152151
tri, yy, zz = create_surface(self.bounding_box[:, [1, 2]], self.nsteps[[1, 2]])
153152
xx = np.zeros(zz.shape)
154153
if value is None:
155-
xx[:] = np.nanmean(self.bounding_box[:, 0])
156-
else:
157-
xx[:] = value
154+
value = np.nanmean(self.bounding_box[:, 0])
155+
xx[:] = value
158156
if axis == 'y':
159157
tri, xx, zz = create_surface(self.bounding_box[:, [0, 2]], self.nsteps[[0, 2]])
160158
yy = np.zeros(xx.shape)
161159
if value is None:
162-
yy[:] = np.nanmean(self.bounding_box[:, 1])
163-
else:
164-
yy[:] = value
160+
value = np.nanmean(self.bounding_box[:, 1])
161+
yy[:] = value
165162
if axis == 'z':
166163
tri, xx, yy = create_surface(self.bounding_box[:, 0:2], self.nsteps[0:2])
167164
zz = np.zeros(xx.shape)
168165
if value is None:
169-
zz[:] = np.nanmean(self.bounding_box[:, 2])
170-
else:
171-
zz[:] = value
172-
name = kwargs.get('name', axis + '_slice')
166+
value = np.nanmean(self.bounding_box[:, 2])
167+
zz[:] = value
168+
name = kwargs.get('name', geological_feature.name)
169+
name = '{}_section_at_{}_of_{}'.format(axis,value,name)
173170
colour = kwargs.get('colour', 'red')
174171

175172
# create an array to evaluate the feature on for the section
@@ -208,9 +205,7 @@ def add_section(self, geological_feature=None, axis='x', value=None, **kwargs):
208205
cmap = lavavu.cubehelix(100)
209206
if 'cmap' in kwargs:
210207
cmap = kwargs['cmap']
211-
# logger.info("Colouring section with %s min: %f, max: %f" % (
212-
# geological_feature.name, geological_feature.min(), geological_feature.max()))
213-
# surf.colourmap(cmap, range=[geological_feature.min(), geological_feature.max()])
208+
214209
def add_isosurface(self, geological_feature, value = None, isovalue=None,
215210
paint_with=None, slices=None, colour='red', nslices=None,
216211
cmap=None, filename=None, names=None, colours=None,**kwargs):

0 commit comments

Comments
 (0)