[GRASS-SVN] r47107 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 14 04:13:43 EDT 2011
Author: annakrat
Date: 2011-07-14 01:13:42 -0700 (Thu, 14 Jul 2011)
New Revision: 47107
Modified:
grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
Log:
wxNviz: volume slices added to generating nviz_cmd command
Modified: grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py 2011-07-14 07:45:20 UTC (rev 47106)
+++ grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py 2011-07-14 08:13:42 UTC (rev 47107)
@@ -1569,6 +1569,7 @@
if volumes:
cmdName = cmdShade = cmdRes = cmdPos = cmdIso = ""
cmdIsoColorMap = cmdIsoColorVal = cmdIsoTrMap = cmdIsoTrVal = ""
+ cmdSlice = cmdSliceTransp = cmdSlicePos = ""
for i, volume in enumerate(volumes):
nvizData = self.tree.GetPyData(volume)[0]['nviz']['volume']
cmdName += "%s," % self.tree.GetPyData(volume)[0]['maplayer'].GetName()
@@ -1588,22 +1589,35 @@
if iso['transp']['map']:
cmdIsoTrMap += "%s," % iso['transp']['value']
else:
- cmdIsoTrVal += "%s," % iso['transp']['value']
-
+ cmdIsoTrVal += "%s," % iso['transp']['value']
+
+ for slice in nvizData['slice']:
+ axis = ('x','y','z')[slice['position']['axis']]
+ cmdSlice += "%d:%s," % (i + 1, axis)
+ for coord in ('x1', 'x2', 'y1', 'y2', 'z1', 'z2'):
+ cmdSlicePos += "%d," % slice['position'][coord]
+ cmdSliceTransp += "%s," % slice['transp']['value']
+
cmd += "volume=" + cmdName.strip(',') + ' '
cmd += "volume_shading=" + cmdShade.strip(',') + ' '
cmd += "volume_resolution=" + cmdRes.strip(',') + ' '
if nvizData['position']:
cmd += "volume_position=" + cmdPos.strip(',') + ' '
- cmd += "isosurf_level=" + cmdIso.strip(',') + ' '
- if cmdIsoColorMap:
- cmd += "isosurf_color_map=" + cmdIsoColorMap.strip(',') + ' '
- if cmdIsoColorVal:
- cmd += "isosurf_color_value=" + cmdIsoColorVal.strip(',') + ' '
- if cmdIsoTrMap:
- cmd += "isosurf_transp_map=" + cmdIsoTrMap.strip(',') + ' '
- if cmdIsoTrVal:
- cmd += "isosurf_transp_value=" + cmdIsoTrVal.strip(',') + ' '
+ if cmdIso:
+ cmd += "isosurf_level=" + cmdIso.strip(',') + ' '
+ if cmdIsoColorMap:
+ cmd += "isosurf_color_map=" + cmdIsoColorMap.strip(',') + ' '
+ if cmdIsoColorVal:
+ cmd += "isosurf_color_value=" + cmdIsoColorVal.strip(',') + ' '
+ if cmdIsoTrMap:
+ cmd += "isosurf_transp_map=" + cmdIsoTrMap.strip(',') + ' '
+ if cmdIsoTrVal:
+ cmd += "isosurf_transp_value=" + cmdIsoTrVal.strip(',') + ' '
+ if cmdSlice:
+ cmd += "slice=" + cmdSlice.strip(',') + ' '
+ cmd += "slice_position=" + cmdSlicePos.strip(',') + ' '
+ cmd += "slice_transparency=" + cmdSliceTransp.strip(',') + ' '
+
#
# cutting planes
#
More information about the grass-commit
mailing list