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.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectViewpoint3DRepresents the 3D viewpoint.The 3D viewpoint is the object that stores data which defines how your objectsare seen to enable their display by a 3D viewer. This data includes namely theeye 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 rightdirections, defining a 3D axis system with the eye location as origin, theprojection type chosen among perspective (conic) and parallel (cylindric), andthe zoom factor. The right direction is not exposed in a property, and isautomatically 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 doubleReturns or sets the field of view associated with the viewpoint. The fieldof view is half of the vertical angle of the viewpoint, expressed in degrees.This property exists with the perspective (conic) projection typeonly.Example:This example retrieves in HalfAngle the field of view associated withthe 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 doubleReturns or sets the focus distance of the viewpoint. The focus distancedetermines the target position, that is the point at which the eye located atthe origin and looking towards the sight direction is looking at. It isexpressed in model units.Example:This example sets the focus distance of the NiceViewpoint viewpoint to10.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 coordinatesare returned as an array of 3 Variants (double type).Example:This example retrieves the origin of the NiceViewpoint viewpoint in theorigin 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 sightdirection is the line passes both by the origin of the viewpoint and by thetarget.Example:This example gets the sight direction of theNiceViewpointDim 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 theNiceViewpoint.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 CatProjectionModeReturns or sets the projection mode.Example:This example sets the projection mode for the My3DViewer 3D viewer tocatProjectionConic.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 areset as an array of 3 Variants (double type).Example:This example sets the origin of the NiceViewpoint viewpoint. to thepoint 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 sightdirection is the line passes both by the origin of the viewpoint and by thetarget.Example:This example sets the sight direction of the NiceViewpoint viewpoint tothe 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 tothe 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 doubleReturns or sets the zoom factor associated with the viewpoint. Thisproperty exists with the parallel (cylindric) projection typeonly.Example:This example retrieves in ZoomFactor the zoom factor associated withthe NiceViewpoint viewpoint, tests if it is greater than 2, and if so, sets itto one and applies it.ZoomFactor = NiceViewpoint.ZoomIf ZoomFactor > 2 ThenZoomFactor = 1NiceViewpoint.Zoom(ZoomFactor)End If
- Return type:
float