more verbose help, drop support for really old vtk
This commit is contained in:
parent
802ef6fe5c
commit
5c20609e81
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit a76f03d99492ff14b7942124d76952c675aa85c3
|
Subproject commit 7e51c3e08655261ec9bd43c6841575e323927de7
|
|
@ -13,7 +13,7 @@ scriptID = ' '.join([scriptName,damask.version])
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Add data of selected column(s) from (first) row of linked ASCIItable that shares the linking column value.
|
Add data of selected column(s) from (first) row of linked ASCIItable that shares the linking column value.
|
||||||
|
|
||||||
""", version = scriptID)
|
""", version = scriptID)
|
||||||
|
|
|
@ -24,7 +24,7 @@ def Mises(what,tensor):
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Add vonMises equivalent values for symmetric part of requested strains and/or stresses.
|
Add vonMises equivalent values for symmetric part of requested strains and/or stresses.
|
||||||
|
|
||||||
""", version = scriptID)
|
""", version = scriptID)
|
||||||
|
|
|
@ -38,7 +38,7 @@ def check_matrix(M):
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Add quaternion and/or Bunge Euler angle representation of crystal lattice orientation.
|
Add quaternion and/or Bunge Euler angle representation of crystal lattice orientation.
|
||||||
Orientation is given by quaternion, Euler angles, rotation matrix, or crystal frame coordinates
|
Orientation is given by quaternion, Euler angles, rotation matrix, or crystal frame coordinates
|
||||||
(i.e. component vectors of rotation matrix).
|
(i.e. component vectors of rotation matrix).
|
||||||
|
|
|
@ -13,7 +13,7 @@ scriptID = ' '.join([scriptName,damask.version])
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Add coordinates of stereographic projection of given direction (pole) in crystal frame.
|
Add coordinates of stereographic projection of given direction (pole) in crystal frame.
|
||||||
|
|
||||||
""", version = scriptID)
|
""", version = scriptID)
|
||||||
|
|
|
@ -13,7 +13,7 @@ scriptID = ' '.join([scriptName,damask.version])
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Add column(s) containing eigenvalues and eigenvectors of requested symmetric tensor column(s).
|
Add column(s) containing eigenvalues and eigenvectors of requested symmetric tensor column(s).
|
||||||
|
|
||||||
""", version = scriptID)
|
""", version = scriptID)
|
||||||
|
|
|
@ -25,7 +25,7 @@ def operator(stretch,strain,eigenvalues):
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Add column(s) containing given strains based on given stretches of requested deformation gradient column(s).
|
Add column(s) containing given strains based on given stretches of requested deformation gradient column(s).
|
||||||
|
|
||||||
""", version = scriptID)
|
""", version = scriptID)
|
||||||
|
|
|
@ -14,7 +14,7 @@ scriptID = ' '.join([scriptName,damask.version])
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Average each data block of size 'packing' into single values thus reducing the former grid to grid/packing.
|
Average each data block of size 'packing' into single values thus reducing the former grid to grid/packing.
|
||||||
|
|
||||||
""", version = scriptID)
|
""", version = scriptID)
|
||||||
|
|
|
@ -13,7 +13,7 @@ scriptID = ' '.join([scriptName,damask.version])
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Produces a binned grid of two columns from an ASCIItable, i.e. a two-dimensional probability density map.
|
Produces a binned grid of two columns from an ASCIItable, i.e. a two-dimensional probability density map.
|
||||||
|
|
||||||
""", version = scriptID)
|
""", version = scriptID)
|
||||||
|
|
|
@ -13,7 +13,7 @@ scriptID = ' '.join([scriptName,damask.version])
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Blows up each value to a surrounding data block of size 'packing' thus increasing the former resolution
|
Blows up each value to a surrounding data block of size 'packing' thus increasing the former resolution
|
||||||
to resolution*packing.
|
to resolution*packing.
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ def sortingList(labels,whitelistitems):
|
||||||
# MAIN
|
# MAIN
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
|
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
|
||||||
Filter rows according to condition and columns by either white or black listing.
|
Filter rows according to condition and columns by either white or black listing.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
|
@ -17,7 +17,7 @@ scriptID = ' '.join([scriptName,damask.version])
|
||||||
msg = "Add scalars, vectors, and/or an RGB tuple from"
|
msg = "Add scalars, vectors, and/or an RGB tuple from"
|
||||||
msg += "an ASCIItable to existing VTK grid (.vtr/.vtk/.vtu)."
|
msg += "an ASCIItable to existing VTK grid (.vtr/.vtk/.vtu)."
|
||||||
parser = OptionParser(option_class=damask.extendableOption,
|
parser = OptionParser(option_class=damask.extendableOption,
|
||||||
usage='%prog options [file[s]]',
|
usage='%prog options [ASCIItable(s)]',
|
||||||
description = msg,
|
description = msg,
|
||||||
version = scriptID)
|
version = scriptID)
|
||||||
|
|
||||||
|
@ -172,8 +172,7 @@ for name in filenames:
|
||||||
|
|
||||||
writer.SetDataModeToBinary()
|
writer.SetDataModeToBinary()
|
||||||
writer.SetCompressorTypeToZLib()
|
writer.SetCompressorTypeToZLib()
|
||||||
if vtk.VTK_MAJOR_VERSION <= 5: writer.SetInput(rGrid)
|
writer.SetInputData(rGrid)
|
||||||
else: writer.SetInputData(rGrid)
|
|
||||||
writer.Write()
|
writer.Write()
|
||||||
|
|
||||||
# ------------------------------------------ render result ---------------------------------------
|
# ------------------------------------------ render result ---------------------------------------
|
||||||
|
|
|
@ -15,7 +15,7 @@ scriptID = ' '.join([scriptName,damask.version])
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
parser = OptionParser(option_class=damask.extendableOption,
|
parser = OptionParser(option_class=damask.extendableOption,
|
||||||
usage='%prog options [file[s]]',
|
usage='%prog options [ASCIItable(s)]',
|
||||||
description = """Add scalar and RGB tuples from ASCIItable to existing VTK point cloud (.vtp).""",
|
description = """Add scalar and RGB tuples from ASCIItable to existing VTK point cloud (.vtp).""",
|
||||||
version = scriptID)
|
version = scriptID)
|
||||||
|
|
||||||
|
@ -46,8 +46,6 @@ parser.add_option('-c', '--color', dest='color', action='extend',
|
||||||
parser.set_defaults(data = [],
|
parser.set_defaults(data = [],
|
||||||
tensor = [],
|
tensor = [],
|
||||||
color = [],
|
color = [],
|
||||||
inplace = False,
|
|
||||||
render = False,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
(options, filenames) = parser.parse_args()
|
(options, filenames) = parser.parse_args()
|
||||||
|
@ -151,14 +149,12 @@ for name in filenames:
|
||||||
# ------------------------------------------ output result ---------------------------------------
|
# ------------------------------------------ output result ---------------------------------------
|
||||||
|
|
||||||
Polydata.Modified()
|
Polydata.Modified()
|
||||||
if vtk.VTK_MAJOR_VERSION <= 5: Polydata.Update()
|
|
||||||
|
|
||||||
writer = vtk.vtkXMLPolyDataWriter()
|
writer = vtk.vtkXMLPolyDataWriter()
|
||||||
writer.SetDataModeToBinary()
|
writer.SetDataModeToBinary()
|
||||||
writer.SetCompressorTypeToZLib()
|
writer.SetCompressorTypeToZLib()
|
||||||
writer.SetFileName(os.path.splitext(options.vtk)[0]+('.vtp' if options.inplace else '_added.vtp'))
|
writer.SetFileName(os.path.splitext(options.vtk)[0]+('.vtp' if options.inplace else '_added.vtp'))
|
||||||
if vtk.VTK_MAJOR_VERSION <= 5: writer.SetInput(Polydata)
|
writer.SetInputData(Polydata)
|
||||||
else: writer.SetInputData(Polydata)
|
|
||||||
writer.Write()
|
writer.Write()
|
||||||
|
|
||||||
# ------------------------------------------ render result ---------------------------------------
|
# ------------------------------------------ render result ---------------------------------------
|
||||||
|
|
|
@ -78,7 +78,6 @@ for name in filenames:
|
||||||
Polydata.SetPoints(Points)
|
Polydata.SetPoints(Points)
|
||||||
Polydata.SetVerts(Vertices)
|
Polydata.SetVerts(Vertices)
|
||||||
Polydata.Modified()
|
Polydata.Modified()
|
||||||
if vtk.VTK_MAJOR_VERSION <= 5: Polydata.Update()
|
|
||||||
|
|
||||||
# ------------------------------------------ output result ---------------------------------------
|
# ------------------------------------------ output result ---------------------------------------
|
||||||
|
|
||||||
|
@ -94,8 +93,8 @@ for name in filenames:
|
||||||
writer.SetHeader('# powered by '+scriptID)
|
writer.SetHeader('# powered by '+scriptID)
|
||||||
writer.WriteToOutputStringOn()
|
writer.WriteToOutputStringOn()
|
||||||
|
|
||||||
if vtk.VTK_MAJOR_VERSION <= 5: writer.SetInput(Polydata)
|
|
||||||
else: writer.SetInputData(Polydata)
|
writer.SetInputData(Polydata)
|
||||||
|
|
||||||
writer.Write()
|
writer.Write()
|
||||||
|
|
||||||
|
|
|
@ -125,8 +125,7 @@ for name in filenames:
|
||||||
writer.SetHeader('# powered by '+scriptID)
|
writer.SetHeader('# powered by '+scriptID)
|
||||||
writer.WriteToOutputStringOn()
|
writer.WriteToOutputStringOn()
|
||||||
|
|
||||||
if vtk.VTK_MAJOR_VERSION <= 5: writer.SetInput(rGrid)
|
writer.SetInputData(rGrid)
|
||||||
else: writer.SetInputData(rGrid)
|
|
||||||
|
|
||||||
writer.Write()
|
writer.Write()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue