pycatia.in_interfaces.viewer_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.viewer_3d.Viewer3D(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
InfInterfaces.Viewer
Viewer3D

Represents a 3D viewer.
The 3D viewer aggregates a 3D viewpoint to display a 3D scene. In addition, the
Viewer3D object manages the lighting, the depth effects, the navigation style,
and the rendering mode.

See also:
Viewpoint3D, CatLightingMode, CatNavigationStyle, CatRenderingMode
property clipping_mode: int

Note

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

Returns or sets the clipping mode.

Example:
This example sets the depth effect for the My3DViewer 3D viewer to
catClippingModeNearAndFar.

My3DViewer.ClippingMode = catClippingModeNearAndFar
Returns:

enum cat_clipping_mode

Return type:

int

property far_limit: float

Note

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

Returns or sets the far limit for the far clipping plane. The distance is
measured from the eye location, that is the origin of the viewpoint, and is
expressed in model unit. The far clipping plane is available with the
catClippingModeFar and catClippingModeNearAndFar values of the CatClippingMode
enumeration only.

Example:
This example sets the far limit for the far clipping plane of the
My3DViewer 3D viewer to 150 model units.

My3DViewer.FarLimit = 150
Return type:

float

property foggy: bool

Note

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

Returns or sets the fog mode. Useful when clipping is
enabled.

Example:
This example sets the fog on for the My3DViewer 3D
viewer:

My3DViewer.Foggy = True
Return type:

bool

property ground: bool

Note

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

Returns or sets the ground displaying mode.

Example:
This example makes the ground visible for the My3DViewer 3D
viewer:

My3DViewer.Ground = True
Return type:

bool

property light_sources: LightSources

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property LightSources() As LightSources (Read Only)

Returns the viewer’s light source collection.

Example:
This example retrieves the light source collection for the My3DViewer
3D viewer in VPLightSources.

Set VPLightSources = My3DViewer.LightSources
Return type:

LightSources

property lighting_intensity: float

Note

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

Returns or sets the lighting intensity. The lighting intensity ranges
between 0 and 1.

Example:
This example sets the lighting intensity for the My3DViewer 3D viewer
to 0.35.

My3DViewer.LightingIntensity = 0.35
Return type:

float

property lighting_mode: int

Note

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

Returns or sets the lighting mode.

Example:
This example sets the lighting mode for the My3DViewer 3D viewer to
catInfiniteLightSource.

My3DViewer.LightingMode = catInfiniteLightSource
Returns:

enum cat_lighting_mode

Return type:

int

property navigation_style: int

Note

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

Returns or sets the navigation style.

Example:
This example sets the navigation style for the My3DViewer 3D viewer to
catNavigationWalk.

My3DViewer.NavigationStyle = catNavigationWalk
Returns:

enum cat_navigation_style

Return type:

int

property near_limit: float

Note

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

Returns or sets the near limit for the near clipping plane. The distance is
measured from the eye location, that is the origin of the viewpoint, and is
expressed in model unit. The near clipping plane is available with the
catClippingModeNear and catClippingModeNearAndFar values of the CatClippingMode
enumeration only.

Example:
This example sets the near limit for the near clipping plane of the
My3DViewer 3D viewer to 75 model units.

My3DViewer.NearLimit = 75
Return type:

float

property rendering_mode: int

Note

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

Returns or sets the rendering mode.

Example:
This example sets the rendering mode for the My3DViewer 3D viewer to
catRenderShadingWithEdges.

My3DViewer.RenderingMode = catRenderShadingWithEdges
Returns:

enum cat_rendering_mode

Return type:

int

rotate(i_axis: tuple, i_angle: float) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub Rotate(CATSafeArrayVariant iAxis,
double iAngle)

Applies a rotation. The rotation of iAngle degrees is applied to the
viewer’s contents around the axis iAxis (an array of 3 Variants), the invariant
point being the target (ie: Origin +
FocusDistance*SightDirection).

Example:
This applies a rotation of 10 degrees around the Up Direction to the
contents of the MyViewer3D viewer.

MyViewer3D.Rotate MyViewer3D.UpDirection, 10
Parameters:
  • i_axis (tuple) –

  • i_angle (float) –

Return type:

None

translate(i_vector: tuple) None

Note

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

Applies a translation. The translation vector is iVector (an array of 3
Variants).

Example:
This applies a translation along (1, 1, 1) to the contents of the
MyViewer3D viewer.

MyViewer3D.Translate Array(1, 1, 1)
Parameters:

i_vector (tuple) –

Return type:

None

property viewpoint_3d: ViewPoint3D

Note

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

Returns or sets the 3D viewpoint of a 3D viewer.

Example:
This example retrieves the Nice3DViewpoint 3D viewpoint from the
My3DViewer 3D viewer.

Dim Nice3DViewpoint As Viewpoint3D
Set Nice3DViewpoint = My3DViewer.Viewpoint3D
Return type:

ViewPoint3D