tension_rgb#

tensor.tension_rgb(p0: float, p1: float, p2: float) int#

Sets the color that will be used for the tension portion of a tensor glyph if the “tensor: color_by” command method is set to “direction”.

If the “tensor: color_by” command method is set to “part”, the tensor glyph part is colored like any other part.
Args:
p0:

‘red_val’ red, green, blue color components for the tension line (0.0 to 1.0)

p1:

‘grn_val’ red, green, blue color components for the tension line (0.0 to 1.0)

p2:

‘blu_val’ red, green, blue color components for the tension line (0.0 to 1.0)

Examples:
#
# Activating a tensor variable
#
ensight.variables.activate("uniaxial_tensor")
#
# Selecting all parts as parents
#
ensight.part.select_all()
#
# Grouping a bunch of tensor attribute commands
# (included is the one to make tension
#  lines a particular color)
# 
ensight.tensor.begin()
ensight.tensor.variable("uniaxial_tensor")
ensight.tensor.display_compression("ON")
ensight.tensor.display_tension("ON")
ensight.tensor.display_major("ON")
ensight.tensor.display_minor("ON")
ensight.tensor.display_middle("ON")
ensight.tensor.tip_shape("triangle")
ensight.tensor.tip_size(1.0000e-01)
ensight.tensor.color_by("direction")
ensight.tensor.compression_rgb(1.0000e+00,0.0000e+00,4.0000e-01)
ensight.tensor.tension_rgb(0.0000e+00,8.0000e-01,1.0000e+00)
ensight.tensor.line_width_by("direction")
ensight.tensor.compression_line_width(2)
ensight.tensor.tension_line_width(4)
ensight.tensor.end()
#
# Creating the tensor glyph part
#
ensight.tensor.create()
Returns:

zero on success, non-zero on error