axis#

view_transf.axis(p0: str) int#

Sets the axis to use for rotate, translate, and scale transformations.

Used in the transformation dialog to control the axis about which transformational values are applied.
The axis is either the global system or, if in Frame mode, the selected frame’s axis system.
Args:
p0:

‘which’

  • x

  • y

  • z

  • all

Examples:
# 
# Set the axis to x 
# and rotate about the x axis 15 degrees 
# 
ensight.view_transf.axis("x")
ensight.view_transf.rotate(15.000000,0.000000,0.000000)
# 
# Set the axis to be y 
# and translate one unit in the -negative y direction 
# 
ensight.view_transf.axis("y")
ensight.view_transf.translate(0.0000e+00,-1.0000e+00,0.0000e+00)
Returns:

zero on success, non-zero on error