pycatia.in_interfaces.viewpoint_3d

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.in_interfaces.viewpoint_3d.ViewPoint3D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
Viewpoint3D

Represents the 3D viewpoint.
The 3D viewpoint is the object that stores data which defines how your objects
are seen to enable their display by a 3D viewer. This data includes namely the
eye location, also named the origin, the distance from the eye to the target,
that is to the looked at point in the scene, the sight, up, and right
directions, defining a 3D axis system with the eye location as origin, the
projection type chosen among perspective (conic) and parallel (cylindric), and
the zoom factor. The right direction is not exposed in a property, and is
automatically computed from the sight and up directions.

See also:
CatProjectionMode
property field_of_view: float

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property FieldOfView() As double

Returns or sets the field of view associated with the viewpoint. The field
of view is half of the vertical angle of the viewpoint, expressed in degrees.
This property exists with the perspective (conic) projection type
only.

Example:
This example retrieves in HalfAngle the field of view associated with
the NiceViewpoint viewpoint.

HalfAngle = NiceViewpoint.FieldOfView
Return type:

float

property focus_distance: float

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property FocusDistance() As double

Returns or sets the focus distance of the viewpoint. The focus distance
determines the target position, that is the point at which the eye located at
the origin and looking towards the sight direction is looking at. It is
expressed in model units.

Example:
This example sets the focus distance of the NiceViewpoint viewpoint to
10.

NiceViewpoint.FocusDistance = 10
Return type:

float

get_origin() tuple

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub GetOrigin(CATSafeArrayVariant origin)

Retrieves the coordinates of the origin of the viewpoint. These coordinates
are returned as an array of 3 Variants (double type).

Example:
This example retrieves the origin of the NiceViewpoint viewpoint in the
origin variable.

Dim origin(2)
NiceViewpoint.GetOrigin origin
Return type:

tuple

get_sight_direction() tuple

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub GetSightDirection(CATSafeArrayVariant oSight)

Gets the components of the sight direction of the viewpoint. The sight
direction is the line passes both by the origin of the viewpoint and by the
target.

Example:
This example gets the sight direction of the
NiceViewpoint

Dim sight(2)
NiceViewpoint.GetSightDirection sight
Return type:

tuple

get_up_direction() tuple

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub GetUpDirection(CATSafeArrayVariant oUp)

Gets the components of the up direction of the viewpoint.

Example:
This example gets the up direction of the
NiceViewpoint.

Dim up(2)
NiceViewpoint.GetUpDirection up
Return type:

tuple

property projection_mode: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property ProjectionMode() As CatProjectionMode

Returns or sets the projection mode.

Example:
This example sets the projection mode for the My3DViewer 3D viewer to
catProjectionConic.

My3DViewer.Viewpoint3D.NavigationStyle = catProjectionConic
Returns:

enum cat_projection_mode

Return type:

int

put_origin(origin: tuple) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub PutOrigin(CATSafeArrayVariant origin)

Sets the coordinates of the origin of the viewpoint. These coordinates are
set as an array of 3 Variants (double type).

Example:
This example sets the origin of the NiceViewpoint viewpoint. to the
point with coordinates (10, 25, 15).

NiceViewpoint.PutOrigin Array(10, 25, 15)
Parameters:

origin (tuple) –

Return type:

None

put_sight_direction(o_sight: tuple) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub PutSightDirection(CATSafeArrayVariant oSight)

Sets the components of the sight direction of the viewpoint. The sight
direction is the line passes both by the origin of the viewpoint and by the
target.

Example:
This example sets the sight direction of the NiceViewpoint viewpoint to
the direction with components (1.414, 1.414, 0).

NiceViewpoint.PutSightDirection Array(1.414, 1.414,
0)
Parameters:

o_sight (tuple) –

Return type:

None

put_up_direction(o_up: tuple) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub PutUpDirection(CATSafeArrayVariant oUp)

Sets the components of the up direction of the viewpoint.

Example:
This example sets the up direction of the NiceViewpoint viewpoint to
the direction with components (0, 0, 1).

NiceViewpoint.PutUpDirection Array(0, 0, 1)
Parameters:

o_up (tuple) –

Return type:

None

property zoom: float

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property Zoom() As double

Returns or sets the zoom factor associated with the viewpoint. This
property exists with the parallel (cylindric) projection type
only.

Example:
This example retrieves in ZoomFactor the zoom factor associated with
the NiceViewpoint viewpoint, tests if it is greater than 2, and if so, sets it
to one and applies it.

ZoomFactor = NiceViewpoint.Zoom
If ZoomFactor > 2 Then
ZoomFactor = 1
NiceViewpoint.Zoom(ZoomFactor)
End If
Return type:

float