added new option "no-data" to omit output of microstructure data field, i.e. generates plain mesh only
This commit is contained in:
parent
594c3c007b
commit
0bcd508298
|
@ -53,6 +53,11 @@ Produce VTK rectilinear mesh of structure data from geom description
|
|||
""" + string.replace(scriptID,'\n','\\n')
|
||||
)
|
||||
|
||||
parser.add_option('-n','--nodata', dest='data', action='store_false',
|
||||
help='omit microstructure data, just generate mesh')
|
||||
|
||||
parser.set_defaults(data = True)
|
||||
|
||||
(options, filenames) = parser.parse_args()
|
||||
|
||||
#--- setup file handles --------------------------------------------------------------------------
|
||||
|
@ -125,10 +130,12 @@ for file in files:
|
|||
for j in xrange(info['grid'][i]+1):
|
||||
temp.InsertTuple1(j,j*info['size'][i]/info['grid'][i]+info['origin'][i])
|
||||
if i == 0: grid.SetXCoordinates(temp)
|
||||
if i == 1: grid.SetYCoordinates(temp)
|
||||
if i == 2: grid.SetZCoordinates(temp)
|
||||
elif i == 1: grid.SetYCoordinates(temp)
|
||||
elif i == 2: grid.SetZCoordinates(temp)
|
||||
|
||||
#--- read microstructure information --------------------------------------------------------------
|
||||
|
||||
if options.data:
|
||||
structure = vtk.vtkIntArray()
|
||||
structure.SetName('Microstructures')
|
||||
|
||||
|
|
Loading…
Reference in New Issue