OCC.V3d module¶
This package contains the set of commands and servicesof the 3D Viewer. It provides a set of high level commandsto control the views and viewing modes. This package iscomplementary to the Visual3D graphic package.
-
class
Handle_V3d_AmbientLight
(*args)¶ Bases:
OCC.V3d.Handle_V3d_Light
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_CircularGrid
(*args)¶ Bases:
OCC.Aspect.Handle_Aspect_CircularGrid
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_ColorScale
(*args)¶ Bases:
OCC.Aspect.Handle_Aspect_ColorScale
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_ColorScaleLayerItem
(*args)¶ Bases:
OCC.Visual3d.Handle_Visual3d_LayerItem
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_DirectionalLight
(*args)¶ Bases:
OCC.V3d.Handle_V3d_PositionLight
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_LayerMgr
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_Light
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_Plane
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_PositionLight
(*args)¶ Bases:
OCC.V3d.Handle_V3d_Light
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_PositionalLight
(*args)¶ Bases:
OCC.V3d.Handle_V3d_PositionLight
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_RectangularGrid
(*args)¶ Bases:
OCC.Aspect.Handle_Aspect_RectangularGrid
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_SpotLight
(*args)¶ Bases:
OCC.V3d.Handle_V3d_PositionLight
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_View
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_V3d_Viewer
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
class
V3d_AmbientLight
(*args)¶ Bases:
OCC.V3d.V3d_Light
- Constructs an ambient light source in the viewer VM. The default Color of this light source is WHITE.
Parameters: - VM (Handle_V3d_Viewer &) –
- Color (Quantity_NameOfColor) – default value is Quantity_NOC_WHITE
Return type: -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
V3d_CircularGrid
(*args)¶ Bases:
OCC.Aspect.Aspect_CircularGrid
Parameters: - aViewer (V3d_ViewerPointer &) –
- aColor (Quantity_Color &) –
- aTenthColor (Quantity_Color &) –
Return type: -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
V3d_ColorScale
(*args)¶ Bases:
OCC.Aspect.Aspect_ColorScale
- Returns returns ColorScale from V3d. Returns View from V3d.
Parameters: theMgr (Handle_V3d_LayerMgr &) – Return type: None -
GetHandle
()¶
-
TextSize
()¶ Parameters: - theText (TCollection_ExtendedString &) –
- theHeight (int) –
- theWidth (int &) –
- theAscent (int &) –
- theDescent (int &) –
Return type:
-
thisown
¶ The membership flag
-
class
V3d_ColorScaleLayerItem
(*args)¶ Bases:
OCC.Visual3d.Visual3d_LayerItem
- Creates a layer item
Parameters: aColorScale (Handle_V3d_ColorScale &) – Return type: None -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
V3d_DirectionalLight
(*args)¶ Bases:
OCC.V3d.V3d_PositionLight
- Creates a directional light source in the viewer.
Parameters: - VM (Handle_V3d_Viewer &) –
- Direction (V3d_TypeOfOrientation) – default value is V3d_XposYposZpos
- Color (Quantity_NameOfColor) – default value is Quantity_NOC_WHITE
- Headlight (bool) – default value is Standard_False
Return type: - Creates a directional light source in the viewer. Xt,Yt,Zt : Coordinate of light source Target. Xp,Yp,Zp : Coordinate of light source Position. The others parameters describe before.
Parameters: - VM (Handle_V3d_Viewer &) –
- Xt (V3d_Coordinate) –
- Yt (V3d_Coordinate) –
- Zt (V3d_Coordinate) –
- Xp (V3d_Coordinate) –
- Yp (V3d_Coordinate) –
- Zp (V3d_Coordinate) –
- Color (Quantity_NameOfColor) – default value is Quantity_NOC_WHITE
- Headlight (bool) – default value is Standard_False
Return type: -
Direction
()¶ - Returns the Vx,Vy,Vz direction of the light source.
Parameters: - Vx (Quantity_Parameter &) –
- Vy (Quantity_Parameter &) –
- Vz (Quantity_Parameter &) –
Return type:
-
DisplayPosition
()¶ - Returns the choosen position to represent the light source.
Parameters: - X (V3d_Coordinate &) –
- Y (V3d_Coordinate &) –
- Z (V3d_Coordinate &) –
Return type:
-
GetHandle
()¶
-
SetDirection
()¶ - Defines the direction of the light source by a predefined orientation.
Parameters: Direction (V3d_TypeOfOrientation) – Return type: None - Defines the direction of the light source by the predefined vector Xm,Ym,Zm. Warning: raises BadValue from V3d if the vector is null.
Parameters: - Xm (Quantity_Parameter) –
- Ym (Quantity_Parameter) –
- Zm (Quantity_Parameter) –
Return type:
-
SetDisplayPosition
()¶ - Defines the point of light source representation.
Parameters: - X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
Return type:
-
thisown
¶ The membership flag
-
class
V3d_LayerMgr
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
Parameters: aView (Handle_V3d_View &) – Return type: None -
ColorScale
()¶ Return type: Handle_Aspect_ColorScale
-
GetHandle
()¶
-
Overlay
()¶ Return type: Handle_Visual3d_Layer
-
View
()¶ Return type: Handle_V3d_View
-
thisown
¶ The membership flag
-
-
class
V3d_Light
(*args, **kwargs)¶ Bases:
OCC.MMgt.MMgt_TShared
-
Color
()¶ - Returns the colour of the light source depending of the color type.
Parameters: - Type (Quantity_TypeOfColor) –
- V1 (Quantity_Parameter &) –
- V2 (Quantity_Parameter &) –
- V3 (Quantity_Parameter &) –
Return type: - Returns the colour of the light source.
Parameters: Name (Quantity_NameOfColor &) – Return type: None - Returns the colour of the light source.
Return type: Quantity_Color
-
GetHandle
()¶
-
SetColor
()¶ - Defines the colour of a light source according to the type of colour definition and the three corresponding values.
Parameters: - Type (Quantity_TypeOfColor) –
- V1 (Quantity_Parameter) –
- V2 (Quantity_Parameter) –
- V3 (Quantity_Parameter) –
Return type: - Defines the colour of a light source by giving the name of the colour in the form Quantity_NOC_xxxx .
Parameters: Name (Quantity_NameOfColor) – Return type: None - Defines the colour of a light source by giving the basic colour.
Parameters: Name (Quantity_Color &) – Return type: None
-
Type
()¶ - Returns the Type of the Light
Return type: V3d_TypeOfLight
-
thisown
¶ The membership flag
-
-
class
V3d_ListOfTransient
(*args, **kwargs)¶ Bases:
OCC.TColStd.TColStd_ListOfTransient
-
Contains
()¶ - Return true if theObject is stored in the list
Parameters: theObject (Handle_Standard_Transient &) – Return type: bool
-
Remove
()¶ - Remove all elements equal to theObject from the list
Parameters: theObject (Handle_Standard_Transient &) – Return type: None
-
thisown
¶ The membership flag
-
-
class
V3d_Plane
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Creates a clipping plane from plane coefficients.
Parameters: - theA (Quantity_Parameter) – default value is 0.0
- theB (Quantity_Parameter) – default value is 0.0
- theC (Quantity_Parameter) – default value is 1.0
- theD (Quantity_Parameter) – default value is 0.0
Return type: -
ClipPlane
()¶ - Use this method to pass clipping plane implementation for standard clipping workflow. returns clipping plane implementation handle.
Return type: Handle_Graphic3d_ClipPlane
-
Display
()¶ - Display the plane representation in the choosen view.
Parameters: - theView (Handle_V3d_View &) –
- theColor (Quantity_Color &) – default value is Quantity_NOC_GRAY
Return type: void
-
GetHandle
()¶
-
Plane
()¶ - Returns the parameters of the plane.
Parameters: - theA (Quantity_Parameter &) –
- theB (Quantity_Parameter &) –
- theC (Quantity_Parameter &) –
- theD (Quantity_Parameter &) –
Return type:
-
SetPlane
()¶ - Change plane equation.
Parameters: - theA (Quantity_Parameter) –
- theB (Quantity_Parameter) –
- theC (Quantity_Parameter) –
- theD (Quantity_Parameter) –
Return type:
-
thisown
¶ The membership flag
-
class
V3d_PositionLight
(*args, **kwargs)¶ Bases:
OCC.V3d.V3d_Light
-
Display
()¶ - Display the graphic structure of light source in the choosen view. We have three type of representation - SIMPLE : Only the light source is displayed. - PARTIAL : The light source and the light space are displayed. - COMPLETE : The light source, the light space and the radius of light space are displayed. We can choose the ‘SAMELAST’ as parameter of representation In this case the graphic structure representation will be the last displayed.
Parameters: - aView (Handle_V3d_View &) –
- Representation (V3d_TypeOfRepresentation) – default value is V3d_SIMPLE
Return type: void
-
GetHandle
()¶
-
OnHideFace
()¶ - Calculate the position of the light, on the hide face of the picking sphere.
Parameters: aView (Handle_V3d_View &) – Return type: None
-
OnSeeFace
()¶ - Calculate the position of the light, on the seen face of the picking sphere.
Parameters: aView (Handle_V3d_View &) – Return type: None
-
Position
()¶ - Returns the position of the light source.
Parameters: - X (V3d_Coordinate &) –
- Y (V3d_Coordinate &) –
- Z (V3d_Coordinate &) –
Return type: void
-
Radius
()¶ - Returns the radius of the picking sphere.
Return type: Quantity_Parameter
-
SeeOrHide
()¶ - Returns the visibility status If True the source is visible. If False it’s hidden.
Parameters: aView (Handle_V3d_View &) – Return type: bool
-
SetPosition
()¶ - Defines the position of the light source. Should be redefined!
Parameters: - X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
Return type: void
-
SetTarget
()¶ - Defines the target of the light (the center of the sphere)
Parameters: - X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
Return type:
-
Target
()¶ - Returns the position of the target of the light source.
Parameters: - X (V3d_Coordinate &) –
- Y (V3d_Coordinate &) –
- Z (V3d_Coordinate &) –
Return type:
-
Tracking
()¶ - Tracking the light position, or the light space, or the radius of the light space, that depends of initial picking ‘WhatPick’ (see the pick method). If WhatPick is SPACELIGHT, then the parameters Xpix, Ypix are the coordinates of a translation vector.
Parameters: Return type:
-
thisown
¶ The membership flag
-
-
class
V3d_PositionalLight
(*args)¶ Bases:
OCC.V3d.V3d_PositionLight
- Creates an isolated light source X,Y,Z in the viewer. It is also defined by the color Color and two attenuation factors Attenuation1, Attenuation2. The resulting attenuation factor determining the illumination of a surface depends on the following formula : F = 1/(A1 + A2*Length) A1,A2 being the two factors of attenuation Length is the distance of the isolated source from the surface. Warning! raises BadValue from V3d if one of the attenuation coefficients is not between 0 et 1.
Parameters: - VM (Handle_V3d_Viewer &) –
- X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
- Color (Quantity_NameOfColor) – default value is Quantity_NOC_WHITE
- Attenuation1 (Quantity_Coefficient) – default value is 1.0
- Attenuation2 (Quantity_Coefficient) – default value is 0.0
Return type: - Creates a light source of the Positional type in the viewer. Xt,Yt,Zt : Coordinate of Target light source. Xp,Yp,Zp : Coordinate of Position light source. The light source is also defined by the color Color and two attenuation factors Attenuation1, Attenuation2 that determine the illumination of a surface using the following formula : F = 1/(A1 + A2*Length) where: - A1,A2 are the two attenuation factors, and - Length is the distance from the isolated source. Warning! raises BadValue from V3d if one of the attenuation coefficients is not between 0 et 1.
Parameters: - VM (Handle_V3d_Viewer &) –
- Xt (V3d_Coordinate) –
- Yt (V3d_Coordinate) –
- Zt (V3d_Coordinate) –
- Xp (V3d_Coordinate) –
- Yp (V3d_Coordinate) –
- Zp (V3d_Coordinate) –
- Color (Quantity_NameOfColor) – default value is Quantity_NOC_WHITE
- Attenuation1 (Quantity_Coefficient) – default value is 1.0
- Attenuation2 (Quantity_Coefficient) – default value is 0.0
Return type: -
Attenuation
()¶ - Returns the attenuation factors A1,A2 of the light source used at construction time.
Parameters: - A1 (Quantity_Coefficient &) –
- A2 (Quantity_Coefficient &) –
Return type:
-
GetHandle
()¶
-
SetAttenuation
()¶ - Defines the attenuation factors. Warning: raises BadValue from V3d if one of the attenuation coefficients is not between 0 et 1.
Parameters: - A1 (Quantity_Coefficient) –
- A2 (Quantity_Coefficient) –
Return type:
-
thisown
¶ The membership flag
-
class
V3d_RectangularGrid
(*args)¶ Bases:
OCC.Aspect.Aspect_RectangularGrid
Parameters: - aViewer (V3d_ViewerPointer &) –
- aColor (Quantity_Color &) –
- aTenthColor (Quantity_Color &) –
Return type: -
GetHandle
()¶
-
GraphicValues
()¶ Parameters: - XSize (float &) –
- YSize (float &) –
- OffSet (float &) –
Return type:
-
thisown
¶ The membership flag
-
class
V3d_SpotLight
(*args)¶ Bases:
OCC.V3d.V3d_PositionLight
- Creates a light source of the Spot type in the viewer. The attenuation factor F which determines the illumination of a surface depends on the following formula : F = 1/(A1 + A2*Length) A1,A2 being the 2 factors of attenuation Length is the distance from the source to the surface. The default values (1.0,0.0) correspond to a minimum of attenuation . The concentration factor determines the dispersion of the light on the surface, the default value (1.0) corresponds to a minimum of dispersion . Warning! raises BadValue from V3d - If one of the coefficients is not between 0 and 1 . If the lighting angle is <= 0 ou > PI .
Parameters: - VM (Handle_V3d_Viewer &) –
- X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
- Direction (V3d_TypeOfOrientation) – default value is V3d_XnegYnegZpos
- Color (Quantity_NameOfColor) – default value is Quantity_NOC_WHITE
- Attenuation1 (Quantity_Coefficient) – default value is 1.0
- Attenuation2 (Quantity_Coefficient) – default value is 0.0
- Concentration (Quantity_Coefficient) – default value is 1.0
- Angle (Quantity_PlaneAngle) – default value is 0.523599
Return type: - Creates a light source of the Spot type in the viewer. Xt,Yt,Zt : Coordinate of light source Target. Xp,Yp,Zp : Coordinate of light source Position. The others parameters describe before. Warning! raises BadValue from V3d - If one of the coefficients is not between 0 and 1 . If the lighting angle is <= 0 ou > PI .
Parameters: - VM (Handle_V3d_Viewer &) –
- Xt (V3d_Coordinate) –
- Yt (V3d_Coordinate) –
- Zt (V3d_Coordinate) –
- Xp (V3d_Coordinate) –
- Yp (V3d_Coordinate) –
- Zp (V3d_Coordinate) –
- Color (Quantity_NameOfColor) – default value is Quantity_NOC_WHITE
- Attenuation1 (Quantity_Coefficient) – default value is 1.0
- Attenuation2 (Quantity_Coefficient) – default value is 0.0
- Concentration (Quantity_Coefficient) – default value is 1.0
- Angle (Quantity_PlaneAngle) – default value is 0.523599
Return type: -
Angle
()¶ - Returns the spot angle.
Return type: Quantity_PlaneAngle
-
Attenuation
()¶ - Returns the attenuation factors A1,A2 of the light source.
Parameters: - A1 (Quantity_Coefficient &) –
- A2 (Quantity_Coefficient &) –
Return type:
-
Concentration
()¶ Return type: Quantity_Coefficient
-
Direction
()¶ - Returns the direction of the light source defined by Vx,Vy,Vz.
Parameters: - Vx (Quantity_Parameter &) –
- Vy (Quantity_Parameter &) –
- Vz (Quantity_Parameter &) –
Return type:
-
GetHandle
()¶
-
SetAngle
()¶ - Defines the spot angle in RADIANS. Warning: raises BadValue from from V3d If the angle is <= 0 ou > PI .
Parameters: Angle (Quantity_PlaneAngle) – Return type: None
-
SetAttenuation
()¶ - Defines the coefficients of attenuation. Warning! raises BadValue from V3d if one of the coefficient is <0 ou >1 .
Parameters: - A1 (Quantity_Coefficient) –
- A2 (Quantity_Coefficient) –
Return type:
-
SetConcentration
()¶ - Defines the coefficient of concentration. if the coefficient is <0 ou >1 .
Parameters: C (Quantity_Coefficient) – Return type: None
-
SetDirection
()¶ - Defines the direction of the light source. If the normal vector is NULL.
Parameters: - Vx (Quantity_Parameter) –
- Vy (Quantity_Parameter) –
- Vz (Quantity_Parameter) –
Return type: - Defines the direction of the light source according to a predefined directional vector.
Parameters: Orientation (V3d_TypeOfOrientation) – Return type: None
-
thisown
¶ The membership flag
-
class
V3d_View
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Initializes the view.
Parameters: - VM (Handle_V3d_Viewer &) –
- Type (V3d_TypeOfView) – default value is V3d_ORTHOGRAPHIC
Return type: - Initializes the view by copying.
Parameters: - theVM (Handle_V3d_Viewer &) –
- theView (Handle_V3d_View &) –
Return type: -
ActiveLight
()¶ Return type: Handle_V3d_Light
-
AddClipPlane
()¶ - Adds clip plane to the view. The composition of clip planes truncates the rendering space to convex volume. Number of supported clip planes can be consulted by PlaneLimit method of associated Visual3d_View. Please be aware that the planes which exceed the limit are ignored during rendering. @param thePlane [in] the clip plane to be added to view.
Parameters: thePlane (Handle_Graphic3d_ClipPlane &) – Return type: void
-
Antialiasing
()¶ - Indicates if the antialiasing is active (True) or inactive (False).
Return type: bool
-
At
()¶ - Returns the position of the view point.
Parameters: - X (V3d_Coordinate &) –
- Y (V3d_Coordinate &) –
- Z (V3d_Coordinate &) –
Return type:
-
AutoZFit
()¶ - If automatic z-range fitting is turned on, adjusts Z-min and Z-max projection volume planes with call to ZFitAll.
Return type: None
-
AxialScale
()¶ - Returns the current values of the anisotropic (axial) scale factors.
Parameters: - Sx (float &) –
- Sy (float &) –
- Sz (float &) –
Return type: - Performs anisotropic scaling of <self> view along the given <Axis>. The scale factor is calculated on a basis of the mouse pointer displacement <Dx,Dy>. The calculated scale factor is then passed to SetAxialScale(Sx, Sy, Sz) method.
Parameters: Return type:
-
BackFacingModel
()¶ - Returns current state of the back faces display
Return type: V3d_TypeOfBackfacingModel
-
BackgroundColor
()¶ - Returns the Background color values of the view depending of the color Type.
Parameters: - Type (Quantity_TypeOfColor) –
- V1 (Quantity_Parameter &) –
- V2 (Quantity_Parameter &) –
- V3 (Quantity_Parameter &) –
Return type: - Returns the Background color object of the view.
Return type: Quantity_Color
-
Camera
()¶ - Returns camera object of the view. returns: handle to camera object, or NULL if 3D view does not use the camera approach.
Return type: Handle_Graphic3d_Camera
-
ChangeRenderingParams
()¶ - Returns reference to current rendering parameters and effect settings.
Return type: Graphic3d_RenderingParams
-
ColorScale
()¶ Return type: Handle_Aspect_ColorScale
-
Convert
()¶ - Converts the PIXEL value to a value in the projection plane.
Parameters: Vp (int) – Return type: Quantity_Length - Converts the point PIXEL into a point projected in the reference frame of the projection plane.
Parameters: Return type: - Converts tha value of the projection plane into a PIXEL value.
Parameters: Vv (Quantity_Length) – Return type: int - Converts the point defined in the reference frame of the projection plane into a point PIXEL.
Parameters: - Xv (V3d_Coordinate) –
- Yv (V3d_Coordinate) –
- Xp (int &) –
- Yp (int &) –
Return type: - Converts the projected point into a point in the reference frame of the view corresponding to the intersection with the projection plane of the eye/view point vector.
Parameters: Return type: - Projects the point defined in the reference frame of the view into the projected point in the associated window.
Parameters: - X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
- Xp (int &) –
- Yp (int &) –
Return type:
-
ConvertToGrid
()¶ - Converts the projected point into the nearest grid point in the reference frame of the view corresponding to the intersection with the projection plane of the eye/view point vector and display the grid marker. Warning: When the grid is not active the result is identical to the above Convert() method. How to use: 1) Enable the grid echo display myViewer->SetGridEcho(Standard_True); 2) When application receive a move event: 2.1) Check if any object is detected if( myInteractiveContext->MoveTo(x,y) == AIS_SOD_Nothing ) { 2.2) Check if the grid is active if( myViewer->Grid()->IsActive() ) { 2.3) Display the grid echo and gets the grid point myView->ConvertToGrid(x,y,X,Y,Z); myView->Viewer()->ShowGridEcho (myView, Graphic3d_Vertex (X,Y,Z)); myView->RedrawImmediate(); 2.4) Else this is the standard case } else myView->Convert(x,y,X,Y,Z);
Parameters: Return type: - Converts the point into the nearest grid point and display the grid marker.
Parameters: - X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
- Xg (V3d_Coordinate &) –
- Yg (V3d_Coordinate &) –
- Zg (V3d_Coordinate &) –
Return type:
-
ConvertWithProj
()¶ - Converts the projected point into a point in the reference frame of the view corresponding to the intersection with the projection plane of the eye/view point vector and returns the projection ray for further computations.
Parameters: Return type:
-
Depth
()¶ - Returns the Distance between the Eye and View Point.
Return type: Quantity_Length
-
DepthFitAll
()¶ - Adjusts the viewing volume so as not to clip the displayed objects by front and back and back clipping planes. Also sets depth value automatically depending on the calculated Z size and Aspect parameter. NOTE than the original XY size of the view is NOT modified .
Parameters: - Aspect (Quantity_Coefficient) – default value is 0.01
- Margin (Quantity_Coefficient) – default value is 0.01
Return type:
-
DoMapping
()¶ - Must be called when the window supporting the view is mapped or unmapped.
Return type: None
-
Dump
()¶ - dump the full contents of the view at the same scale in the file <theFile>. The file name extension must be one of ‘.png’,’.bmp’,’.jpg’,’.gif’. Returns False when the dump has failed
Parameters: - theFile (char *) –
- theBufferType (Graphic3d_BufferType &) – default value is Graphic3d_BT_RGB
Return type:
-
EnableDepthTest
()¶ - turns on/off opengl depth testing
Parameters: enable (bool) – default value is Standard_True Return type: None
-
EnableGLLight
()¶ - turns on/off opengl lighting, currently used in triedron displaying
Parameters: enable (bool) – default value is Standard_True Return type: None
-
Eye
()¶ - Returns the position of the eye.
Parameters: - X (V3d_Coordinate &) –
- Y (V3d_Coordinate &) –
- Z (V3d_Coordinate &) –
Return type:
-
FitAll
()¶ - Adjust view parameters to fit the displayed scene, respecting height / width ratio. The Z clipping range (depth range) is fitted if AutoZFit flag is True. Throws program error exception if margin coefficient is < 0 or >= 1. Updates the view. @param theMargin [in] the margin coefficient for view borders. @param theToUpdate [in] flag to perform view update.
Parameters: - theMargin (Quantity_Coefficient) – default value is 0.01
- theToUpdate (bool) – default value is Standard_True
Return type: - Adjust view parameters to fit the displayed scene, respecting height / width ratio according to the custom bounding box given. Throws program error exception if margin coefficient is < 0 or >= 1. Updates the view. @param theBox [in] the custom bounding box to fit. @param theMargin [in] the margin coefficient for view borders. @param theToUpdate [in] flag to perform view update.
Parameters: - theBox (Bnd_Box &) –
- theMargin (Quantity_Coefficient) – default value is 0.01
- theToUpdate (bool) – default value is Standard_True
Return type: - Centers the defined projection window so that it occupies the maximum space while respecting the initial height/width ratio. NOTE than the original Z size of the view is NOT modified .
Parameters: Return type:
-
FocalReferencePoint
()¶ - Returns the position of point which emanating the projections.
Parameters: - X (V3d_Coordinate &) –
- Y (V3d_Coordinate &) –
- Z (V3d_Coordinate &) –
Return type:
-
Focale
()¶ - Returns the View Plane Distance for Perspective Views
Return type: Quantity_Length
-
GetClipPlanes
()¶ - Get clip planes. returns sequence clip planes that have been set for the view
Return type: Graphic3d_SequenceOfHClipPlane
-
GetGraduatedTrihedron
()¶ - Returns data of a graduated trihedron.
Return type: Graphic3d_GraduatedTrihedron
-
GetHandle
()¶
-
GradientBackground
()¶ - Returns the gradient background of the view.
Return type: Aspect_GradientBackground
-
GradientBackgroundColors
()¶ - Returns the gradient background colour objects of the view.
Parameters: - Color1 (Quantity_Color &) –
- Color2 (Quantity_Color &) –
Return type:
-
GraduatedTrihedronDisplay
()¶ - Displays a graduated trihedron.
Parameters: theTrigedronData (Graphic3d_GraduatedTrihedron &) – Return type: None
-
IsActiveLight
()¶ - Returns True when the light is active in this view.
Parameters: aLight (Handle_V3d_Light &) – Return type: bool
-
IsEmpty
()¶ - Returns the status of the view regarding the displayed structures inside Returns True is The View is empty
Return type: bool
-
IsGLLightEnabled
()¶ - returns the current state of the gl lighting currently used in triedron displaying
Return type: bool
-
Move
()¶ - Movement of the eye parallel to the coordinate system of reference of the screen a distance relative to the initial position expressed by Start = Standard_True.
Parameters: - Dx (Quantity_Length) –
- Dy (Quantity_Length) –
- Dz (Quantity_Length) –
- Start (bool) – default value is Standard_True
Return type: - Movement of the eye parallel to one of the axes of the coordinate system of reference of the view a distance relative to the initial position expressed by Start = Standard_True.
Parameters: - Axe (V3d_TypeOfAxe) –
- Length (Quantity_Length) –
- Start (bool) – default value is Standard_True
Return type: - Movement of the eye parllel to the current axis a distance relative to the initial position expressed by Start = Standard_True
Parameters: - Length (Quantity_Length) –
- Start (bool) – default value is Standard_True
Return type:
-
MustBeResized
()¶ - Must be called when the window supporting the view changes size. if the view is not mapped on a window. Warning: The view is centered and resized to preserve the height/width ratio of the window.
Return type: None
-
NextActiveLights
()¶ - Go to the next active Light (if there is not, ActiveLight will raise an exception)
Return type: None
-
Pan
()¶ - Translates the center of the view along ‘x’ and ‘y’ axes of view projection. Can be used to perform interactive panning operation. In that case the DXp, DXp parameters specify panning relative to the point where the operation is started. @param theDXp [in] the relative panning on ‘x’ axis of view projection, in pixels. @param theDYp [in] the relative panning on ‘y’ axis of view projection, in pixels. @param theZoomFactor [in] the zooming factor. @param theToStart [in] pass True when starting panning to remember view state prior to panning for relative arguments. Passing 0 for relative panning parameter should return view panning to initial state. Performs update of view.
Parameters: Return type:
-
Panning
()¶ - Translates the center of the view along ‘x’ and ‘y’ axes of view projection. Can be used to perform interactive panning operation. In that case the DXv, DXy parameters specify panning relative to the point where the operation is started. @param theDXv [in] the relative panning on ‘x’ axis of view projection, in view space coordinates. @param theDYv [in] the relative panning on ‘y’ axis of view projection, in view space coordinates. @param theZoomFactor [in] the zooming factor. @param theToStart [in] pass True when starting panning to remember view state prior to panning for relative arguments. If panning is started, passing {0, 0} for {theDXv, theDYv} will return view to initial state. Performs update of view.
Parameters: Return type:
-
Place
()¶ - places the point of the view corresponding at the pixel position x,y at the center of the window and updates the view.
Parameters: Return type:
-
Proj
()¶ - Returns the projection vector.
Parameters: - Vx (Quantity_Parameter &) –
- Vy (Quantity_Parameter &) –
- Vz (Quantity_Parameter &) –
Return type:
-
ProjReferenceAxe
()¶ - Returns the coordinate of the point (Xpix,Ypix) in the view (XP,YP,ZP), and the projection vector of the view passing by the point (for PerspectiveView).
Parameters: Return type:
-
Project
()¶ - Converts the point defined in the user space of the view to the projected view plane point at z 0.
Parameters: - X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
- Xp (V3d_Coordinate &) –
- Yp (V3d_Coordinate &) –
Return type:
-
Redraw
()¶ - Redisplays the view even if there has not been any modification. Must be called if the view is shown. (Ex: DeIconification ) .
Return type: None - Redisplays the view area after esxposure. [x,y] define the min xy area position [width,height] the size of the area in pixel unit.
Parameters: Return type:
-
RemoveClipPlane
()¶ - Removes clip plane from the view. @param thePlane [in] the clip plane to be removed from view.
Parameters: thePlane (Handle_Graphic3d_ClipPlane &) – Return type: void
-
RenderingParams
()¶ - Returns current rendering parameters and effect settings.
Return type: Graphic3d_RenderingParams
-
Reset
()¶ - Resets the centering and the orientation of the view Updates the view
Parameters: update (bool) – default value is Standard_True Return type: None
-
Rotate
()¶ - Rotates the eye about the coordinate system of reference of the screen for which the origin is the view point of the projection, with a relative angular value in RADIANS with respect to the initial position expressed by Start = Standard_True Warning! raises BadValue from V3d If the eye, the view point, or the high point are aligned or confused.
Parameters: - Ax (Quantity_PlaneAngle) –
- Ay (Quantity_PlaneAngle) –
- Az (Quantity_PlaneAngle) –
- Start (bool) – default value is Standard_True
Return type: - Rotates the eye about the coordinate system of reference of the screen for which the origin is Gravity point {X,Y,Z}, with a relative angular value in RADIANS with respect to the initial position expressed by Start = Standard_True If the eye, the view point, or the high point are aligned or confused.
Parameters: - Ax (Quantity_PlaneAngle) –
- Ay (Quantity_PlaneAngle) –
- Az (Quantity_PlaneAngle) –
- X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
- Start (bool) – default value is Standard_True
Return type: - Rotates the eye about one of the coordinate axes of of the view for which the origin is the Gravity point{X,Y,Z} with an relative angular value in RADIANS with respect to the initial position expressed by Start = Standard_True
Parameters: - Axe (V3d_TypeOfAxe) –
- Angle (Quantity_PlaneAngle) –
- X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
- Start (bool) – default value is Standard_True
Return type: - Rotates the eye about one of the coordinate axes of of the view for which the origin is the view point of the projection with an relative angular value in RADIANS with respect to the initial position expressed by Start = Standard_True
Parameters: - Axe (V3d_TypeOfAxe) –
- Angle (Quantity_PlaneAngle) –
- Start (bool) – default value is Standard_True
Return type: - Rotates the eye around the current axis a relative angular value in RADIANS with respect to the initial position expressed by Start = Standard_True
Parameters: - Angle (Quantity_PlaneAngle) –
- Start (bool) – default value is Standard_True
Return type:
-
Rotation
()¶ - Continues the rotation of the view with an angle computed from the last and new mouse position <X,Y>.
Parameters: Return type:
-
Scale
()¶ - Returns the current value of the zoom expressed with respect to SetViewMappingDefault().
Return type: Quantity_Factor
-
SetAt
()¶ - Defines the position of the view point.
Parameters: - X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
Return type:
-
SetAxialScale
()¶ - Sets anisotropic (axial) scale factors <Sx>, <Sy>, <Sz> for view <self>. Anisotropic scaling operation is performed through multiplying the current view orientation matrix by a scaling matrix: || Sx 0 0 0 || || 0 Sy 0 0 || || 0 0 Sz 0 || || 0 0 0 1 || Updates the view.
Parameters: Return type:
-
SetAxis
()¶ - Definition of an axis from its origin and its orientation . This will be the current axis for rotations and movements. Warning! raises BadValue from V3d if the vector normal is NULL. .
Parameters: - X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
- Vx (Quantity_Parameter) –
- Vy (Quantity_Parameter) –
- Vz (Quantity_Parameter) –
Return type:
-
SetBackFacingModel
()¶ - Manages display of the back faces When <aModel> is TOBM_AUTOMATIC the object backfaces are displayed only for surface objects and never displayed for solid objects. this was the previous mode. <aModel> is TOBM_ALWAYS_DISPLAYED the object backfaces are always displayed both for surfaces or solids. <aModel> is TOBM_NEVER_DISPLAYED the object backfaces are never displayed.
Parameters: aModel (V3d_TypeOfBackfacingModel) – default value is V3d_TOBM_AUTOMATIC Return type: None
-
SetBackgroundColor
()¶ - Defines the background colour of the view by supplying : the colour definition type, and the three corresponding values.
Parameters: - Type (Quantity_TypeOfColor) –
- V1 (Quantity_Parameter) –
- V2 (Quantity_Parameter) –
- V3 (Quantity_Parameter) –
Return type: - Defines the background colour of the view by supplying : the colour object.
Parameters: Color (Quantity_Color &) – Return type: None - Defines the background colour of the view by supplying : the colour name in the form Quantity_NOC_xxxx .
Parameters: Name (Quantity_NameOfColor) – Return type: None
-
SetBackgroundImage
()¶ - Defines the background texture of the view by supplying : texture image file name, and fill method (centered by default)
Parameters: - FileName (char *) –
- FillStyle (Aspect_FillMethod) – default value is Aspect_FM_CENTERED
- update (bool) – default value is Standard_False
Return type:
-
SetBgGradientColors
()¶ - Defines the gradient background colours of the view by supplying : two colour objects, and fill method (horizontal by default)
Parameters: - Color1 (Quantity_Color &) –
- Color2 (Quantity_Color &) –
- FillStyle (Aspect_GradientFillMethod) – default value is Aspect_GFM_HOR
- update (bool) – default value is Standard_False
Return type: - Defines the gradient background colours of the view by supplying : two colour names in the form Quantity_NOC_xxxx, and fill method (horizontal by default)
Parameters: - Color1 (Quantity_NameOfColor) –
- Color2 (Quantity_NameOfColor) –
- FillStyle (Aspect_GradientFillMethod) – default value is Aspect_GFM_HOR
- update (bool) – default value is Standard_False
Return type:
-
SetBgGradientStyle
()¶ - Defines the gradient background fill method of the view
Parameters: - AMethod (Aspect_GradientFillMethod) – default value is Aspect_GFM_HOR
- update (bool) – default value is Standard_False
Return type:
-
SetBgImageStyle
()¶ - Defines the textured background fill method of the view
Parameters: - FillStyle (Aspect_FillMethod) –
- update (bool) – default value is Standard_False
Return type:
-
SetCamera
()¶ - Change camera used by view.
Parameters: theCamera (Handle_Graphic3d_Camera &) – Return type: None
-
SetCenter
()¶ - Relocates center of screen to the point, determined by {Xp, Yp} pixel coordinates relative to the bottom-left corner of screen. To calculate pixel coordinates for any point from world coordinate space, it can be projected using ‘Project’. @param theXp [in] the x coordinate. @param theYp [in] the y coordinate.
Parameters: Return type:
-
SetClipPlanes
()¶ - Sets sequence of clip planes to the view. The planes that have been set before are removed from the view. The composition of clip planes truncates the rendering space to convex volume. Number of supported clip planes can be consulted by PlaneLimit method of associated Visual3d_View. Please be aware that the planes which exceed the limit are ignored during rendering. @param thePlanes [in] the clip planes to set.
Parameters: thePlanes (Graphic3d_SequenceOfHClipPlane &) – Return type: None
-
SetComputedMode
()¶ - Switches computed HLR mode in the view
Parameters: aMode (bool) – Return type: None
-
SetDepth
()¶ - Defines the Depth of the eye from the view point without update the projection .
Parameters: Depth (Quantity_Length) – Return type: None
-
SetEye
()¶ - Defines the position of the eye..
Parameters: - X (V3d_Coordinate) –
- Y (V3d_Coordinate) –
- Z (V3d_Coordinate) –
Return type:
-
SetFocale
()¶ - Change View Plane Distance for Perspective Views Warning! raises TypeMismatch from Standard if the view is not a perspective view.
Parameters: Focale (Quantity_Length) – Return type: None
-
SetFront
()¶ - modify the Projection of the view perpendicularly to the privileged plane of the viewer.
Return type: None
-
SetFrustumCulling
()¶ - Turn on/off automatic culling of objects outside frustrum (ON by default)
Parameters: theMode (bool) – Return type: None
-
SetGrid
()¶ - Defines or Updates the definition of the grid in <self>
Parameters: - aPlane (gp_Ax3) –
- aGrid (Handle_Aspect_Grid &) –
Return type:
-
SetGridActivity
()¶ - Defines or Updates the activity of the grid in <self>
Parameters: aFlag (bool) – Return type: None
-
SetGridGraphicValues
()¶ - Defines or Updates the graphic definition of the grid in <self>
Parameters: aGrid (Handle_Aspect_Grid &) – Return type: None
-
SetImmediateUpdate
()¶ - sets the immediate update mode and returns the previous one.
Parameters: theImmediateUpdate (bool) – Return type: bool
-
SetLightOff
()¶ - Desactivate MyLight in this view.
Parameters: MyLight (Handle_V3d_Light &) – Return type: None - Deactivate all the Lights defined in this view.
Return type: None
-
SetLightOn
()¶ - Activates MyLight in the view.
Parameters: MyLight (Handle_V3d_Light &) – Return type: None - Activates all the lights defined in this view.
Return type: None
-
SetMagnify
()¶ Parameters: Return type:
-
SetProj
()¶ - Defines the orientation of the projection.
Parameters: - Vx (Quantity_Parameter) –
- Vy (Quantity_Parameter) –
- Vz (Quantity_Parameter) –
Return type: - Defines the orientation of the projection .
Parameters: Orientation (V3d_TypeOfOrientation) – Return type: None
-
SetScale
()¶ - Zooms the view by a factor relative to the value initialised by SetViewMappingDefault(). Updates the view.
Parameters: Coef (Quantity_Factor) – Return type: None
-
SetShadingModel
()¶ - Defines the shading model for the visualisation ZBUFFER mode. Various models are available.
Parameters: Model (V3d_TypeOfShadingModel) – Return type: None
-
SetSize
()¶ - Defines the view projection size in its maximum dimension, keeping the inital height/width ratio unchanged.
Parameters: theSize (Quantity_Length) – Return type: None
-
SetSurfaceDetail
()¶ - select the kind of rendering for texture mapping no texture mapping by default
Parameters: SurfaceDetail (V3d_TypeOfSurfaceDetail) – Return type: None
-
SetTextureEnv
()¶ - set the environment texture to use no environment texture by default
Parameters: ATexture (Handle_Graphic3d_TextureEnv &) – Return type: None
-
SetTwist
()¶ - Defines the angular position of the high point of the reference frame of the view with respect to the Y screen axis with an absolute angular value in RADIANS.
Parameters: Angle (Quantity_PlaneAngle) – Return type: None
-
SetUp
()¶ - Defines the orientation of the high point.
Parameters: - Vx (Quantity_Parameter) –
- Vy (Quantity_Parameter) –
- Vz (Quantity_Parameter) –
Return type: - Defines the orientation(SO) of the high point.
Parameters: Orientation (V3d_TypeOfOrientation) – Return type: None
-
SetViewMappingDefault
()¶ - Saves the current view mapping. This will be the state returned from ResetViewmapping.
Return type: None
-
SetViewOrientationDefault
()¶ - Saves the current state of the orientation of the view which will be the return state at ResetViewOrientation.
Return type: None
-
SetVisualization
()¶ - Defines the visualisation mode in the view.
Parameters: Mode (V3d_TypeOfVisualization) – Return type: None
-
SetWindow
()¶ - Activates the view in the window specified and Map the Window to the screen. Warning! raises MultiplyDefined from Standard if the view is already activated in a window. Warning: The view is centered and resized to preserve the height/width ratio of the window.
Parameters: IdWin (Handle_Aspect_Window &) – Return type: None - Activates the view in the specified Window If <aContext> is not NULL the graphic context is used to draw something in this view. Otherwise an internal graphic context is created. If <aDisplayCB> is not NULL then a user display CB is call at the end of the OCC graphic traversal and just before the swap of buffers. The <aClientData> is pass to this call back. Warning! raises MultiplyDefined from Standard if the view is already activated in a window. Warning: The view is centered and resized to preserve the height/width ratio of the window.
Parameters: - aWindow (Handle_Aspect_Window &) –
- aContext (Aspect_RenderingContext) –
- aDisplayCB (Aspect_GraphicCallbackProc &) –
- aClientData (Standard_Address) –
Return type:
-
SetZClippingDepth
()¶ - Defines the depth of the medium clipping plane.
Parameters: Depth (Quantity_Length) – Return type: None
-
SetZClippingType
()¶ - Defines the type of ZClipping.
Parameters: Type (V3d_TypeOfZclipping) – Return type: None
-
SetZClippingWidth
()¶ - Defines the thicknes around the medium clippling plane. .
Parameters: Width (Quantity_Length) – Return type: None
-
SetZCueingDepth
()¶ - Defines the depth of the medium plane.
Parameters: Depth (Quantity_Length) – Return type: None
-
SetZCueingWidth
()¶ - Defines the thickness around the medium plane.
Parameters: Width (Quantity_Length) – Return type: None
-
SetZSize
()¶ - Defines the Depth size of the view Front Plane will be set to Size/2. Back Plane will be set to -Size/2. Any Object located Above the Front Plane or behind the Back Plane will be Clipped . NOTE than the XY Size of the View is NOT modified .
Parameters: Size (Quantity_Length) – Return type: None
-
SetZoom
()¶ - Zooms the view by a factor relative to the initial value expressed by Start = Standard_True Updates the view.
Parameters: - Coef (Quantity_Factor) –
- Start (bool) – default value is Standard_True
Return type:
-
ShadingModel
()¶ - Returns the current shading model.
Return type: V3d_TypeOfShadingModel
-
Size
()¶ - Returns the height and width of the view.
Parameters: - Width (Quantity_Length &) –
- Height (Quantity_Length &) –
Return type:
-
StartRotation
()¶ - Begin the rotation of the view around the screen axis according to the mouse position <X,Y>. Warning: Enable rotation around the Z screen axis when <zRotationThreshold> factor is > 0 soon the distance from the start point and the center of the view is > (medium viewSize * <zRotationThreshold> ). Generally a value of 0.4 is usable to rotate around XY screen axis inside the circular threshold area and to rotate around Z screen axis outside this area.
Parameters: Return type:
-
StartZoomAtPoint
()¶ - Defines starting point for ZoomAtPoint view operation. @param theXp [in] the x mouse coordinate, in pixels. @param theYp [in] the y mouse coordinate, in pixels.
Parameters: Return type:
-
SurfaceDetail
()¶ Return type: V3d_TypeOfSurfaceDetail
-
TextureEnv
()¶ Return type: Handle_Graphic3d_TextureEnv
-
ToPixMap
()¶ - Dumps the full contents of the view to a pixmap of pixel size <theWidth> * <theHeight> and buffer type <theBufferType>. If <theToKeepAspect> is true the aspect ratio of view will be kept if <theWidth> and <theHeight> define another ratio. Pixmap will be automatically (re)allocated when needed. When dumping stereographic camera - the corresponding middle-point monographic projection will be used for dumping by default. <theStereoOptions> flags are to be used for dumping then left or right eye projections.
Parameters: Return type:
-
Translate
()¶ - Movement of the ye and the view point parallel to the frame of reference of the screen a distance relative to the initial position expressed by Start = Standard_True
Parameters: - Dx (Quantity_Length) –
- Dy (Quantity_Length) –
- Dz (Quantity_Length) –
- Start (bool) – default value is Standard_True
Return type: - Movement of the eye and the view point parallel to one of the axes of the fame of reference of the view a distance relative to the initial position expressed by Start = Standard_True
Parameters: - Axe (V3d_TypeOfAxe) –
- Length (Quantity_Length) –
- Start (bool) – default value is Standard_True
Return type: - Movement of the eye and view point parallel to the current axis a distance relative to the initial position expressed by Start = Standard_True
Parameters: - Length (Quantity_Length) –
- Start (bool) – default value is Standard_True
Return type:
-
TriedronDisplay
()¶ - Display of the Triedron. Initialize position, color and length of Triedron axes. The scale is a percent of the window width.
Parameters: - APosition (Aspect_TypeOfTriedronPosition) – default value is Aspect_TOTP_CENTER
- AColor (Quantity_NameOfColor) – default value is Quantity_NOC_WHITE
- AScale (float) – default value is 0.02
- AMode (V3d_TypeOfVisualization) – default value is V3d_WIREFRAME
Return type:
-
TriedronEcho
()¶ - Highlights the echo zone of the Triedron.
Parameters: AType (Aspect_TypeOfTriedronEcho) – default value is Aspect_TOTE_NONE Return type: None
-
Turn
()¶ - Rotation of the view point around the frame of reference of the screen for which the origin is the eye of the projection with a relative angular value in RADIANS with respect to the initial position expressed by Start = Standard_True
Parameters: - Ax (Quantity_PlaneAngle) –
- Ay (Quantity_PlaneAngle) –
- Az (Quantity_PlaneAngle) –
- Start (bool) – default value is Standard_True
Return type: - Rotation of the view point around one of the axes of the frame of reference of the view for which the origin is the eye of the projection with an angular value in RADIANS relative to the initial position expressed by Start = Standard_True
Parameters: - Axe (V3d_TypeOfAxe) –
- Angle (Quantity_PlaneAngle) –
- Start (bool) – default value is Standard_True
Return type: - Rotation of the view point around the current axis an angular value in RADIANS relative to the initial position expressed by Start = Standard_True
Parameters: - Angle (Quantity_PlaneAngle) –
- Start (bool) – default value is Standard_True
Return type:
-
Twist
()¶ - Returns in RADIANS the orientation of the view around the visual axis measured from the Y axis of the screen.
Return type: Quantity_PlaneAngle
-
Type
()¶ - Returns the Type of the View
Return type: V3d_TypeOfView
-
Up
()¶ - Returns the vector giving the position of the high point.
Parameters: - Vx (Quantity_Parameter &) –
- Vy (Quantity_Parameter &) –
- Vz (Quantity_Parameter &) –
Return type:
-
View
()¶ - Returns the associated Visual3d view.
Return type: Handle_Visual3d_View
-
Viewer
()¶ - Returns the viewer in which the view has been created.
Return type: Handle_V3d_Viewer
-
Visualization
()¶ - Returns the current visualisation mode.
Return type: V3d_TypeOfVisualization
-
Window
()¶ - Returns the Aspect Window associated with the view.
Return type: Handle_Aspect_Window
-
WindowFit
()¶ - Centers the defined PIXEL window so that it occupies the maximum space while respecting the initial height/width ratio. NOTE than the original Z size of the view is NOT modified. @param theMinXp [in] pixel coordinates of minimal corner on x screen axis. @param theMinYp [in] pixel coordinates of minimal corner on y screen axis. @param theMaxXp [in] pixel coordinates of maximal corner on x screen axis. @param theMaxYp [in] pixel coordinates of maximal corner on y screen axis.
Parameters: Return type:
-
WindowFitAll
()¶ - idem than WindowFit
Parameters: Return type:
-
ZBufferTriedronSetup
()¶ - Customization of the ZBUFFER Triedron. XColor,YColor,ZColor - colors of axis SizeRatio - ratio of decreasing of the trihedron size when its phisical position comes out of the view AxisDiametr - diameter relatively to axis length NbFacettes - number of facettes of cylinders and cones
Parameters: - XColor (Quantity_NameOfColor) – default value is Quantity_NOC_RED
- YColor (Quantity_NameOfColor) – default value is Quantity_NOC_GREEN
- ZColor (Quantity_NameOfColor) – default value is Quantity_NOC_BLUE1
- SizeRatio (float) – default value is 0.8
- AxisDiametr (float) – default value is 0.05
- NbFacettes (int) – default value is 12
Return type:
-
ZClipping
()¶ - Returns current information on the ZClipping. <Depth> : Depth of plane. <Width> : Thickness around the plane. <TypeOfZclipping> : ‘BACK’ ‘FRONT’ ‘SLICE’ ‘OFF’
Parameters: - Depth (Quantity_Length &) –
- Width (Quantity_Length &) –
Return type: V3d_TypeOfZclipping
-
ZCueing
()¶ - Returns activity and information on the Zcueing. <Depth> : Depth of plane. <Width> : Thickness around the plane.
Parameters: - Depth (Quantity_Length &) –
- Width (Quantity_Length &) –
Return type:
-
ZFitAll
()¶ - Change Z-min and Z-max planes of projection volume to match the displayed objects.
Parameters: theScaleFactor (float) – default value is 1.0 Return type: None
-
Zoom
()¶ - Zoom the view according to a zoom factor computed from the distance between the 2 mouse position. @param theXp1 [in] the x coordinate of first mouse position, in pixels. @param theYp1 [in] the y coordinate of first mouse position, in pixels. @param theXp2 [in] the x coordinate of second mouse position, in pixels. @param theYp2 [in] the y coordinate of second mouse position, in pixels.
Parameters: Return type:
-
ZoomAtPoint
()¶ - Zooms the model at a pixel defined by the method StartZoomAtPoint().
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
V3d_Viewer
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Create a Viewer with the given graphic driver and the given parameters or with their default values. Currently creating of more than 100 viewer instances is not supported and leads to an exception. This limitation might be addressed in some future OCCT releases. If the size of the view is <= 0 Warning: Client must creates a graphic driver
Parameters: - theDriver (Handle_Graphic3d_GraphicDriver &) –
- theName (Standard_ExtString) –
- theDomain (char *) – default value is
- theViewSize (Quantity_Length) – default value is 1000.0
- theViewProj (V3d_TypeOfOrientation) – default value is V3d_XposYnegZpos
- theViewBackground (Quantity_NameOfColor) – default value is Quantity_NOC_GRAY30
- theVisualization (V3d_TypeOfVisualization) – default value is V3d_ZBUFFER
- theShadingModel (V3d_TypeOfShadingModel) – default value is V3d_GOURAUD
- theUpdateMode (V3d_TypeOfUpdate) – default value is V3d_WAIT
- theComputedMode (bool) – default value is Standard_True
- theDefaultComputedMode (bool) – default value is Standard_True
- theSurfaceDetail (V3d_TypeOfSurfaceDetail) – default value is V3d_TEX_NONE
Return type: -
ActivateGrid
()¶ - Activates the grid in all views of <self>.
Parameters: - aGridType (Aspect_GridType) –
- aGridDrawMode (Aspect_GridDrawMode) –
Return type:
-
ActiveLight
()¶ Return type: Handle_V3d_Light
-
ActiveView
()¶ Return type: Handle_V3d_View
-
AddZLayer
()¶ - Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value. The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view. The method returns Standard_False if the layer can not be created. The layer mechanism allows to display structures in higher layers in overlay of structures in lower layers.
Parameters: theLayerId (int &) – Return type: bool
-
CircularGridGraphicValues
()¶ - Returns the location and the size of the grid.
Parameters: - Radius (Quantity_Length &) –
- OffSet (Quantity_Length &) –
Return type:
-
CircularGridValues
()¶ - Returns the definition of the circular grid.
Parameters: - XOrigin (Quantity_Length &) –
- YOrigin (Quantity_Length &) –
- RadiusStep (Quantity_Length &) –
- DivisionNumber (int &) –
- RotationAngle (Quantity_PlaneAngle &) –
Return type:
-
CreateView
()¶ - creates a view in the viewer according to its default parameters.
Return type: Handle_V3d_View
-
CurrentSelectedLight
()¶ - Returns the Selected Light.
Return type: Handle_V3d_Light
-
DefaultAngle
()¶ Return type: Quantity_PlaneAngle
-
DefaultBackgroundColor
()¶ - Returns the default background colour depending of the type.
Parameters: - Type (Quantity_TypeOfColor) –
- V1 (Quantity_Parameter &) –
- V2 (Quantity_Parameter &) –
- V3 (Quantity_Parameter &) –
Return type: - Returns the default background colour object.
Return type: Quantity_Color
-
DefaultBgGradientColors
()¶ - Returns the gradient background colour objects of the view.
Parameters: - Color1 (Quantity_Color &) –
- Color2 (Quantity_Color &) –
Return type:
-
DefaultShadingModel
()¶ - Returns the default type of Shading
Return type: V3d_TypeOfShadingModel
-
DefaultSurfaceDetail
()¶ - Returns the default type of texture mapping
Return type: V3d_TypeOfSurfaceDetail
-
DefaultViewProj
()¶ - Returns the default Projection.
Return type: V3d_TypeOfOrientation
-
DefaultViewSize
()¶ - Returns the default size of the view.
Return type: Quantity_Length
-
DefaultVisualization
()¶ - Returns the default type of Visualization.
Return type: V3d_TypeOfVisualization
-
DefinedLight
()¶ Return type: Handle_V3d_Light
-
DefinedView
()¶ Return type: Handle_V3d_View
-
DelLight
()¶ - Delete Light in Sequence Of Lights.
Parameters: MyLight (Handle_V3d_Light &) – Return type: None
-
DisplayPrivilegedPlane
()¶ Parameters: - OnOff (bool) –
- aSize (Quantity_Length) – default value is 1
Return type:
-
Domain
()¶ Return type: char *
-
Driver
()¶ Return type: Handle_Graphic3d_GraphicDriver
-
GetAllZLayers
()¶ - Return all Z layer ids in sequence ordered by overlay level from lowest layer to highest ( foreground ). The first layer ID in sequence is the default layer that can’t be removed.
Parameters: theLayerSeq (TColStd_SequenceOfInteger &) – Return type: None
-
GetGradientBackground
()¶ - Returns the gradient background of the view.
Return type: Aspect_GradientBackground
-
GetHandle
()¶
-
Grid
()¶ - Returns the defined grid in <self>.
Return type: Handle_Aspect_Grid
-
GridDrawMode
()¶ - Returns the current grid draw mode defined in <self>.
Return type: Aspect_GridDrawMode
-
GridType
()¶ - Returns the current grid type defined in <self>.
Return type: Aspect_GridType
-
HideGridEcho
()¶ - Temporarly hide grid echo.
Parameters: theView (Handle_V3d_View &) – Return type: None
-
NextActiveLights
()¶ - Go to the next active Light (if there is not, ActiveLight will raise an exception)
Return type: None
-
NextActiveViews
()¶ - Go to the next active view (if there is not, ActiveView will raise an exception)
Return type: None
-
NextDefinedLights
()¶ - Go to the next Defined Light (if there is not, DefinedLight will raise an exception)
Return type: None
-
NextDefinedViews
()¶ - Go to the next Defined view (if there is not, DefinedView will raise an exception)
Return type: None
-
NextName
()¶ Return type: Standard_ExtString
-
RectangularGridGraphicValues
()¶ - Returns the location and the size of the grid.
Parameters: - XSize (Quantity_Length &) –
- YSize (Quantity_Length &) –
- OffSet (Quantity_Length &) –
Return type:
-
RectangularGridValues
()¶ - Returns the definition of the rectangular grid.
Parameters: - XOrigin (Quantity_Length &) –
- YOrigin (Quantity_Length &) –
- XStep (Quantity_Length &) –
- YStep (Quantity_Length &) –
- RotationAngle (Quantity_PlaneAngle &) –
Return type:
-
Redraw
()¶ - Redraws all the views of the Viewer even if no modification has taken place. Must be called if all the views of the Viewer are exposed, as for example in a global DeIconification.
Return type: None
-
RemoveZLayer
()¶ - Remove Z layer with ID <theLayerId>. Method returns Standard_False if the layer can not be removed or doesn’t exists. By default, there are always default bottom-level layer that can’t be removed.
Parameters: theLayerId (int) – Return type: bool
-
SetCircularGridGraphicValues
()¶ - Sets the location and the size of the grid. <XSize> defines the width of the grid. <YSize> defines the height of the grid. <OffSet> defines the displacement along the plane normal.
Parameters: - Radius (Quantity_Length) –
- OffSet (Quantity_Length) –
Return type:
-
SetCircularGridValues
()¶ - Sets the definition of the circular grid. <XOrigin>, <YOrigin> defines the origin of the grid. <RadiusStep> defines the interval between 2 circles. <DivisionNumber> defines the section number of one half circle. <RotationAngle> defines the rotation angle of the grid.
Parameters: - XOrigin (Quantity_Length) –
- YOrigin (Quantity_Length) –
- RadiusStep (Quantity_Length) –
- DivisionNumber (int) –
- RotationAngle (Quantity_PlaneAngle) –
Return type:
-
SetCurrentSelectedLight
()¶ - Defines the selected light.
Parameters: TheLight (Handle_V3d_Light &) – Return type: None
-
SetDefaultBackgroundColor
()¶ - Defines the default base colour of views attached to the Viewer by supplying the type of colour definition and the three component values..
Parameters: - Type (Quantity_TypeOfColor) –
- V1 (Quantity_Parameter) –
- V2 (Quantity_Parameter) –
- V3 (Quantity_Parameter) –
Return type: - Defines the default background colour of views attached to the viewer by supplying the name of the colour under the form Quantity_NOC_xxxx .
Parameters: Name (Quantity_NameOfColor) – Return type: None - Defines the default background colour of views attached to the viewer by supplying the color object
Parameters: Color (Quantity_Color &) – Return type: None
-
SetDefaultBgGradientColors
()¶ - Defines the default gradient background colours of view attached to the viewer by supplying the name of the colours under the form Quantity_NOC_xxxx .
Parameters: - Name1 (Quantity_NameOfColor) –
- Name2 (Quantity_NameOfColor) –
- FillStyle (Aspect_GradientFillMethod) – default value is Aspect_GFM_HOR
Return type: - Defines the default gradient background colours of views attached to the viewer by supplying the colour objects
Parameters: - Color1 (Quantity_Color &) –
- Color2 (Quantity_Color &) –
- FillStyle (Aspect_GradientFillMethod) – default value is Aspect_GFM_HOR
Return type:
-
SetDefaultLights
()¶ - defines default lights - positional-light 0.3 0. 0. directional-light V3d_XnegYposZpos directional-light V3d_XnegYneg ambient-light
Return type: None
-
SetDefaultShadingModel
()¶ - Gives the default type of SHADING.
Parameters: Type (V3d_TypeOfShadingModel) – Return type: None
-
SetDefaultSurfaceDetail
()¶ - Gives the default type of texture mapping.
Parameters: Type (V3d_TypeOfSurfaceDetail) – Return type: None
-
SetDefaultViewProj
()¶ - Gives the default projection for creating views in the viewer.
Parameters: Orientation (V3d_TypeOfOrientation) – Return type: None
-
SetDefaultViewSize
()¶ - Gives a default size for the creation of views of the viewer.
Parameters: Size (Quantity_Length) – Return type: None
-
SetDefaultVisualization
()¶ - Gives the default visualisation mode..
Parameters: Type (V3d_TypeOfVisualization) – Return type: None
-
SetGridEcho
()¶ - Show/Don’t show grid echo to the hit point. If True,the grid echo will be shown at ConvertToGrid() time.
Parameters: showGrid (bool) – default value is Standard_True Return type: None - Show grid echo <aMarker> to the hit point. Warning: When the grid echo marker is not set, a default marker is build with the attributes: marker type : Aspect_TOM_STAR marker color : Quantity_NOC_GRAY90 marker size : 3.0
Parameters: aMarker (Handle_Graphic3d_AspectMarker3d &) – Return type: None
-
SetLightOff
()¶ - Desactivate MyLight in this viewer.
Parameters: MyLight (Handle_V3d_Light &) – Return type: None - Deactivate all the Lights defined in this viewer.
Return type: None
-
SetLightOn
()¶ - Activates MyLight in the viewer.
Parameters: MyLight (Handle_V3d_Light &) – Return type: None - Activates all the lights defined in this viewer.
Return type: None
-
SetRectangularGridGraphicValues
()¶ - Sets the location and the size of the grid. <XSize> defines the width of the grid. <YSize> defines the height of the grid. <OffSet> defines the displacement along the plane normal.
Parameters: - XSize (Quantity_Length) –
- YSize (Quantity_Length) –
- OffSet (Quantity_Length) –
Return type:
-
SetRectangularGridValues
()¶ - Sets the definition of the rectangular grid. <XOrigin>, <YOrigin> defines the origin of the grid. <XStep> defines the interval between 2 vertical lines. <YStep> defines the interval between 2 horizontal lines. <RotationAngle> defines the rotation angle of the grid.
Parameters: - XOrigin (Quantity_Length) –
- YOrigin (Quantity_Length) –
- XStep (Quantity_Length) –
- YStep (Quantity_Length) –
- RotationAngle (Quantity_PlaneAngle) –
Return type:
-
SetUpdateMode
()¶ - Defines the mode of regenerating the views making up the viewer. This can be immediate <ASAP> or deferred <WAIT>. In this latter case, the views are updated when the method Update(me) is called.
Parameters: Mode (V3d_TypeOfUpdate) – Return type: None
-
SetViewOff
()¶ - Deactivates all the views of a Viewer attached to a window.
Return type: None - Deactivates a particular view in the Viewer. Must be call if the Window attached to the view has been Iconified .
Parameters: View (Handle_V3d_View &) – Return type: None
-
SetViewOn
()¶ - Activates all of the views of a viewer attached to a window.
Return type: None - Activates a particular view in the Viewer . Must be call if the Window attached to the view has been Deiconified .
Parameters: View (Handle_V3d_View &) – Return type: None
-
SetZBufferManagment
()¶ - defines the strategy concerning the ZBuffer activity. If Automatic is true, ZBuffer will be activated or deactivated depending on the fact that faces exist or not in the Viewer. This will optimize the response time in the case where only wireframe objects are displayed. If Automatic is False, ZBuffer will be activated or deactivated depending on the choice of SetVisualization in each View. Note that by default, the ZBufferManagment is not automatic.
Parameters: Automatic (bool) – Return type: None
-
SetZLayerSettings
()¶ - Sets the settings for a single Z layer.
Parameters: - theLayerId (int) –
- theSettings (Graphic3d_ZLayerSettings &) –
Return type:
-
ShowGridEcho
()¶ - Display grid echo at requested point in the view.
Parameters: - theView (Handle_V3d_View &) –
- thePoint (Graphic3d_Vertex &) –
Return type:
-
UpdateMode
()¶ - Returns the regeneration mode of views in the viewer.
Return type: V3d_TypeOfUpdate
-
Viewer
()¶ - Returns the viewer associated to Visual3d .
Return type: Handle_Visual3d_ViewManager
-
ZLayerSettings
()¶ - Returns the settings of a single Z layer.
Parameters: theLayerId (int) – Return type: Graphic3d_ZLayerSettings
-
thisown
¶ The membership flag
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases
-
class
v3d
¶ Bases:
object
-
static
ArrowOfRadius
()¶ - Compute the graphic structure of arrow. X0,Y0,Z0 : coordinate of the arrow. DX,DY,DZ : Direction of the arrow. Alpha : Angle of arrow. Lng : Length of arrow.
Parameters: - garrow (Handle_Graphic3d_Group &) –
- X0 (V3d_Coordinate) –
- Y0 (V3d_Coordinate) –
- Z0 (V3d_Coordinate) –
- DX (V3d_Parameter) –
- DY (V3d_Parameter) –
- DZ (V3d_Parameter) –
- Alpha (Quantity_PlaneAngle) –
- Lng (V3d_Parameter) –
Return type: void
-
static
CircleInPlane
()¶ - Compute the graphic structure of circle. X0,Y0,Z0 : Center of circle. VX,VY,VZ : Axis of circle. Radius : Radius of circle.
Parameters: - gcircle (Handle_Graphic3d_Group &) –
- X0 (V3d_Coordinate) –
- Y0 (V3d_Coordinate) –
- Z0 (V3d_Coordinate) –
- VX (V3d_Parameter) –
- VY (V3d_Parameter) –
- VZ (V3d_Parameter) –
- Radius (V3d_Parameter) –
Return type: void
-
static
DrawSphere
()¶ - test.
Parameters: - aViewer (Handle_V3d_Viewer &) –
- aRadius (Quantity_Length) – default value is 1000
Return type: void
-
static
GetProjAxis
()¶ - Determines the orientation vector corresponding to the predefined orientation type.
Parameters: Orientation (V3d_TypeOfOrientation) – Return type: Graphic3d_Vector
-
static
PickGrid
()¶ - test.
Parameters: - aViewer (Handle_V3d_Viewer &) –
- aRadius (Quantity_Length) – default value is 1000
Return type: void
-
static
SetPlane
()¶ - test.
Parameters: - aViewer (Handle_V3d_Viewer &) –
- x1 (Quantity_Length) –
- y1 (Quantity_Length) –
- z1 (Quantity_Length) –
- x2 (Quantity_Length) –
- y2 (Quantity_Length) –
- z2 (Quantity_Length) –
Return type: void
-
static
SwitchViewsinWindow
()¶ Parameters: - aPreviousView (Handle_V3d_View &) –
- aNextView (Handle_V3d_View &) –
Return type: void
-
thisown
¶ The membership flag
-
static
-
v3d_ArrowOfRadius
()¶ - Compute the graphic structure of arrow. X0,Y0,Z0 : coordinate of the arrow. DX,DY,DZ : Direction of the arrow. Alpha : Angle of arrow. Lng : Length of arrow.
Parameters: - garrow (Handle_Graphic3d_Group &) –
- X0 (V3d_Coordinate) –
- Y0 (V3d_Coordinate) –
- Z0 (V3d_Coordinate) –
- DX (V3d_Parameter) –
- DY (V3d_Parameter) –
- DZ (V3d_Parameter) –
- Alpha (Quantity_PlaneAngle) –
- Lng (V3d_Parameter) –
Return type: void
-
v3d_CircleInPlane
()¶ - Compute the graphic structure of circle. X0,Y0,Z0 : Center of circle. VX,VY,VZ : Axis of circle. Radius : Radius of circle.
Parameters: - gcircle (Handle_Graphic3d_Group &) –
- X0 (V3d_Coordinate) –
- Y0 (V3d_Coordinate) –
- Z0 (V3d_Coordinate) –
- VX (V3d_Parameter) –
- VY (V3d_Parameter) –
- VZ (V3d_Parameter) –
- Radius (V3d_Parameter) –
Return type: void
-
v3d_DrawSphere
()¶ - test.
Parameters: - aViewer (Handle_V3d_Viewer &) –
- aRadius (Quantity_Length) – default value is 1000
Return type: void
-
v3d_GetProjAxis
()¶ - Determines the orientation vector corresponding to the predefined orientation type.
Parameters: Orientation (V3d_TypeOfOrientation) – Return type: Graphic3d_Vector
-
v3d_PickGrid
()¶ - test.
Parameters: - aViewer (Handle_V3d_Viewer &) –
- aRadius (Quantity_Length) – default value is 1000
Return type: void
-
v3d_SetPlane
()¶ - test.
Parameters: - aViewer (Handle_V3d_Viewer &) –
- x1 (Quantity_Length) –
- y1 (Quantity_Length) –
- z1 (Quantity_Length) –
- x2 (Quantity_Length) –
- y2 (Quantity_Length) –
- z2 (Quantity_Length) –
Return type: void
-
v3d_SwitchViewsinWindow
()¶ Parameters: - aPreviousView (Handle_V3d_View &) –
- aNextView (Handle_V3d_View &) –
Return type: void