distance#

view_transf.distance(p0: float) int#

Sets the distance from the look_from to the look_at point.

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.
This command causes the look_from point to move along the line between the look_from and the look_at point to the desired distance. The look_at point does not move.
Args:
p0:

‘dist’ distance between the look_from and the look_at point (in model system)

Examples:
# 
# Selecting two viewports 
# 
ensight.viewport.select_begin(1,3)
# 
# Setting the look_at and look_from points 
# for each of these viewports 
# 
ensight.view_transf.look_at(1.0000e+00,5.0000e-01,1.0000e+00)
ensight.view_transf.look_from(5.0000e-01,5.0000e-01,2.0000e+01)
# 
# Changing the distance between the look_at and the look_from 
# points. The look_at point will not change, but the 
# look_from point will be moved appropriately 
# 
ensight.view_transf.distance(2.5000e+01)
Returns:

zero on success, non-zero on error