OCC.Core.V3d module¶
V3d module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_v3d.html
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
property
thisown
¶ The membership flag
-
value
()¶
-
-
class
V3d_AmbientLight
(*args)¶ Bases:
OCC.Core.Graphic3d.Graphic3d_CLight
- Constructs an ambient light source in the viewer. The default Color of this light source is WHITE.
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- rtype
None* Constructs an ambient light source in the viewer. The default Color of this light source is WHITE.
- param theViewer
- type theViewer
V3d_Viewer
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- rtype
None
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
V3d_CircularGrid
(*args)¶ Bases:
object
- Parameters
aViewer –
- type aViewer
V3d_ViewerPointer
- param aColor
- type aColor
Quantity_Color
- param aTenthColor
- type aTenthColor
Quantity_Color
- rtype
None
-
static
DownCast
(t)¶
-
GraphicValues
()¶ - Parameters
Radius –
- type Radius
float
- param OffSet
- type OffSet
float
- rtype
None
-
SetColors
()¶ - Parameters
aColor –
- type aColor
Quantity_Color
- param aTenthColor
- type aTenthColor
Quantity_Color
- rtype
None
-
SetGraphicValues
()¶ - Parameters
Radius –
- type Radius
float
- param OffSet
- type OffSet
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
V3d_DirectionalLight
(*args)¶ Bases:
OCC.Core.V3d.V3d_PositionLight
- Creates a directional light source in the viewer.
- param theDirection
default value is V3d_XposYposZpos
- type theDirection
V3d_TypeOfOrientation
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- param theIsHeadlight
default value is Standard_False
- type theIsHeadlight
bool
- rtype
None* Creates a directional light source in the viewer.
- param theDirection
- type theDirection
gp_Dir
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- param theIsHeadlight
default value is Standard_False
- type theIsHeadlight
bool
- rtype
None:param theViewer:
- type theViewer
V3d_Viewer
- param theDirection
default value is V3d_XposYposZpos
- type theDirection
V3d_TypeOfOrientation
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- param theIsHeadlight
default value is Standard_False
- type theIsHeadlight
bool
- rtype
None* Creates a directional light source in the viewer. theXt, theYt, theZt : Coordinate of light source Target. theXp, theYp, theZp : Coordinate of light source Position. The others parameters describe before.
- param theViewer
- type theViewer
V3d_Viewer
- param theXt
- type theXt
float
- param theYt
- type theYt
float
- param theZt
- type theZt
float
- param theXp
- type theXp
float
- param theYp
- type theYp
float
- param theZp
- type theZp
float
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- param theIsHeadlight
default value is Standard_False
- type theIsHeadlight
bool
- rtype
None
-
static
DownCast
(t)¶
-
SetDirection
()¶ - Defines the direction of the light source by a predefined orientation.
- param theDirection
- type theDirection
V3d_TypeOfOrientation
- rtype
None
-
property
thisown
¶ The membership flag
-
class
V3d_ImageDumpOptions
(*args)¶ Bases:
object
- //!< flag to override active view aspect ratio by (Width / Height) defined for image dump (True by default) Default constructor.
- rtype
None
-
property
BufferType
¶
-
property
Height
¶
-
property
StereoOptions
¶
-
property
TileSize
¶
-
property
ToAdjustAspect
¶
-
property
Width
¶
-
property
thisown
¶ The membership flag
-
class
V3d_ListOfLight
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
Clear
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
Last
()¶
-
Prepend
()¶
-
Remove
()¶
-
RemoveFirst
()¶
-
Reverse
()¶
-
Set
()¶
-
Size
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
V3d_ListOfView
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
Clear
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
Last
()¶
-
Prepend
()¶
-
Remove
()¶
-
RemoveFirst
()¶
-
Reverse
()¶
-
Set
()¶
-
Size
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
V3d_Plane
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Creates a clipping plane from plane coefficients.
- param theA
default value is 0.0
- type theA
float
- param theB
default value is 0.0
- type theB
float
- param theC
default value is 1.0
- type theC
float
- param theD
default value is 0.0
- type theD
float
- rtype
None
-
ClipPlane
()¶ - Use this method to pass clipping plane implementation for standard clipping workflow. returns clipping plane implementation handle.
- rtype
opencascade::handle<Graphic3d_ClipPlane>
-
Display
()¶ - Display the plane representation in the choosen view.
- param theView
- type theView
V3d_View
- param theColor
default value is Quantity_NOC_GRAY
- type theColor
Quantity_Color
- rtype
void
-
static
DownCast
(t)¶
-
Erase
()¶ - Erase the plane representation.
- rtype
None
-
IsDisplayed
()¶ - Returns True when the plane representation is displayed.
- rtype
bool
-
Plane
()¶ - Returns the parameters of the plane.
- param theA
- type theA
float
- param theB
- type theB
float
- param theC
- type theC
float
- param theD
- type theD
float
- rtype
None
-
SetPlane
()¶ - Change plane equation.
- param theA
- type theA
float
- param theB
- type theB
float
- param theC
- type theC
float
- param theD
- type theD
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
V3d_PositionLight
(*args, **kwargs)¶ Bases:
OCC.Core.Graphic3d.Graphic3d_CLight
Empty constructor, which should be followed by light source properties configuration.
- Parameters
theType (Graphic3d_TypeOfLightSource) –
- Return type
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
V3d_PositionalLight
(*args)¶ Bases:
OCC.Core.V3d.V3d_PositionLight
- Creates an isolated light source in the viewer with default attenuation factors (1.0, 0.0).
- param thePos
- type thePos
gp_Pnt
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- rtype
None:param theViewer:
- type theViewer
V3d_Viewer
- param theX
- type theX
float
- param theY
- type theY
float
- param theZ
- type theZ
float
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- param theConstAttenuation
default value is 1.0
- type theConstAttenuation
float
- param theLinearAttenuation
default value is 0.0
- type theLinearAttenuation
float
- rtype
None
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
V3d_RectangularGrid
(*args)¶ Bases:
object
- Parameters
aViewer –
- type aViewer
V3d_ViewerPointer
- param aColor
- type aColor
Quantity_Color
- param aTenthColor
- type aTenthColor
Quantity_Color
- rtype
None
-
Display
()¶ - Return type
void
-
static
DownCast
(t)¶
-
Erase
()¶ - Return type
void
-
GraphicValues
()¶ - Parameters
XSize –
- type XSize
float
- param YSize
- type YSize
float
- param OffSet
- type OffSet
float
- rtype
None
-
SetColors
()¶ - Parameters
aColor –
- type aColor
Quantity_Color
- param aTenthColor
- type aTenthColor
Quantity_Color
- rtype
void
-
SetGraphicValues
()¶ - Parameters
XSize –
- type XSize
float
- param YSize
- type YSize
float
- param OffSet
- type OffSet
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
V3d_SpotLight
(*args)¶ Bases:
OCC.Core.V3d.V3d_PositionLight
- Creates a light source of the Spot type in the viewer with default attenuation factors (1.0, 0.0), concentration factor 1.0 and spot angle 30 degrees.
- param thePos
- type thePos
gp_Pnt
- param theDirection
default value is V3d_XnegYnegZpos
- type theDirection
V3d_TypeOfOrientation
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- rtype
None* Creates a light source of the Spot type in the viewer with default attenuation factors (1.0, 0.0), concentration factor 1.0 and spot angle 30 degrees.
- param thePos
- type thePos
gp_Pnt
- param theDirection
- type theDirection
gp_Dir
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- rtype
None:param theViewer:
- type theViewer
V3d_Viewer
- param theX
- type theX
float
- param theY
- type theY
float
- param theZ
- type theZ
float
- param theDirection
default value is V3d_XnegYnegZpos
- type theDirection
V3d_TypeOfOrientation
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- param theConstAttenuation
default value is 1.0
- type theConstAttenuation
float
- param theLinearAttenuation
default value is 0.0
- type theLinearAttenuation
float
- param theConcentration
default value is 1.0
- type theConcentration
float
- param theAngle
default value is 0.523599
- type theAngle
float
- rtype
None* theXt, theYt, theZt : Coordinate of light source Target. theXp, theYp, theZp : Coordinate of light source Position.
- param theViewer
- type theViewer
V3d_Viewer
- param theXt
- type theXt
float
- param theYt
- type theYt
float
- param theZt
- type theZt
float
- param theXp
- type theXp
float
- param theYp
- type theYp
float
- param theZp
- type theZp
float
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- param theConstAttenuation
default value is 1.0
- type theConstAttenuation
float
- param theLinearAttenuation
default value is 0.0
- type theLinearAttenuation
float
- param theConcentration
default value is 1.0
- type theConcentration
float
- param theAngle
default value is 0.523599
- type theAngle
float
- rtype
None
-
static
DownCast
(t)¶
-
SetDirection
()¶ - Defines the direction of the light source according to a predefined directional vector.
- param theOrientation
- type theOrientation
V3d_TypeOfOrientation
- rtype
None
-
property
thisown
¶ The membership flag
-
class
V3d_Trihedron
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Creates a default trihedron.
- rtype
None
-
Display
()¶ - Display trihedron.
- param theView
- type theView
V3d_View
- rtype
None
-
static
DownCast
(t)¶
-
Erase
()¶ - Erase trihedron.
- rtype
None
-
SetArrowDiameter
()¶ - Setup the arrow diameter.
- param theDiam
- type theDiam
float
- rtype
None
-
SetArrowsColor
()¶ - Setup colors of arrows.
- param theXColor
- type theXColor
Quantity_Color
- param theYColor
- type theYColor
Quantity_Color
- param theZColor
- type theZColor
Quantity_Color
- rtype
None
-
SetLabelsColor
()¶ - Setup color of text labels.
- param theColor
- type theColor
Quantity_Color
- rtype
None
-
SetNbFacets
()¶ - Setup the number of facets for tessellation.
- param theNbFacets
- type theNbFacets
int
- rtype
None
-
SetPosition
()¶ - Setup the corner to draw the trihedron.
- param thePosition
- type thePosition
Aspect_TypeOfTriedronPosition
- rtype
None
-
SetScale
()¶ - Setup the scale factor.
- param theScale
- type theScale
float
- rtype
None
-
SetSizeRatio
()¶ - Setup the size ratio factor.
- param theRatio
- type theRatio
float
- rtype
None
-
SetWireframe
()¶ - Switch wireframe / shaded trihedron.
- param theAsWireframe
- type theAsWireframe
bool
- rtype
None
-
property
thisown
¶ The membership flag
-
class
V3d_View
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Initializes the view.
- param theViewer
- type theViewer
V3d_Viewer
- param theType
default value is V3d_ORTHOGRAPHIC
- type theType
V3d_TypeOfView
- rtype
None* Initializes the view by copying.
- param theViewer
- type theViewer
V3d_Viewer
- param theView
- type theView
V3d_View
- rtype
None
-
ActiveLight
()¶ - Return type
opencascade::handle<V3d_Light>
-
ActiveLightIterator
()¶ - Return iterator for defined lights.
- rtype
V3d_ListOfLightIterator
-
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 Graphic3d_GraphicDriver. 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.
- param thePlane
- type thePlane
Graphic3d_ClipPlane
- rtype
void
-
At
()¶ - Returns the position of the view point.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
AutoZFit
()¶ - If automatic z-range fitting is turned on, adjusts Z-min and Z-max projection volume planes with call to ZFitAll.
- rtype
None
-
AutoZFitMode
()¶ - returns True if automatic z-fit mode is turned on.
- rtype
bool
-
AutoZFitScaleFactor
()¶ - returns scale factor parameter of automatic z-fit mode.
- rtype
float
-
AxialScale
()¶ - Returns the current values of the anisotropic (axial) scale factors.
- param Sx
- type Sx
float
- param Sy
- type Sy
float
- param Sz
- type Sz
float
- rtype
None* 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.
- param Dx
- type Dx
int
- param Dy
- type Dy
int
- param Axis
- type Axis
V3d_TypeOfAxe
- rtype
None
-
BackFacingModel
()¶ - Returns current state of the back faces display
- rtype
V3d_TypeOfBackfacingModel
-
BackgroundColor
()¶ - Returns the Background color values of the view depending of the color Type.
- param Type
- type Type
Quantity_TypeOfColor
- param V1
- type V1
float
- param V2
- type V2
float
- param V3
- type V3
float
- rtype
None* Returns the Background color object of the view.
- rtype
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.
- rtype
opencascade::handle<Graphic3d_Camera>
-
ChangeRenderingParams
()¶ - Returns reference to current rendering parameters and effect settings.
- rtype
Graphic3d_RenderingParams
-
ClipPlanes
()¶ - Get clip planes. returns sequence clip planes that have been set for the view
- rtype
opencascade::handle<Graphic3d_SequenceOfHClipPlane>
-
ComputedMode
()¶ - Returns the computed HLR mode state.
- rtype
bool
-
Convert
()¶ - Converts the PIXEL value to a value in the projection plane.
- param Vp
- type Vp
int
- rtype
float* Converts the point PIXEL into a point projected in the reference frame of the projection plane.
- param Xp
- type Xp
int
- param Yp
- type Yp
int
- param Xv
- type Xv
float
- param Yv
- type Yv
float
- rtype
None* Converts tha value of the projection plane into a PIXEL value.
- param Vv
- type Vv
float
- rtype
int* Converts the point defined in the reference frame of the projection plane into a point PIXEL.
- param Xv
- type Xv
float
- param Yv
- type Yv
float
- param Xp
- type Xp
int
- param Yp
- type Yp
int
- rtype
None* 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.
- param Xp
- type Xp
int
- param Yp
- type Yp
int
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None* Projects the point defined in the reference frame of the view into the projected point in the associated window.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- param Xp
- type Xp
int
- param Yp
- type Yp
int
- rtype
None
-
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);
- param Xp
- type Xp
int
- param Yp
- type Yp
int
- param Xg
- type Xg
float
- param Yg
- type Yg
float
- param Zg
- type Zg
float
- rtype
None* Converts the point into the nearest grid point and display the grid marker.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- param Xg
- type Xg
float
- param Yg
- type Yg
float
- param Zg
- type Zg
float
- rtype
None
-
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.
- param Xp
- type Xp
int
- param Yp
- type Yp
int
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- param Vx
- type Vx
float
- param Vy
- type Vy
float
- param Vz
- type Vz
float
- rtype
None
-
DefaultCamera
()¶ - Return default camera.
- rtype
opencascade::handle<Graphic3d_Camera>
-
Depth
()¶ - Returns the Distance between the Eye and View Point.
- rtype
float
-
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 .
- param Aspect
default value is 0.01
- type Aspect
float
- param Margin
default value is 0.01
- type Margin
float
- rtype
None
-
DiagnosticInformation
()¶ - Fill in the dictionary with diagnostic info. Should be called within rendering thread. //! This API should be used only for user output or for creating automated reports. The format of returned information (e.g. key-value layout) is NOT part of this API and can be changed at any time. Thus application should not parse returned information to weed out specific parameters. @param theDict destination map for information @param theFlags defines the information to be retrieved
- param theDict
- type theDict
TColStd_IndexedDataMapOfStringString
- param theFlags
- type theFlags
Graphic3d_DiagnosticInfo
- rtype
None
-
DoMapping
()¶ - Must be called when the window supporting the view is mapped or unmapped.
- rtype
None
-
static
DownCast
(t)¶
-
Dump
()¶ - Dumps the full contents of the View into the image file. This is an alias for ToPixMap() with Image_AlienPixMap. @param theFile destination image file (image format is determined by file extension like .png, .bmp, .jpg) @param theBufferType buffer to dump returns False when the dump has failed
- param theFile
- type theFile
char *
- param theBufferType
default value is Graphic3d_BT_RGB
- type theBufferType
Graphic3d_BufferType
- rtype
bool
-
Eye
()¶ - Returns the position of the eye.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
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.
- param theMargin
default value is 0.01
- type theMargin
float
- param theToUpdate
default value is Standard_True
- type theToUpdate
bool
- rtype
None* 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.
- param theBox
- type theBox
Bnd_Box
- param theMargin
default value is 0.01
- type theMargin
float
- param theToUpdate
default value is Standard_True
- type theToUpdate
bool
- rtype
None* 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 .
- param theMinXv
- type theMinXv
float
- param theMinYv
- type theMinYv
float
- param theMaxXv
- type theMaxXv
float
- param theMaxYv
- type theMaxYv
float
- rtype
None
-
FitMinMax
()¶ - Transform camera eye, center and scale to fit in the passed bounding box specified in WCS. @param theCamera [in] the camera @param theBox [in] the bounding box @param theMargin [in] the margin coefficient for view borders @param theResolution [in] the minimum size of projection of bounding box in Xv or Yv direction when it considered to be a thin plane or point (without a volume); in this case only the center of camera is adjusted @param theToEnlargeIfLine [in] when True - in cases when the whole bounding box projected into thin line going along Z-axis of screen, the view plane is enlarged such thatwe see the whole line on rotation, otherwise only the center of camera is adjusted. returns True if the fit all operation can be done
- param theCamera
- type theCamera
Graphic3d_Camera
- param theBox
- type theBox
Bnd_Box
- param theMargin
- type theMargin
float
- param theResolution
default value is 0.0
- type theResolution
float
- param theToEnlargeIfLine
default value is Standard_True
- type theToEnlargeIfLine
bool
- rtype
bool
-
FocalReferencePoint
()¶ - Returns the position of point which emanating the projections.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
Focale
()¶ - Returns the View Plane Distance for Perspective Views
- rtype
float
-
GetGraduatedTrihedron
()¶ - Returns data of a graduated trihedron.
- rtype
Graphic3d_GraduatedTrihedron
-
GradientBackground
()¶ - Returns the gradient background of the view.
- rtype
Aspect_GradientBackground
-
GradientBackgroundColors
()¶ - Returns the gradient background colors of the view.
- param theColor1
- type theColor1
Quantity_Color
- param theColor2
- type theColor2
Quantity_Color
- rtype
None
-
GraduatedTrihedronDisplay
()¶ - Displays a graduated trihedron.
- param theTrihedronData
- type theTrihedronData
Graphic3d_GraduatedTrihedron
- rtype
None
-
GraduatedTrihedronErase
()¶ - Erases a graduated trihedron from the view.
- rtype
None
-
GravityPoint
()¶ - Returns the Objects number and the gravity center of ALL viewable points in the view
- rtype
gp_Pnt
-
IfMoreLights
()¶ - Returns True if One light more can be activated in this View.
- rtype
bool
-
IfWindow
()¶ - Returns True if MyView is associated with a window .
- rtype
bool
-
InitActiveLights
()¶ - initializes an iteration on the active Lights.
- rtype
None
-
Invalidate
()¶ - Invalidates view content but does not redraw it.
- rtype
None
-
InvalidateImmediate
()¶ - Invalidates view content within immediate layer but does not redraw it.
- rtype
None
-
IsActiveLight
()¶ - Returns True when the light is active in this view.
- param theLight
- type theLight
V3d_Light
- rtype
bool
-
IsCullingEnabled
()¶ - returns flag value of objects culling mechanism
- rtype
bool
-
IsEmpty
()¶ - Returns the status of the view regarding the displayed structures inside Returns True is The View is empty
- rtype
bool
-
IsInvalidated
()¶ - Returns true if cached view content has been invalidated.
- rtype
bool
-
IsInvalidatedImmediate
()¶ - Returns true if immediate layer content has been invalidated.
- rtype
bool
-
LightLimit
()¶ - Returns the MAX number of light associated to the view.
- rtype
int
-
MoreActiveLights
()¶ - returns true if there are more active Light(s) to return.
- rtype
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.
- param Dx
- type Dx
float
- param Dy
- type Dy
float
- param Dz
- type Dz
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* 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.
- param Axe
- type Axe
V3d_TypeOfAxe
- param Length
- type Length
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* Movement of the eye parllel to the current axis a distance relative to the initial position expressed by Start = Standard_True
- param Length
- type Length
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None
-
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.
- rtype
None
-
NextActiveLights
()¶ - Go to the next active Light (if there is not, ActiveLight will raise an exception)
- rtype
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.
- param theDXp
- type theDXp
int
- param theDYp
- type theDYp
int
- param theZoomFactor
default value is 1
- type theZoomFactor
float
- param theToStart
default value is Standard_True
- type theToStart
bool
- rtype
None
-
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.
- param theDXv
- type theDXv
float
- param theDYv
- type theDYv
float
- param theZoomFactor
default value is 1
- type theZoomFactor
float
- param theToStart
default value is Standard_True
- type theToStart
bool
- rtype
None
-
Place
()¶ - places the point of the view corresponding at the pixel position x,y at the center of the window and updates the view.
- param theXp
- type theXp
int
- param theYp
- type theYp
int
- param theZoomFactor
default value is 1
- type theZoomFactor
float
- rtype
None
-
PlaneLimit
()¶ - Returns the MAX number of clipping planes associated to the view.
- rtype
int
-
Proj
()¶ - Returns the projection vector.
- param Vx
- type Vx
float
- param Vy
- type Vy
float
- param Vz
- type Vz
float
- rtype
None
-
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).
- param Xpix
- type Xpix
int
- param Ypix
- type Ypix
int
- param XP
- type XP
float
- param YP
- type YP
float
- param ZP
- type ZP
float
- param VX
- type VX
float
- param VY
- type VY
float
- param VZ
- type VZ
float
- rtype
None
-
Project
()¶ - Converts the point defined in the user space of the view to the projection plane at the depth relative to theZ.
- param theX
- type theX
float
- param theY
- type theY
float
- param theZ
- type theZ
float
- param theXp
- type theXp
float
- param theYp
- type theYp
float
- rtype
None* Converts the point defined in the user space of the view to the projection plane at the depth relative to theZ.
- param theX
- type theX
float
- param theY
- type theY
float
- param theZ
- type theZ
float
- param theXp
- type theXp
float
- param theYp
- type theYp
float
- param theZp
- type theZp
float
- rtype
None
-
Redraw
()¶ - Redisplays the view even if there has not been any modification. Must be called if the view is shown. (Ex: DeIconification ) .
- rtype
void
-
RedrawImmediate
()¶ - Updates layer of immediate presentations.
- rtype
void
-
Remove
()¶ - Destroys the view.
- rtype
None
-
RemoveClipPlane
()¶ - Removes clip plane from the view. @param thePlane [in] the clip plane to be removed from view.
- param thePlane
- type thePlane
Graphic3d_ClipPlane
- rtype
void
-
RenderingParams
()¶ - Returns current rendering parameters and effect settings. By default it returns default parameters of current viewer. To define view-specific settings use method V3d_View::ChangeRenderingParams(). @sa V3d_Viewer::DefaultRenderingParams()
- rtype
Graphic3d_RenderingParams
-
Reset
()¶ - Resets the centering and the orientation of the view.
- param theToUpdate
default value is Standard_True
- type theToUpdate
bool
- rtype
None
-
ResetViewMapping
()¶ - Resets the centering of the view. Updates the view
- rtype
None
-
ResetViewOrientation
()¶ - Resets the orientation of the view. Updates the view
- rtype
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.
- param Ax
- type Ax
float
- param Ay
- type Ay
float
- param Az
- type Az
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* 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.
- param Ax
- type Ax
float
- param Ay
- type Ay
float
- param Az
- type Az
float
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* 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
- param Axe
- type Axe
V3d_TypeOfAxe
- param Angle
- type Angle
float
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* 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
- param Axe
- type Axe
V3d_TypeOfAxe
- param Angle
- type Angle
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* Rotates the eye around the current axis a relative angular value in RADIANS with respect to the initial position expressed by Start = Standard_True
- param Angle
- type Angle
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None
-
Rotation
()¶ - Continues the rotation of the view with an angle computed from the last and new mouse position <X,Y>.
- param X
- type X
int
- param Y
- type Y
int
- rtype
None
-
Scale
()¶ - Returns the current value of the zoom expressed with respect to SetViewMappingDefault().
- rtype
float
-
SetAt
()¶ - Defines the position of the view point.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
SetAutoZFitMode
()¶ - Sets the automatic z-fit mode and its parameters. The auto z-fit has extra parameters which can controlled from application level to ensure that the size of viewing volume will be sufficiently large to cover the depth of unmanaged objects, for example, transformation persistent ones. @param theScaleFactor [in] the scale factor for Z-range. The range between Z-min, Z-max projection volume planes evaluated by z fitting method will be scaled using this coefficient. Program error exception is thrown if negative or zero value is passed.
- param theIsOn
- type theIsOn
bool
- param theScaleFactor
default value is 1.0
- type theScaleFactor
float
- rtype
None
-
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.
- param Sx
- type Sx
float
- param Sy
- type Sy
float
- param Sz
- type Sz
float
- rtype
None
-
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. .
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- param Vx
- type Vx
float
- param Vy
- type Vy
float
- param Vz
- type Vz
float
- rtype
None
-
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.
- param theModel
default value is V3d_TOBM_AUTOMATIC
- type theModel
V3d_TypeOfBackfacingModel
- rtype
None
-
SetBackgroundColor
()¶ - Defines the background color of the view by the color definition type and the three corresponding values.
- param theType
- type theType
Quantity_TypeOfColor
- param theV1
- type theV1
float
- param theV2
- type theV2
float
- param theV3
- type theV3
float
- rtype
None* Defines the background color of the view.
- param theColor
- type theColor
Quantity_Color
- rtype
None
-
SetBackgroundCubeMap
()¶ - Sets environment cubemap as interactive background.
- param theCubeMap
- type theCubeMap
Graphic3d_CubeMap
- param theToUpdate
default value is Standard_False
- type theToUpdate
bool
- rtype
None
-
SetBackgroundImage
()¶ - Defines the background texture of the view by supplying the texture image file name and fill method (centered by default).
- param theFileName
- type theFileName
char *
- param theFillStyle
default value is Aspect_FM_CENTERED
- type theFillStyle
Aspect_FillMethod
- param theToUpdate
default value is Standard_False
- type theToUpdate
bool
- rtype
None
-
SetBgGradientColors
()¶ - Defines the gradient background colors of the view by supplying the colors and the fill method (horizontal by default).
- param theColor1
- type theColor1
Quantity_Color
- param theColor2
- type theColor2
Quantity_Color
- param theFillStyle
default value is Aspect_GFM_HOR
- type theFillStyle
Aspect_GradientFillMethod
- param theToUpdate
default value is Standard_False
- type theToUpdate
bool
- rtype
None
-
SetBgGradientStyle
()¶ - Defines the gradient background fill method of the view.
- param theMethod
default value is Aspect_GFM_HOR
- type theMethod
Aspect_GradientFillMethod
- param theToUpdate
default value is Standard_False
- type theToUpdate
bool
- rtype
None
-
SetBgImageStyle
()¶ - Defines the textured background fill method of the view.
- param theFillStyle
- type theFillStyle
Aspect_FillMethod
- param theToUpdate
default value is Standard_False
- type theToUpdate
bool
- rtype
None
-
SetCamera
()¶ - Change camera used by view.
- param theCamera
- type theCamera
Graphic3d_Camera
- rtype
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.
- param theXp
- type theXp
int
- param theYp
- type theYp
int
- rtype
None
-
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 InquirePlaneLimit method of Graphic3d_GraphicDriver. Please be aware that the planes that exceed the limit are ignored during rendering. @param thePlanes [in] the clip planes to set.
- param thePlanes
- type thePlanes
Graphic3d_SequenceOfHClipPlane
- rtype
None:param thePlanes:
- type thePlanes
Graphic3d_SequenceOfHClipPlane
- rtype
None
-
SetComputedMode
()¶ - Switches computed HLR mode in the view.
- param theMode
- type theMode
bool
- rtype
None
-
SetDepth
()¶ - Defines the Depth of the eye from the view point without update the projection .
- param Depth
- type Depth
float
- rtype
None
-
SetEye
()¶ - Defines the position of the eye..
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
SetFocale
()¶ - Change View Plane Distance for Perspective Views Warning! raises TypeMismatch from Standard if the view is not a perspective view.
- param Focale
- type Focale
float
- rtype
None
-
SetFront
()¶ - modify the Projection of the view perpendicularly to the privileged plane of the viewer.
- rtype
None
-
SetFrustumCulling
()¶ - Turn on/off automatic culling of objects outside frustum (ON by default)
- param theMode
- type theMode
bool
- rtype
None
-
SetGrid
()¶ - Defines or Updates the definition of the grid in <self>
- param aPlane
- type aPlane
gp_Ax3
- param aGrid
- type aGrid
Aspect_Grid
- rtype
None
-
SetGridActivity
()¶ - Defines or Updates the activity of the grid in <self>
- param aFlag
- type aFlag
bool
- rtype
None
-
SetImmediateUpdate
()¶ - sets the immediate update mode and returns the previous one.
- param theImmediateUpdate
- type theImmediateUpdate
bool
- rtype
bool
-
SetLightOff
()¶ - Deactivate theLight in this view.
- param theLight
- type theLight
V3d_Light
- rtype
None* Deactivate all the Lights defined in this view.
- rtype
None
-
SetLightOn
()¶ - Activates theLight in the view.
- param theLight
- type theLight
V3d_Light
- rtype
None* Activates all the lights defined in this view.
- rtype
None
-
SetMagnify
()¶ - Parameters
theWindow –
- type theWindow
Aspect_Window
- param thePreviousView
- type thePreviousView
V3d_View
- param theX1
- type theX1
int
- param theY1
- type theY1
int
- param theX2
- type theX2
int
- param theY2
- type theY2
int
- rtype
None
-
SetProj
()¶ - Defines the orientation of the projection.
- param Vx
- type Vx
float
- param Vy
- type Vy
float
- param Vz
- type Vz
float
- rtype
None* Defines the orientation of the projection . @param theOrientation camera direction @param theIsYup flag indicating Y-up (True) or Z-up (False) convention
- param theOrientation
- type theOrientation
V3d_TypeOfOrientation
- param theIsYup
default value is Standard_False
- type theIsYup
bool
- rtype
None
-
SetScale
()¶ - Zooms the view by a factor relative to the value initialised by SetViewMappingDefault(). Updates the view.
- param Coef
- type Coef
float
- rtype
None
-
SetShadingModel
()¶ - Defines the shading model for the visualization. Various models are available.
- param theShadingModel
- type theShadingModel
Graphic3d_TypeOfShadingModel
- rtype
None
-
SetSize
()¶ - Defines the view projection size in its maximum dimension, keeping the inital height/width ratio unchanged.
- param theSize
- type theSize
float
- rtype
None
-
SetTextureEnv
()¶ - Sets the environment texture to use. No environment texture by default.
- param theTexture
- type theTexture
Graphic3d_TextureEnv
- rtype
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.
- param Angle
- type Angle
float
- rtype
None
-
SetUp
()¶ - Defines the orientation of the high point.
- param Vx
- type Vx
float
- param Vy
- type Vy
float
- param Vz
- type Vz
float
- rtype
None* Defines the orientation(SO) of the high point.
- param Orientation
- type Orientation
V3d_TypeOfOrientation
- rtype
None
-
SetViewMappingDefault
()¶ - Saves the current view mapping. This will be the state returned from ResetViewmapping.
- rtype
None
-
SetViewOrientationDefault
()¶ - Saves the current state of the orientation of the view which will be the return state at ResetViewOrientation.
- rtype
None
-
SetVisualization
()¶ - Defines the visualization type in the view.
- param theType
- type theType
V3d_TypeOfVisualization
- rtype
None
-
SetWindow
()¶ - 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. Warning: The view is centered and resized to preserve the height/width ratio of the window.
- param theWindow
- type theWindow
Aspect_Window
- param theContext
default value is NULL
- type theContext
Aspect_RenderingContext
- rtype
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 .
- param SetZSize
- type SetZSize
float
- rtype
None
-
SetZoom
()¶ - Zooms the view by a factor relative to the initial value expressed by Start = Standard_True Updates the view.
- param Coef
- type Coef
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None
-
ShadingModel
()¶ - Returns the current shading model.
- rtype
Graphic3d_TypeOfShadingModel
-
Size
()¶ - Returns the height and width of the view.
- param Width
- type Width
float
- param Height
- type Height
float
- rtype
None
-
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.
- param X
- type X
int
- param Y
- type Y
int
- param zRotationThreshold
default value is 0.0
- type zRotationThreshold
float
- rtype
None
-
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.
- param theXp
- type theXp
int
- param theYp
- type theYp
int
- rtype
None
-
StatisticInformation
()¶ - Returns string with statistic performance info.
- rtype
TCollection_AsciiString* Fills in the dictionary with statistic performance info.
- param theDict
- type theDict
TColStd_IndexedDataMapOfStringString
- rtype
None
-
TextureEnv
()¶ - Return type
opencascade::handle<Graphic3d_TextureEnv>
-
ToPixMap
()¶ - Dumps the full contents of the view to a pixmap with specified parameters. Internally this method calls Redraw() with an offscreen render buffer of requested target size (theWidth x theHeight), so that there is no need resizing a window control for making a dump of different size.
- param theImage
- type theImage
Image_PixMap
- param theParams
- type theParams
V3d_ImageDumpOptions
- rtype
bool* Dumps the full contents of the view to a pixmap. Internally this method calls Redraw() with an offscreen render buffer of requested target size (theWidth x theHeight), so that there is no need resizing a window control for making a dump of different size. @param theImage target image, will be re-allocated to match theWidth x theHeight @param theWidth target image width @param theHeight target image height @param theBufferType type of the view buffer to dump (color / depth) @param theToAdjustAspect when true, active view aspect ratio will be overridden by (theWidth / theHeight) @param theStereoOptions how to dump stereographic camera
- param theImage
- type theImage
Image_PixMap
- param theWidth
- type theWidth
int
- param theHeight
- type theHeight
int
- param theBufferType
default value is Graphic3d_BT_RGB
- type theBufferType
Graphic3d_BufferType
- param theToAdjustAspect
default value is Standard_True
- type theToAdjustAspect
bool
- param theStereoOptions
default value is V3d_SDO_MONO
- type theStereoOptions
V3d_StereoDumpOptions
- rtype
bool
-
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
- param Dx
- type Dx
float
- param Dy
- type Dy
float
- param Dz
- type Dz
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* 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
- param Axe
- type Axe
V3d_TypeOfAxe
- param Length
- type Length
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* Movement of the eye and view point parallel to the current axis a distance relative to the initial position expressed by Start = Standard_True
- param Length
- type Length
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None
-
TriedronDisplay
()¶ - Display of the Triedron. Initialize position, color and length of Triedron axes. The scale is a percent of the window width.
- param thePosition
default value is Aspect_TOTP_CENTER
- type thePosition
Aspect_TypeOfTriedronPosition
- param theColor
default value is Quantity_NOC_WHITE
- type theColor
Quantity_Color
- param theScale
default value is 0.02
- type theScale
float
- param theMode
default value is V3d_WIREFRAME
- type theMode
V3d_TypeOfVisualization
- rtype
None
-
TriedronErase
()¶ - Erases the Triedron.
- rtype
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
- param Ax
- type Ax
float
- param Ay
- type Ay
float
- param Az
- type Az
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* 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
- param Axe
- type Axe
V3d_TypeOfAxe
- param Angle
- type Angle
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None* Rotation of the view point around the current axis an angular value in RADIANS relative to the initial position expressed by Start = Standard_True
- param Angle
- type Angle
float
- param Start
default value is Standard_True
- type Start
bool
- rtype
None
-
Twist
()¶ - Returns in RADIANS the orientation of the view around the visual axis measured from the Y axis of the screen.
- rtype
float
-
Type
()¶ - Returns the Type of the View
- rtype
V3d_TypeOfView
-
Up
()¶ - Returns the vector giving the position of the high point.
- param Vx
- type Vx
float
- param Vy
- type Vy
float
- param Vz
- type Vz
float
- rtype
None
-
Update
()¶ - Deprecated, Redraw() should be used instead.
- rtype
None
-
UpdateLights
()¶ - Updates the lights of the view.
- rtype
None
-
View
()¶ - Returns the associated Graphic3d view.
- rtype
opencascade::handle<Graphic3d_CView>
-
Viewer
()¶ - Returns the viewer in which the view has been created.
- rtype
opencascade::handle<V3d_Viewer>
-
Visualization
()¶ - Returns the current visualisation mode.
- rtype
V3d_TypeOfVisualization
-
Window
()¶ - Returns the Aspect Window associated with the view.
- rtype
opencascade::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.
- param theMinXp
- type theMinXp
int
- param theMinYp
- type theMinYp
int
- param theMaxXp
- type theMaxXp
int
- param theMaxYp
- type theMaxYp
int
- rtype
None
-
WindowFitAll
()¶ - idem than WindowFit
- param Xmin
- type Xmin
int
- param Ymin
- type Ymin
int
- param Xmax
- type Xmax
int
- param Ymax
- type Ymax
int
- rtype
None
-
ZBufferTriedronSetup
()¶ - Customization of the ZBUFFER Triedron. XColor,YColor,ZColor - colors of axis SizeRatio - ratio of decreasing of the trihedron size when its physical position comes out of the view AxisDiametr - diameter relatively to axis length NbFacettes - number of facets of cylinders and cones
- param theXColor
default value is Quantity_NOC_RED
- type theXColor
Quantity_Color
- param theYColor
default value is Quantity_NOC_GREEN
- type theYColor
Quantity_Color
- param theZColor
default value is Quantity_NOC_BLUE1
- type theZColor
Quantity_Color
- param theSizeRatio
default value is 0.8
- type theSizeRatio
float
- param theAxisDiametr
default value is 0.05
- type theAxisDiametr
float
- param theNbFacettes
default value is 12
- type theNbFacettes
int
- rtype
None
-
ZFitAll
()¶ - Change Z-min and Z-max planes of projection volume to match the displayed objects.
- param theScaleFactor
default value is 1.0
- type theScaleFactor
float
- rtype
None
-
ZSize
()¶ - Returns the Depth of the view .
- rtype
float
-
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.
- param theXp1
- type theXp1
int
- param theYp1
- type theYp1
int
- param theXp2
- type theXp2
int
- param theYp2
- type theYp2
int
- rtype
None
-
ZoomAtPoint
()¶ - Zooms the model at a pixel defined by the method StartZoomAtPoint().
- param theMouseStartX
- type theMouseStartX
int
- param theMouseStartY
- type theMouseStartY
int
- param theMouseEndX
- type theMouseEndX
int
- param theMouseEndY
- type theMouseEndY
int
- rtype
None
-
property
thisown
¶ The membership flag
-
class
V3d_Viewer
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Create a Viewer with the given graphic driver and with default parameters: - View orientation: V3d_XposYnegZpos - View background: Quantity_NOC_GRAY30 - Shading model: V3d_GOURAUD
- param theDriver
- type theDriver
Graphic3d_GraphicDriver
- rtype
None* @name deprecated methods
- param theDriver
- type theDriver
Graphic3d_GraphicDriver
- param theName
- type theName
Standard_ExtString
- param theDomain
default value is
- type theDomain
char *
- param theViewSize
default value is 1000.0
- type theViewSize
float
- param theViewProj
default value is V3d_XposYnegZpos
- type theViewProj
V3d_TypeOfOrientation
- param theViewBackground
default value is Quantity_NOC_GRAY30
- type theViewBackground
Quantity_Color
- param theVisualization
default value is V3d_ZBUFFER
- type theVisualization
V3d_TypeOfVisualization
- param theShadingModel
default value is Graphic3d_TOSM_VERTEX
- type theShadingModel
Graphic3d_TypeOfShadingModel
- param theComputedMode
default value is Standard_True
- type theComputedMode
bool
- param theDefaultComputedMode
default value is Standard_True
- type theDefaultComputedMode
bool
- rtype
None
-
ActivateGrid
()¶ - @name grid management Activates the grid in all views of <self>.
- param aGridType
- type aGridType
Aspect_GridType
- param aGridDrawMode
- type aGridDrawMode
Aspect_GridDrawMode
- rtype
None
-
ActiveLight
()¶ - Return type
opencascade::handle<V3d_Light>
-
ActiveLightIterator
()¶ - Return an iterator for defined lights.
- rtype
V3d_ListOfLightIterator
-
ActiveView
()¶ - Return type
opencascade::handle<V3d_View>
-
ActiveViewIterator
()¶ - Return an iterator for active views.
- rtype
V3d_ListOfViewIterator
-
AddLight
()¶ - Adds Light in Sequence Of Lights.
- param theLight
- type theLight
V3d_Light
- rtype
None
-
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. Custom layers will be inserted before Graphic3d_ZLayerId_Top (e.g. between Graphic3d_ZLayerId_Default and before Graphic3d_ZLayerId_Top). @param theLayerId [out] id of created layer @param theSettings [in] new layer settings returns False if the layer can not be created
- param theLayerId
- type theLayerId
int OutValue
- param theSettings
default value is Graphic3d_ZLayerSettings()
- type theSettings
Graphic3d_ZLayerSettings
- rtype
bool
-
CircularGridGraphicValues
()¶ - Returns the location and the size of the grid.
- param Radius
- type Radius
float
- param OffSet
- type OffSet
float
- rtype
None
-
CircularGridValues
()¶ - Returns the definition of the circular grid.
- param XOrigin
- type XOrigin
float
- param YOrigin
- type YOrigin
float
- param RadiusStep
- type RadiusStep
float
- param DivisionNumber
- type DivisionNumber
int
- param RotationAngle
- type RotationAngle
float
- rtype
None
-
ComputedMode
()¶ - returns true if the computed mode can be used.
- rtype
bool
-
CreateView
()¶ - Creates a view in the viewer according to its default parameters.
- rtype
opencascade::handle<V3d_View>
-
DeactivateGrid
()¶ - Deactivates the grid in all views of <self>.
- rtype
None
-
DefaultBackgroundColor
()¶ - Returns the default background colour object.
- rtype
Quantity_Color:param theType:
- type theType
Quantity_TypeOfColor
- param theV1
- type theV1
float
- param theV2
- type theV2
float
- param theV3
- type theV3
float
- rtype
None
-
DefaultBgGradientColors
()¶ - Returns the gradient background colour objects of the view.
- param theColor1
- type theColor1
Quantity_Color
- param theColor2
- type theColor2
Quantity_Color
- rtype
None
-
DefaultComputedMode
()¶ - returns true if by default the computed mode must be used.
- rtype
bool
-
DefaultRenderingParams
()¶ - Return default Rendering Parameters. By default these parameters are set in a new V3d_View.
- rtype
Graphic3d_RenderingParams
-
DefaultShadingModel
()¶ - Returns the default type of Shading
- rtype
Graphic3d_TypeOfShadingModel
-
DefaultTypeOfView
()¶ - Returns the default type of View (orthographic or perspective projection) to be returned by CreateView() method.
- rtype
V3d_TypeOfView
-
DefaultViewProj
()¶ - Returns the default Projection.
- rtype
V3d_TypeOfOrientation
-
DefaultViewSize
()¶ - Returns the default size of the view.
- rtype
float
-
DefaultVisualization
()¶ - Returns the default type of Visualization.
- rtype
V3d_TypeOfVisualization
-
DefinedLight
()¶ - Return type
opencascade::handle<V3d_Light>
-
DefinedLightIterator
()¶ - Return an iterator for defined lights.
- rtype
V3d_ListOfLightIterator
-
DefinedView
()¶ - Return type
opencascade::handle<V3d_View>
-
DefinedViewIterator
()¶ - Return an iterator for defined views.
- rtype
V3d_ListOfViewIterator
-
DelLight
()¶ - Delete Light in Sequence Of Lights.
- param theLight
- type theLight
V3d_Light
- rtype
None
-
DisplayPrivilegedPlane
()¶ - Parameters
theOnOff –
- type theOnOff
bool
- param theSize
default value is 1
- type theSize
float
- rtype
None
-
static
DownCast
(t)¶
-
Driver
()¶ - Return Graphic Driver instance.
- rtype
opencascade::handle<Graphic3d_GraphicDriver>
-
Erase
()¶ - @name objects management Erase all Objects in All the views.
- rtype
None
-
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.
- param theLayerSeq
- type theLayerSeq
TColStd_SequenceOfInteger
- rtype
None
-
GetGradientBackground
()¶ - Returns the gradient background of the view.
- rtype
Aspect_GradientBackground
-
Grid
()¶ - Returns the defined grid in <self>.
- rtype
opencascade::handle<Aspect_Grid>
-
GridDrawMode
()¶ - Returns the current grid draw mode defined in <self>.
- rtype
Aspect_GridDrawMode
-
GridEcho
()¶ - Returns True when grid echo must be displayed at hit point.
- rtype
bool
-
GridType
()¶ - Returns the current grid type defined in <self>.
- rtype
Aspect_GridType
-
HideGridEcho
()¶ - Temporarly hide grid echo.
- param theView
- type theView
V3d_View
- rtype
None
-
IfMoreViews
()¶ - Returns True if One View more can be defined in this Viewer.
- rtype
bool
-
InitActiveLights
()¶ - Initializes an internal iteratator on the active Lights.
- rtype
None
-
InitActiveViews
()¶ - Initializes an internal iterator on the active views.
- rtype
None
-
InitDefinedLights
()¶ - Initializes an internal iterattor on the Defined Lights.
- rtype
None
-
InitDefinedViews
()¶ - Initializes an internal iterator on the Defined views.
- rtype
None
-
InsertLayerAfter
()¶ - 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. Layer rendering order is defined by its position in list (altered by theLayerAfter) and IsImmediate() flag (all layers with IsImmediate() flag are drawn afterwards); @param theNewLayerId [out] id of created layer; layer id is arbitrary and does not depend on layer position in the list @param theSettings [in] new layer settings @param theLayerBefore [in] id of layer to append new layer after returns False if the layer can not be created
- param theNewLayerId
- type theNewLayerId
int OutValue
- param theSettings
- type theSettings
Graphic3d_ZLayerSettings
- param theLayerBefore
- type theLayerBefore
int
- rtype
bool
-
InsertLayerBefore
()¶ - 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. Layer rendering order is defined by its position in list (altered by theLayerAfter) and IsImmediate() flag (all layers with IsImmediate() flag are drawn afterwards); @param theNewLayerId [out] id of created layer; layer id is arbitrary and does not depend on layer position in the list @param theSettings [in] new layer settings @param theLayerAfter [in] id of layer to append new layer before returns False if the layer can not be created
- param theNewLayerId
- type theNewLayerId
int OutValue
- param theSettings
- type theSettings
Graphic3d_ZLayerSettings
- param theLayerAfter
- type theLayerAfter
int
- rtype
bool
-
Invalidate
()¶ - Invalidates viewer content but does not redraw it.
- rtype
None
-
IsActive
()¶ - Returns Standard_True if a grid is activated in <self>.
- rtype
bool
-
IsGlobalLight
()¶ - Parameters
TheLight –
- type TheLight
V3d_Light
- rtype
bool
-
LastActiveView
()¶ - returns true if there is only one active view.
- rtype
bool
-
MoreActiveLights
()¶ - returns true if there are more active Light(s) to return.
- rtype
bool
-
MoreActiveViews
()¶ - Returns true if there are more active view(s) to return.
- rtype
bool
-
MoreDefinedLights
()¶ - Returns true if there are more Defined Light(s) to return.
- rtype
bool
-
MoreDefinedViews
()¶ - returns true if there are more Defined view(s) to return.
- rtype
bool
-
NextActiveLights
()¶ - Go to the next active Light (if there is not, ActiveLight() will raise an exception)
- rtype
None
-
NextActiveViews
()¶ - Go to the next active view (if there is not, ActiveView will raise an exception)
- rtype
None
-
NextDefinedLights
()¶ - Go to the next Defined Light (if there is not, DefinedLight() will raise an exception)
- rtype
None
-
NextDefinedViews
()¶ - Go to the next Defined view (if there is not, DefinedView will raise an exception)
- rtype
None
-
PrivilegedPlane
()¶ - @name privileged plane management
- rtype
gp_Ax3
-
RectangularGridGraphicValues
()¶ - Returns the location and the size of the grid.
- param XSize
- type XSize
float
- param YSize
- type YSize
float
- param OffSet
- type OffSet
float
- rtype
None
-
RectangularGridValues
()¶ - Returns the definition of the rectangular grid.
- param XOrigin
- type XOrigin
float
- param YOrigin
- type YOrigin
float
- param XStep
- type XStep
float
- param YStep
- type YStep
float
- param RotationAngle
- type RotationAngle
float
- rtype
None
-
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.
- rtype
None
-
RedrawImmediate
()¶ - Updates layer of immediate presentations.
- rtype
None
-
Remove
()¶ - Suppresses the Viewer.
- rtype
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.
- param theLayerId
- type theLayerId
int
- rtype
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.
- param Radius
- type Radius
float
- param OffSet
- type OffSet
float
- rtype
None
-
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.
- param XOrigin
- type XOrigin
float
- param YOrigin
- type YOrigin
float
- param RadiusStep
- type RadiusStep
float
- param DivisionNumber
- type DivisionNumber
int
- param RotationAngle
- type RotationAngle
float
- rtype
None
-
SetComputedMode
()¶ - Set if the computed mode can be used.
- param theMode
- type theMode
bool
- rtype
None
-
SetDefaultBackgroundColor
()¶ - Defines the default background colour of views attached to the viewer by supplying the color object
- param theColor
- type theColor
Quantity_Color
- rtype
None* Defines the default base colour of views attached to the Viewer by supplying the type of colour definition and the three component values.
- param theType
- type theType
Quantity_TypeOfColor
- param theV1
- type theV1
float
- param theV2
- type theV2
float
- param theV3
- type theV3
float
- rtype
None
-
SetDefaultBgGradientColors
()¶ - Defines the default gradient background colours of views attached to the viewer by supplying the colour objects
- param theColor1
- type theColor1
Quantity_Color
- param theColor2
- type theColor2
Quantity_Color
- param theFillStyle
default value is Aspect_GFM_HOR
- type theFillStyle
Aspect_GradientFillMethod
- rtype
None
-
SetDefaultComputedMode
()¶ - Set if by default the computed mode must be used.
- param theMode
- type theMode
bool
- rtype
None
-
SetDefaultLights
()¶ - @name lights management Defines default lights: positional-light 0.3 0. 0. directional-light V3d_XnegYposZpos directional-light V3d_XnegYneg ambient-light
- rtype
None
-
SetDefaultRenderingParams
()¶ - Set default Rendering Parameters.
- param theParams
- type theParams
Graphic3d_RenderingParams
- rtype
None
-
SetDefaultShadingModel
()¶ - Gives the default type of SHADING.
- param theType
- type theType
Graphic3d_TypeOfShadingModel
- rtype
None
-
SetDefaultTypeOfView
()¶ - Set the default type of View (orthographic or perspective projection) to be returned by CreateView() method.
- param theType
- type theType
V3d_TypeOfView
- rtype
None
-
SetDefaultViewProj
()¶ - Sets the default projection for creating views in the viewer.
- param theOrientation
- type theOrientation
V3d_TypeOfOrientation
- rtype
None
-
SetDefaultViewSize
()¶ - Gives a default size for the creation of views of the viewer.
- param theSize
- type theSize
float
- rtype
None
-
SetDefaultVisualization
()¶ - Gives the default visualization mode.
- param theType
- type theType
V3d_TypeOfVisualization
- rtype
None
-
SetGridEcho
()¶ - Show/Don’t show grid echo to the hit point. If True,the grid echo will be shown at ConvertToGrid() time.
- param showGrid
default value is Standard_True
- type showGrid
bool
- rtype
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
- param aMarker
- type aMarker
Graphic3d_AspectMarker3d
- rtype
None
-
SetLightOff
()¶ - Deactivates MyLight in this viewer.
- param theLight
- type theLight
V3d_Light
- rtype
None* Deactivate all the Lights defined in this viewer.
- rtype
None
-
SetLightOn
()¶ - Activates MyLight in the viewer.
- param theLight
- type theLight
V3d_Light
- rtype
None* Activates all the lights defined in this viewer.
- rtype
None
-
SetPrivilegedPlane
()¶ - Parameters
thePlane –
- type thePlane
gp_Ax3
- rtype
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.
- param XSize
- type XSize
float
- param YSize
- type YSize
float
- param OffSet
- type OffSet
float
- rtype
None
-
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.
- param XOrigin
- type XOrigin
float
- param YOrigin
- type YOrigin
float
- param XStep
- type XStep
float
- param YStep
- type YStep
float
- param RotationAngle
- type RotationAngle
float
- rtype
None
-
SetViewOff
()¶ - Deactivates all the views of a Viewer attached to a window.
- rtype
None* Deactivates a particular view in the Viewer. Must be call if the Window attached to the view has been Iconified .
- param theView
- type theView
V3d_View
- rtype
None
-
SetViewOn
()¶ - Activates all of the views of a viewer attached to a window.
- rtype
None* Activates a particular view in the Viewer. Must be call if the Window attached to the view has been Deiconified.
- param theView
- type theView
V3d_View
- rtype
None
-
SetZLayerSettings
()¶ - Sets the settings for a single Z layer.
- param theLayerId
- type theLayerId
int
- param theSettings
- type theSettings
Graphic3d_ZLayerSettings
- rtype
None
-
ShowGridEcho
()¶ - Display grid echo at requested point in the view.
- param theView
- type theView
V3d_View
- param thePoint
- type thePoint
Graphic3d_Vertex
- rtype
None
-
StructureManager
()¶ - Returns the structure manager associated to this viewer.
- rtype
opencascade::handle<Graphic3d_StructureManager>
-
UnHighlight
()¶ - UnHighlight all Objects in All the views.
- rtype
None
-
Update
()¶ - Deprecated, Redraw() should be used instead.
- rtype
None
-
UpdateLights
()¶ - Updates the lights of all the views of a viewer.
- rtype
None
-
ZLayerSettings
()¶ - Returns the settings of a single Z layer.
- param theLayerId
- type theLayerId
int
- rtype
Graphic3d_ZLayerSettings
-
property
thisown
¶ The membership flag
-
class
v3d
¶ Bases:
object
-
static
ArrowOfRadius
()¶ - Compute the graphic structure of arrow. X0,Y0,Z0coordinate of the arrow. DX,DY,DZDirection of the arrow. AlphaAngle of arrow. LngLength of arrow.
- param garrow
- type garrow
Graphic3d_Group
- param X0
- type X0
float
- param Y0
- type Y0
float
- param Z0
- type Z0
float
- param DX
- type DX
float
- param DY
- type DY
float
- param DZ
- type DZ
float
- param Alpha
- type Alpha
float
- param Lng
- type Lng
float
- rtype
void
-
static
CircleInPlane
()¶ - Compute the graphic structure of circle. X0,Y0,Z0Center of circle. VX,VY,VZAxis of circle. RadiusRadius of circle.
- param gcircle
- type gcircle
Graphic3d_Group
- param X0
- type X0
float
- param Y0
- type Y0
float
- param Z0
- type Z0
float
- param VX
- type VX
float
- param VY
- type VY
float
- param VZ
- type VZ
float
- param Radius
- type Radius
float
- rtype
void
-
static
GetProjAxis
()¶ - Determines the orientation vector corresponding to the predefined orientation type.
- param theOrientation
- type theOrientation
V3d_TypeOfOrientation
- rtype
gp_Dir
-
static
SwitchViewsinWindow
()¶ - Parameters
aPreviousView –
- type aPreviousView
V3d_View
- param aNextView
- type aNextView
V3d_View
- rtype
void
-
static
TypeOfOrientationFromString
()¶ - Returns the orientation type from the given string identifier (using case-insensitive comparison). @param theTypeString string identifier returns orientation type or V3d_TypeOfOrientation if string identifier is invalid
- param theTypeString
- type theTypeString
char *
- rtype
V3d_TypeOfOrientation* Determines the shape type from the given string identifier (using case-insensitive comparison). @param theTypeString string identifier @param theType detected shape type returns True if string identifier is known
- param theTypeString
- type theTypeString
char *
- param theType
- type theType
V3d_TypeOfOrientation
- rtype
bool
-
static
TypeOfOrientationToString
()¶ - Returns the string name for a given orientation type. @param theType orientation type returns string identifier from the list Xpos, Ypos, Zpos and others
- param theType
- type theType
V3d_TypeOfOrientation
- rtype
char *
-
property
thisown
¶ The membership flag
-
static