scale#

view_transf.scale(p0: float, p1: float, p2: float) int#

Defines a scaling in each of the axis directions. Used for global, frame, and tool transformation.

Since transformations can be different per viewport, this can be set for each viewport, thus a viewport selection is needed if more than one viewport is being used.
Args:
p0:

‘x_scale’ scale factor to apply to x, y, z coordinates

p1:

‘y_scale’ scale factor to apply to x, y, z coordinates

p2:

‘z_scale’ scale factor to apply to x, y, z coordinates

Examples:
# 
# Selecting viewport(s) 
# 
ensight.viewport.select_begin(2)
# 
# Applying a global scaling 
# (evenly in all directions) 
# 
ensight.view_transf.scale(1.2000e+00,1.2000e+00,1.2000e+00)
# 
# Now with a local transformation 
# (Scaling only in the z direction) 
# 
ensight.frame.select_begin(1)
ensight.view_transf.function("local")
ensight.view_transf.scale(0.0000e+00,0.0000e+00,5.0000e+00)
Returns:

zero on success, non-zero on error