OCC.Visual3d module¶
-Version:This package contains the group of classes necessaryfor the implementation of commands for the 3D visualiser.Use of this package is reserved to the visualiser.The visualiser manages the structures, the views, thelight sources, and object picking.-Keywords: View, Light, Pick-Warning:-References:
-
class
Handle_Visual3d_HSequenceOfLight
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Visual3d_HSequenceOfView
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Visual3d_Layer
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Visual3d_LayerItem
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Visual3d_Light
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Visual3d_SequenceNodeOfSequenceOfLight
(*args)¶ Bases:
OCC.TCollection.Handle_TCollection_SeqNode
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Visual3d_SequenceNodeOfSequenceOfView
(*args)¶ Bases:
OCC.TCollection.Handle_TCollection_SeqNode
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Visual3d_View
(*args)¶ Bases:
OCC.Graphic3d.Handle_Graphic3d_DataStructureManager
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Visual3d_ViewManager
(*args)¶ Bases:
OCC.Graphic3d.Handle_Graphic3d_StructureManager
-
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
Visual3d_ContextPick
(*args)¶ Bases:
object
- Creates a context from default values //! Aperture : 4.0 Depth : 10 Order : TOO_TOPFIRST
Return type: None - Creates a context with the values defined Warning: Raises ContextPickDefinitionError if <Depth> or <Aperture> is a negative value.
Parameters: Return type: -
Order
()¶ - Returns the order of picking of <self>. //! TypeOfOrder : TOO_TOPFIRST TOO_BOTTOMFIRST
Return type: Visual3d_TypeOfOrder
-
SetAperture
()¶ - Modifies the size of the pick window. Category: Methods to modifies the class definition Warning: Raises ContextPickDefinitionError if <Aperture> is a negative value.
Parameters: Aperture (float) – Return type: None
-
SetDepth
()¶ - Modifies the pick depth a priori. Category: Methods to modifies the class definition Warning: Raises ContextPickDefinitionError if <Depth> is a negative value.
Parameters: Depth (int) – Return type: None
-
SetOrder
()¶ - Modifies the order of picking. //! TypeOfOrder : TOO_TOPFIRST TOO_BOTTOMFIRST
Parameters: Order (Visual3d_TypeOfOrder) – Return type: None
-
thisown
¶ The membership flag
-
class
Visual3d_ContextView
(*args)¶ Bases:
object
- Creates a context from default values //! Aliasing : OFF BackZClipping : OFF FrontZClipping : OFF Depth-cueing : OFF Light source : 0 Clipping plane : 0 Type Of Visualization : TOV_WIREFRAME Type Of Model : TOM_NONE Type Of SurfaceDetail : TOSD_NONE
Return type: None -
ActivatedLight
()¶ Parameters: AnIndex (int) – Return type: Handle_Visual3d_Light
-
ActivatedLights
()¶ - Returns the group of active light sources in the view of context <self>.
Return type: Handle_Visual3d_HSequenceOfLight
-
ChangeClipPlanes
()¶ - Change clip planes. returns sequence of clip planes.
Return type: Graphic3d_SequenceOfHClipPlane
-
ClipPlanes
()¶ - Returns sequence of clip planes. returns sequence of clip planes.
Return type: Graphic3d_SequenceOfHClipPlane
-
Model
()¶ - Returns the shading model.
Return type: Visual3d_TypeOfModel
-
NumberOfActivatedLights
()¶ - Returns the number of active light sources in the view of context <self>.
Return type: int
-
SetAliasingOn
()¶ - Activates antialiasing. Antialiasing can be activated on all the structures in the view
Return type: None
-
SetBackZClippingOff
()¶ - Deactivates the back Z-clipping plane defined by SetBackPlane method.
Return type: None
-
SetBackZClippingOn
()¶ - Activates the back Z-clipping plane defined by SetBackPlane method. Category: Methods to modify the class definition Warning: Raises ZClippingDefinitionError if <BackPlane> is front of <FrontPlane>.
Return type: None
-
SetDepthCueingBackPlane
()¶ - Modifies the back depth-cueing plane. Category: Methods to modify the class definition Warning: Raises DepthCueingDefinitionError if <BackPlane> is front of <FrontPlane> and DepthCueing is ON.
Parameters: ABack (float) – Return type: None
-
SetDepthCueingFrontPlane
()¶ - Modifies the front depth-cueing plane. Category: Methods to modify the class definition Warning: Raises DepthCueingDefinitionError if <BackPlane> is front of <FrontPlane> and DepthCueing is ON.
Parameters: ABack (float) – Return type: None
-
SetDepthCueingOn
()¶ - Activates the depth-cueing. Depth-cueing can be activated on all structures present in the view. Category: Methods to modify the class definition Warning: Raises DepthCueingDefinitionError if <BackPlane> is front of <FrontPlane>.
Return type: None
-
SetFrontZClippingOff
()¶ - Deactivates the front Z-clipping plane defined by SetFrontPlane method.
Return type: None
-
SetFrontZClippingOn
()¶ - Activates the front Z-clipping plane defined by SetFrontPlane method.
Return type: None
-
SetLightOff
()¶ - Deactivates the light source <ALight>
Parameters: ALight (Handle_Visual3d_Light &) – Return type: None
-
SetLightOn
()¶ - Activates the light source <ALight>
Parameters: ALight (Handle_Visual3d_Light &) – Return type: None
-
SetModel
()¶ - Modifies the shading model when the type of visualization is TOV_SHADING
Parameters: AModel (Visual3d_TypeOfModel) – Return type: None
-
SetSurfaceDetail
()¶ - Selects the kind of rendering default to: TOSD_NONE
Parameters: TOSD (Visual3d_TypeOfSurfaceDetail) – Return type: None
-
SetTextureEnv
()¶ - Sets the environment texture to use no environment texture by default
Parameters: ATexture (Handle_Graphic3d_TextureEnv &) – Return type: None
-
SetVisualization
()¶ - Modifies the mode of visualization. //! TypeOfVisualization : TOV_WIREFRAME TOV_SHADING
Parameters: AVisual (Visual3d_TypeOfVisualization) – Return type: None
-
SetZClippingBackPlane
()¶ - Modifies the back Z-clipping plane. Category: Methods to modify the class definition Warning: Raises ZClippingDefinitionError if <BackPlane> is front of <FrontPlane> and ZClipping is ON.
Parameters: ABack (float) – Return type: None
-
SetZClippingFrontPlane
()¶ - Modifies the front Z-clipping plane. Category: Methods to modify the class definition Warning: Raises ZClippingDefinitionError if <BackPlane> is front of <FrontPlane> and ZClipping is ON.
Parameters: AFront (float) – Return type: None
-
SetZClippingOff
()¶ - Deactivates the Z-clipping planes defined by SetFrontPlane and SetBackPlane.
Return type: None
-
SetZClippingOn
()¶ - Activates the Z-clipping planes defined by SetZClippingFrontPlane and SetZClippingBackPlane. Category: Methods to modify the class definition Warning: Raises ZClippingDefinitionError if <BackPlane> is front of <FrontPlane>.
Return type: None
-
SurfaceDetail
()¶ Return type: Visual3d_TypeOfSurfaceDetail
-
TextureEnv
()¶ Return type: Handle_Graphic3d_TextureEnv
-
Visualization
()¶ - Returns the mode of visualization.
Return type: Visual3d_TypeOfVisualization
-
thisown
¶ The membership flag
-
class
Visual3d_HSequenceOfLight
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
Return type: None -
Append
()¶ Parameters: - anItem (Handle_Visual3d_Light &) –
- aSequence (Handle_Visual3d_HSequenceOfLight &) –
Return type: Return type:
-
ChangeSequence
()¶ Return type: Visual3d_SequenceOfLight
-
ChangeValue
()¶ Parameters: anIndex (int) – Return type: Handle_Visual3d_Light
-
GetHandle
()¶
-
InsertAfter
()¶ Parameters: - anIndex (int) –
- anItem (Handle_Visual3d_Light &) –
- anIndex –
- aSequence (Handle_Visual3d_HSequenceOfLight &) –
Return type: Return type:
-
InsertBefore
()¶ Parameters: - anIndex (int) –
- anItem (Handle_Visual3d_Light &) –
- anIndex –
- aSequence (Handle_Visual3d_HSequenceOfLight &) –
Return type: Return type:
-
Prepend
()¶ Parameters: - anItem (Handle_Visual3d_Light &) –
- aSequence (Handle_Visual3d_HSequenceOfLight &) –
Return type: Return type:
-
Remove
()¶ Parameters: Return type: Return type:
-
Sequence
()¶ Return type: Visual3d_SequenceOfLight
-
Split
()¶ Parameters: anIndex (int) – Return type: Handle_Visual3d_HSequenceOfLight
-
Value
()¶ Parameters: anIndex (int) – Return type: Handle_Visual3d_Light
-
thisown
¶ The membership flag
-
-
class
Visual3d_HSequenceOfView
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
Return type: None -
Append
()¶ Parameters: - anItem (Handle_Visual3d_View &) –
- aSequence (Handle_Visual3d_HSequenceOfView &) –
Return type: Return type:
-
ChangeSequence
()¶ Return type: Visual3d_SequenceOfView
-
ChangeValue
()¶ Parameters: anIndex (int) – Return type: Handle_Visual3d_View
-
GetHandle
()¶
-
InsertAfter
()¶ Parameters: - anIndex (int) –
- anItem (Handle_Visual3d_View &) –
- anIndex –
- aSequence (Handle_Visual3d_HSequenceOfView &) –
Return type: Return type:
-
InsertBefore
()¶ Parameters: - anIndex (int) –
- anItem (Handle_Visual3d_View &) –
- anIndex –
- aSequence (Handle_Visual3d_HSequenceOfView &) –
Return type: Return type:
-
Prepend
()¶ Parameters: - anItem (Handle_Visual3d_View &) –
- aSequence (Handle_Visual3d_HSequenceOfView &) –
Return type: Return type:
-
Remove
()¶ Parameters: Return type: Return type:
-
Sequence
()¶ Return type: Visual3d_SequenceOfView
-
Split
()¶ Parameters: anIndex (int) – Return type: Handle_Visual3d_HSequenceOfView
-
Value
()¶ Parameters: anIndex (int) – Return type: Handle_Visual3d_View
-
thisown
¶ The membership flag
-
-
class
Visual3d_Layer
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Creates a layer with the type <Atype>. if <AFlag> == Standard_True then the layer is ‘size dependent’. The mapping of the layer is dependent of each window’s size. if <AFlag> == Standard_False then the mapping of the layer is dependent of the highest window and the largest window of all the views of the viewer <AViewer>. When the viewer <AViewer> have only one view, the result will be the same with <AFlag> == Standard_False or <AFlag> == Standard_True.
Parameters: - AViewer (Handle_Visual3d_ViewManager &) –
- AType (Aspect_TypeOfLayer) – default value is Aspect_TOL_OVERLAY
- AFlag (bool) – default value is Standard_False
Return type: -
AddVertex
()¶ - Puts <X, Y> as a new point in the current primitive. If <AFlag> then it is a draw between last point and this point else it is a move between last point and this point.
Parameters: Return type:
-
BeginPolygon
()¶ - After this call, <self> is ready to receive a definition of a polygon with AddEdge().
Return type: None
-
BeginPolyline
()¶ - After this call, <self> is ready to receive a definition of a polyline with AddVertex().
Return type: None
-
CLayer
()¶ - Returns the associated C structure.
Return type: Aspect_CLayer2d
-
ClosePrimitive
()¶ - After this call, <self> stops the reception of a definition of a Begin… primitive.
Return type: None
-
DrawRectangle
()¶ - Draws the rectangle at position <X,Y>.
Parameters: Return type:
-
GetHandle
()¶
-
GetLayerItemList
()¶ Return type: Visual3d_NListOfLayerItem
-
SetColor
()¶ - Modifies the current color. Warning: No default color
Parameters: AColor (Quantity_Color &) – Return type: None
-
SetLineAttributes
()¶ - Modifies the current lines attributes. Warning: No default attributes
Parameters: - AType (Aspect_TypeOfLine) –
- AWidth (float) –
Return type:
-
SetOrtho
()¶ - Modifies the current coordinates system of the layer <self>.
Parameters: Return type:
-
SetTextAttributes
()¶ - Modifies the current texts attributes. <AFont> defines the name of the font to be used. <AType> defines the display type of the text. <AColor> defines the color of decal or subtitle background. To set the color of the text you can use the SetColor method. Warning: No default attributes
Parameters: - AFont (char *) –
- AType (Aspect_TypeOfDisplayText) –
- AColor (Quantity_Color &) –
Return type:
-
SetTransparency
()¶ - Modifies the current transparency. Warning: No default transparency
Parameters: ATransparency (Standard_ShortReal) – Return type: None
-
SetViewport
()¶ - Modifies the current viewport of the layer <self>.
Parameters: Return type:
-
TextSize
()¶ - Get the size of text. The attributes are given with respect to the plane of projection. <AHeight> : Height of text. (Relative to the Normalized Projection Coordinates (NPC) Space).
Parameters: - AText (char *) –
- AHeight (float) –
- AWidth (float &) –
- AnAscent (float &) –
- ADescent (float &) –
Return type:
-
Type
()¶ - Returns the type.
Return type: Aspect_TypeOfLayer
-
thisown
¶ The membership flag
-
class
Visual3d_LayerItem
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Creates a layer item
Return type: None -
ComputeLayerPrs
()¶ - virtual function for recompute 2D presentation (empty by default)
Return type: void
-
GetHandle
()¶
-
RedrawLayerPrs
()¶ - virtual function for recompute 2D presentation (empty by default)
Return type: void
-
SetNeedToRecompute
()¶ Parameters: NeedToRecompute (bool) – default value is Standard_True Return type: None
-
thisown
¶ The membership flag
-
class
Visual3d_Light
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Creates a light from default values. Light sources are created in a visualiser and are activated in one of its views. //! Type = TOLS_AMBIENT Color = WHITE
Return type: None - Creates an AMBIENT light source. Light sources are created in a visualiser and are activated in one of its views.
Parameters: Color (Quantity_Color &) – Return type: None - Creates a DIRECTIONAL light source. Light sources are created in a visualiser and are activated in one of its views. Warning: Raises LightDefinitionError if <Direction> is null.
Parameters: - Color (Quantity_Color &) –
- Direction (Graphic3d_Vector &) –
- Headlight (bool) – default value is Standard_False
Return type: - Creates a POSITIONAL light source. Light sources are created in a visualiser and are activated in one of its views. Warning: Raises LightDefinitionError if <Fact1> and <Fact2> are null. if <Fact1> is a negative value or greater than 1.0. if <Fact2> is a negative value or greater than 1.0.
Parameters: Return type: - Creates a SPOT light source. Light sources are created in a visualiser and are activated in one of its views. <Concentration> specifies the intensity distribution of the light. <AngleCone> specifies the angle (radians) of the cone created by the spot. the global attenuation is equal : 1 / (Fact1 + Fact2 * (norm(ObjectPosition - LightPosition))) Warning: Raises LightDefinitionError if <Direction> is null. if <Concentration> is a negative value or greater than 1.0. if <Fact1> and <Fact2> are null. if <Fact1> is a negative value or greater than 1.0. if <Fact2> is a negative value or greater than 1.0. if <AngleCone> is a negative value or greater than PI/2.
Parameters: Return type: -
CLight
()¶ - Returns the light defintion.
Return type: Graphic3d_CLight
-
Color
()¶ - Returns the colour of the light <self>.
Return type: Quantity_Color
-
GetHandle
()¶
-
LightType
()¶ - Returns the light type of <self>. //! TypeOfLightSource = TOLS_AMBIENT TOLS_DIRECTIONAL TOLS_POSITIONAL TOLS_SPOT
Return type: Visual3d_TypeOfLightSource
-
SetAngle
()¶ - Modifies the angle (radians) of the cone created by the spot. Works only on TOLS_SPOT lights. Category: Methods to modify the class definition Warning: Raises LightDefinitionError if the type of the light is not TOLS_SPOT. if <AngleCone> is a negative value or greater than PI/2.
Parameters: AngleCone (float) – Return type: None
-
SetAttenuation1
()¶ - Modifies the attenuation factor of the light. Works only on the TOLS_POSITIONAL and TOLS_SPOT lights. Category: Methods to modify the class definition Warning: Raises LightDefinitionError if the type of the light is not TOLS_SPOT or TOLS_POSITIONAL. if <Fact1> is a negative value or greater than 1.0.
Parameters: Fact1 (float) – Return type: None
-
SetAttenuation2
()¶ - Modifies the attenuation factor of the light. Works only on the TOLS_POSITIONAL and TOLS_SPOT lights. Category: Methods to modify the class definition Warning: Raises LightDefinitionError if the type of the light is not TOLS_POSITIONAL or TOLS_SPOT. if <Fact2> is a negative value or greater than 1.0..
Parameters: Fact2 (float) – Return type: None
-
SetColor
()¶ - Modifies the colour of the light.
Parameters: Color (Quantity_Color &) – Return type: None
-
SetConcentration
()¶ - Modifies the intensity distribution of the light. Works only on the TOLS_SPOT lights. Category: Methods to modify the class definition Warning: Raises LightDefinitionError if the type of the light is not TOLS_SPOT. if <Concentration> is a negative value or greater than 1.0.
Parameters: Concentration (float) – Return type: None
-
SetDirection
()¶ - Modifies the light direction. Works only on the TOLS_DIRECTIONAL and TOLS_SPOT lights. Default z Category: Methods to modify the class definition Warning: Raises LightDefinitionError if the type of the light is not TOLS_DIRECTIONAL or TOLS_SPOT. if <Direction> is null.
Parameters: Direction (Graphic3d_Vector &) – Return type: None
-
SetPosition
()¶ - Modifies the position of the light. Works only on the TOLS_POSITIONAL and TOLS_SPOT lights. Category: Methods to modify the class definition Warning: Raises LightDefinitionError if the type of the light is not TOLS_POSITIONAL or TOLS_SPOT.
Parameters: Position (Graphic3d_Vertex &) – Return type: None
-
Values
()¶ - Returns the definition of <self> if <self> is a light source of the TOLS_AMBIENT type. Category: Inquire methods Warning: Raises LightDefinitionError if the type of the light is not TOLS_AMBIENT.
Parameters: Color (Quantity_Color &) – Return type: None - Returns the definition of <self> if <self> is a light source of the TOLS_DIRECTIONAL type. Category: Inquire methods Warning: Raises LightDefinitionError if the type of the light is not TOLS_DIRECTIONAL.
Parameters: - Color (Quantity_Color &) –
- Direction (Graphic3d_Vector &) –
Return type: - Returns the definition of <self> if <self> is a light source of the TOLS_POSITIONAL type. Category: Inquire methods Warning: Raises LightDefinitionError if the type of the light is not TOLS_POSITIONAL.
Parameters: - Color (Quantity_Color &) –
- Position (Graphic3d_Vertex &) –
- Fact1 (float &) –
- Fact2 (float &) –
Return type: - Returns the definition of <self> if <self> is a light source of the TOLS_SPOT type. Category: Inquire methods Warning: Raises LightDefinitionError if the type of the light is not TOLS_SPOT.
Parameters: - Color (Quantity_Color &) –
- Position (Graphic3d_Vertex &) –
- Direction (Graphic3d_Vector &) –
- Concentration (float &) –
- Fact1 (float &) –
- Fact2 (float &) –
- AngleCone (float &) –
Return type:
-
thisown
¶ The membership flag
-
class
Visual3d_SequenceNodeOfSequenceOfLight
(*args)¶ Bases:
OCC.TCollection.TCollection_SeqNode
Parameters: - I (Handle_Visual3d_Light &) –
- n (TCollection_SeqNodePtr &) –
- p (TCollection_SeqNodePtr &) –
Return type: -
GetHandle
()¶
-
Value
()¶ Return type: Handle_Visual3d_Light
-
thisown
¶ The membership flag
-
class
Visual3d_SequenceNodeOfSequenceOfView
(*args)¶ Bases:
OCC.TCollection.TCollection_SeqNode
Parameters: - I (Handle_Visual3d_View &) –
- n (TCollection_SeqNodePtr &) –
- p (TCollection_SeqNodePtr &) –
Return type: -
GetHandle
()¶
-
Value
()¶ Return type: Handle_Visual3d_View
-
thisown
¶ The membership flag
-
class
Visual3d_SequenceOfLight
(*args)¶ Bases:
OCC.TCollection.TCollection_BaseSequence
Return type: None Parameters: Other (Visual3d_SequenceOfLight &) – Return type: None -
Append
()¶ Parameters: - T (Handle_Visual3d_Light &) –
- S (Visual3d_SequenceOfLight &) –
Return type: Return type:
-
Assign
()¶ Parameters: Other (Visual3d_SequenceOfLight &) – Return type: Visual3d_SequenceOfLight
-
ChangeValue
()¶ Parameters: Index (int) – Return type: Handle_Visual3d_Light
-
First
()¶ Return type: Handle_Visual3d_Light
-
InsertAfter
()¶ Parameters: - Index (int) –
- T (Handle_Visual3d_Light &) –
- Index –
- S (Visual3d_SequenceOfLight &) –
Return type: Return type:
-
InsertBefore
()¶ Parameters: - Index (int) –
- T (Handle_Visual3d_Light &) –
- Index –
- S (Visual3d_SequenceOfLight &) –
Return type: Return type:
-
Last
()¶ Return type: Handle_Visual3d_Light
-
Prepend
()¶ Parameters: - T (Handle_Visual3d_Light &) –
- S (Visual3d_SequenceOfLight &) –
Return type: Return type:
-
Remove
()¶ Parameters: Return type: Return type:
-
Set
()¶ Parameters: Other (Visual3d_SequenceOfLight &) – Return type: Visual3d_SequenceOfLight
-
Value
()¶ Parameters: Index (int) – Return type: Handle_Visual3d_Light
-
thisown
¶ The membership flag
-
-
class
Visual3d_SequenceOfView
(*args)¶ Bases:
OCC.TCollection.TCollection_BaseSequence
Return type: None Parameters: Other (Visual3d_SequenceOfView &) – Return type: None -
Append
()¶ Parameters: - T (Handle_Visual3d_View &) –
- S (Visual3d_SequenceOfView &) –
Return type: Return type:
-
Assign
()¶ Parameters: Other (Visual3d_SequenceOfView &) – Return type: Visual3d_SequenceOfView
-
ChangeValue
()¶ Parameters: Index (int) – Return type: Handle_Visual3d_View
-
First
()¶ Return type: Handle_Visual3d_View
-
InsertAfter
()¶ Parameters: - Index (int) –
- T (Handle_Visual3d_View &) –
- Index –
- S (Visual3d_SequenceOfView &) –
Return type: Return type:
-
InsertBefore
()¶ Parameters: - Index (int) –
- T (Handle_Visual3d_View &) –
- Index –
- S (Visual3d_SequenceOfView &) –
Return type: Return type:
-
Last
()¶ Return type: Handle_Visual3d_View
-
Prepend
()¶ Parameters: - T (Handle_Visual3d_View &) –
- S (Visual3d_SequenceOfView &) –
Return type: Return type:
-
Remove
()¶ Parameters: Return type: Return type:
-
Set
()¶ Parameters: Other (Visual3d_SequenceOfView &) – Return type: Visual3d_SequenceOfView
-
Value
()¶ Parameters: Index (int) – Return type: Handle_Visual3d_View
-
thisown
¶ The membership flag
-
-
class
Visual3d_View
(*args)¶ Bases:
OCC.Graphic3d.Graphic3d_DataStructureManager
- Creates a view in the viewer <AManager> with a default orientation and a default mapping.
Parameters: AManager (Handle_Visual3d_ViewManager &) – Return type: None -
Activate
()¶ - Activates the view <self>. Map the associated window on the screen and post the view in this window. Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn’t defined.
Return type: None
-
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
-
BackFacingModel
()¶ - Returns current state of the back faces display
Return type: Visual3d_TypeOfBackfacingModel
-
Background
()¶ - Returns the value of the default window background.
Return type: Aspect_Background
-
BufferDump
()¶ - Dump active rendering buffer into specified memory buffer.
Parameters: - theImage (Image_PixMap &) –
- theBufferType (Graphic3d_BufferType &) –
Return type:
-
CView
()¶ - Returns the c structure associated to <self>.
Return type: Standard_Address
-
Camera
()¶ - returns the camera of <self>.
Return type: Handle_Graphic3d_Camera
-
ChangeHiddenObjects
()¶ - Returns map of objects hidden within this specific view (not viewer-wise).
Return type: Handle_Graphic3d_NMapOfTransient
-
ClearImmediate
()¶ - Clears list of immediate presentations. returns true if list was not empty
Return type: bool
-
ContainsFacet
()¶ - Returns Standard_True if one of the structures displayed in the view <self> contains Polygons, Triangles or Quadrangles.
Return type: bool - Returns Standard_True if one of the structures in the set <ASet> contains Polygons, Triangles or Quadrangles.
Parameters: ASet (Graphic3d_MapOfStructure &) – Return type: bool
-
Context
()¶ - Returns the current context of the view <self>.
Return type: Visual3d_ContextView
-
Deactivate
()¶ - Deactivates the view <self>. Unmap the associated window on the screen and unpost the view in this window. Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn’t defined.
Return type: None
-
DefaultCamera
()¶ - returns the default camera of <self>.
Return type: Handle_Graphic3d_Camera
-
DisplayImmediate
()¶ - Add structure to the list of immediate presentations. returns true if structure has not been registered in this view
Parameters: - theStructure (Handle_Graphic3d_Structure &) –
- theIsSingleView (bool) – default value is Standard_True
Return type:
-
DisplayedStructures
()¶ - Returns the set of structures displayed in the view <self>.
Parameters: SG (Graphic3d_MapOfStructure &) – Return type: None
-
EnableGLLight
()¶ - turns on/off opengl lighting, currently used in triedron displaying
Parameters: enable (bool) – Return type: None
-
EraseImmediate
()¶ - Removes the structure from the list of immediate presentations. returns true if structure has been registered in view
Parameters: theStructure (Handle_Graphic3d_Structure &) – Return type: bool
-
Export
()¶ - Export scene into the one of the Vector graphics formats (SVG, PS, PDF…). In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer). Notice however that results may differ a lot and do not contain some elements.
Parameters: - theFileName (char *) –
- theFormat (Graphic3d_ExportFormat) –
- theSortType (Graphic3d_SortType) – default value is Graphic3d_ST_BSP_Tree
- thePrecision (float) – default value is 0.005
- theProgressBarFunc (Standard_Address) – default value is NULL
- theProgressObject (Standard_Address) – default value is NULL
Return type:
-
FBOChangeViewport
()¶ - Change offscreen FBO viewport.
Parameters: Return type:
-
FBOCreate
()¶ - Generate offscreen FBO in the graphic library
Parameters: Return type: Graphic3d_PtrFrameBuffer
-
FBOGetDimensions
()¶ - Read offscreen FBO configuration.
Parameters: - fboPtr (Graphic3d_PtrFrameBuffer) –
- width (int &) –
- height (int &) –
- widthMax (int &) –
- heightMax (int &) –
Return type:
-
FBORelease
()¶ - Remove offscreen FBO from the graphic library
Parameters: fboPtr (Graphic3d_PtrFrameBuffer &) – Return type: None
-
GetGraduatedTrihedron
()¶ - Returns data of a graduated trihedron
Return type: Graphic3d_GraduatedTrihedron
-
GetHandle
()¶
-
GradientBackground
()¶ - Returns the value of the window background.
Return type: Aspect_GradientBackground
-
GraduatedTrihedronDisplay
()¶ - Displays a graduated trihedron.
Parameters: theTrigedronData (Graphic3d_GraduatedTrihedron &) – Return type: None
-
GraphicDriver
()¶ - Returns the associated GraphicDriver.
Return type: Handle_Graphic3d_GraphicDriver
-
HiddenObjects
()¶ - Returns map of objects hidden within this specific view (not viewer-wise).
Return type: Handle_Graphic3d_NMapOfTransient
-
IsDeleted
()¶ - Returns Standard_True is the view <self> is deleted. <self> is deleted after the call Remove (me).
Return type: bool
-
IsGLLightEnabled
()¶ - returns the current state of the gl lighting currently used in triedron displaying
Return type: bool
-
MinMaxValues
()¶ - Returns the coordinates of the boundary box of all structures displayed in the view <self>. If <theToIgnoreInfiniteFlag> is True, then the boundary box also includes minimum and maximum limits of graphical elements forming parts of infinite structures.
Parameters: theToIgnoreInfiniteFlag (bool) – default value is Standard_False Return type: Bnd_Box - Returns the coordinates of the boundary box of all structures in the set <theSet>. If <theToIgnoreInfiniteFlag> is True, then the boundary box also includes minimum and maximum limits of graphical elements forming parts of infinite structures.
Parameters: - theSet (Graphic3d_MapOfStructure &) –
- theToIgnoreInfiniteFlag (bool) – default value is Standard_False
Return type:
-
NumberOfDisplayedStructures
()¶ - Returns number of displayed structures in the view <self>.
Return type: int
-
OverLayer
()¶ - Returns the underlay of the view <self>.
Return type: Handle_Visual3d_Layer
-
PlaneLimit
()¶ - Returns the MAX number of clipping planes associated to the view <self>.
Return type: int
-
Projects
()¶ - Returns the coordinates of the projection of the 3d coordinates <AX>, <AY>, <AZ>.
Parameters: Return type:
-
ReCompute
()¶ - Computes the new presentation of the structure <AStructure> displayed in <self> with the type Graphic3d_TOS_COMPUTED.
Parameters: AStructure (Handle_Graphic3d_Structure &) – Return type: None
-
ReadDepths
()¶ - Reads depths of shown pixels of the given rectangle
Parameters: Return type:
-
Redraw
()¶ - Updates screen in all cases.
Return type: None - Updates screen area in all cases. area is given by his xy min corner and size in pixel coordinates
Parameters: Return type: - Updates screen in all cases.
Parameters: - AnUnderLayer (Handle_Visual3d_Layer &) –
- AnOverLayer (Handle_Visual3d_Layer &) –
Return type: - Updates screen area in all cases. area is given by his xy min corner and size in pixel coordinates
Parameters: Return type:
-
RedrawImmediate
()¶ - Updates layer of immediate presentations.
Return type: None - Updates layer of immediate presentations.
Parameters: - theUnderLayer (Handle_Visual3d_Layer &) –
- theOverLayer (Handle_Visual3d_Layer &) –
Return type:
-
Remove
()¶ - Deletes and erases the view <self>. Warning: No more graphic operations in <self> after this call.
Return type: None
-
Resized
()¶ - Updates the view <self> after the modification of the associated window. Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn’t defined.
Return type: 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.
Parameters: Return type:
-
SetBackFacingModel
()¶ - Manages display of the back faces
Parameters: aModel (Visual3d_TypeOfBackfacingModel) – Return type: None
-
SetBackground
()¶ - Modifies the default window background. Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn’t defined.
Parameters: ABack (Aspect_Background &) – Return type: None
-
SetBackgroundImage
()¶ - Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn’t defined.
Parameters: - FileName (char *) –
- FillStyle (Aspect_FillMethod) –
- update (bool) –
Return type:
-
SetBgGradientStyle
()¶ - Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn’t defined.
Parameters: - FillStyle (Aspect_GradientFillMethod) –
- update (bool) –
Return type:
-
SetBgImageStyle
()¶ - Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn’t defined.
Parameters: - FillStyle (Aspect_FillMethod) –
- update (bool) –
Return type:
-
SetCamera
()¶ - Set camera object to provide orientation and projection matrices for graphic driver.
Parameters: theCamera (Handle_Graphic3d_Camera &) – Return type: None
-
SetComputedMode
()¶ - Switches computed HLR mode in the view
Parameters: aMode (bool) – Return type: None
-
SetContext
()¶ - Sets the context <CTX> in the view <self>.
Parameters: CTX (Visual3d_ContextView &) – Return type: None
-
SetGradientBackground
()¶ - Modifies the gradient window background. Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn’t defined.
Parameters: - ABack (Aspect_GradientBackground &) –
- update (bool) –
Return type:
-
SetViewMappingDefault
()¶ - Saves the current mapping which will be the reference value for the reset of the mapping done by the ViewmappingReset method.
Return type: None
-
SetViewOrientationDefault
()¶ - Saves the current orientation which will be the reference value for the reset of the orientation done by the ViewOrientationReset method.
Return type: None
-
SetWindow
()¶ - Associates the window <AWindow> to the view <self>. No new association if the window is already defined. Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if it is impossible to associate a view and a window. (association already done or another problem) Modifies the viewmapping of the associated view when it calls the SetRatio method. //! After this call, each view is mapped in an unique window. //! Programming example : //! An example when we have 1 view and 1 window ——————————————- //! Handle_Aspect_DisplayConnection aDisplayConnection; //! // Display connection initialization only needed on Linux platform // and on Mac OS X, in cases when you use Xlib for windows drawing. aDisplayConnection = new Aspect_DisplayConnection(); //! // Graphic driver initialization Handle_Graphic3d_GraphicDriver aGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection); //! // Define a view manager Handle_Visual3d_ViewManager aVisualManager = new Visual3d_ViewManager (aGraphicDriver); //! // Define a view Handle_Visual3d_View aView = new Visual3d_View (aVisaulManager); //! // Define a window Handle_Xw_Window aWindow = new Xw_Window (aDisplayConnection, ‘Graphic View 1’, 0.695, 0.695, 0.600, 0.600, Quantity_NOC_MATRAGRAY); //! // Associate the view and the window aView->SetWindow (aWindow); //! // Map the window aWindow->Map (); //! // Activate the view aView->Activate ();
Parameters: AWindow (Handle_Aspect_Window &) – Return type: None - Associates the window <AWindow> and context <AContext> to the view <self>. If <AContext> is not NULL the graphic context is used directly to draw something in this view. Otherwise an internal 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. No new association if the window is already defined. Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if it is impossible to associate a view and a window. (association already done or another problem) Modifies the viewmapping of the associated view when it calls the SetRatio method. //! After this call, each view is mapped in an unique window.
Parameters: - AWindow (Handle_Aspect_Window &) –
- AContext (Aspect_RenderingContext) –
- ADisplayCB (Aspect_GraphicCallbackProc &) –
- AClientData (Standard_Address) –
Return type:
-
SetZBufferActivity
()¶ - Activates the ZBuffer if the integer <AnActivity> is equal to 1. Deactivates the ZBuffer if the integer <AnActivity> is equal to 0. If the integer <AnActivity> is equal to -1 then - the ZBuffer is activated if me->Context ().Visualization () == Visual3d_TOV_SHADING - the ZBuffer is deactivated if me->Context ().Visualization () == Visual3d_TOV_WIREFRAME
Parameters: AnActivity (int) – Return type: None
-
TriedronDisplay
()¶ - Display of the Triedron. Initialize position, color and length of Triedron axes. The scale is a percent of the window width. If AsWireframe is False triedron is shown in shaded mode AColor is not considered for ZBUFFER mode
Parameters: Return type:
-
TriedronEcho
()¶ - Highlights the echo zone of the Triedron.
Parameters: AType (Aspect_TypeOfTriedronEcho) – default value is Aspect_TOTE_NONE Return type: None
-
UnderLayer
()¶ - Returns the underlay of the view <self>.
Return type: Handle_Visual3d_Layer
-
Update
()¶ - Updates screen in function of modifications of the structures.
Parameters: theUpdateMode (Aspect_TypeOfUpdate) – Return type: None - Updates screen in function of modifications of the structures.
Parameters: - AnUnderLayer (Handle_Visual3d_Layer &) –
- AnOverLayer (Handle_Visual3d_Layer &) –
Return type:
-
ViewManager
()¶ - Returns the view manager handle which manage this view
Return type: Handle_Visual3d_ViewManager
-
ViewMappingReset
()¶ - Sets the value of the mapping to be the same as the mapping saved by the SetViewMappingDefaut method.
Return type: None
-
ViewOrientationReset
()¶ - Sets the value of the orientation to be the same as the orientation saved by the SetViewOrientationDefaut method.
Return type: None
-
Window
()¶ - Returns the window associated to the view <self>. Warning: Raises ViewDefinitionError if the associated window isn’t defined.
Return type: Handle_Aspect_Window
-
ZBufferIsActivated
()¶ - Returns Standard_True if the ZBuffer is activated in the view <self> and Standard_False if not.
Return type: bool
-
ZBufferTriedronSetup
()¶ - Customization of the ZBUFFER Triedron. Initializes Colors of X Y and axis Scale ratio defines decreasing of trihedron size when its position is out of a View
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:
-
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
-
thisown
¶ The membership flag
-
class
Visual3d_ViewManager
(*args)¶ Bases:
OCC.Graphic3d.Graphic3d_StructureManager
- Creates a 3D visualizer. Currently creating of more than 100 viewer instances is not supported and leads to InitializationError and initialisation failure. This limitation might be addressed in some future OCCT releases. //! Category: Methods to modify the class definition
Parameters: theDriver (Handle_Graphic3d_GraphicDriver &) – Return type: None -
ActivatedView
()¶ - Returns the group of views activated in the visualiser <self>.
Return type: Handle_Visual3d_HSequenceOfView
-
DefinedViews
()¶ - Returns the group of views defined in the visualiser <self>.
Return type: Visual3d_SequenceOfView
-
Erase
()¶ - Erases all of the structures displayed in the visualiser <self>.
Return type: None - Erases the structure <AStructure>.
Parameters: AStructure (Handle_Graphic3d_Structure &) – Return type: None
-
GetHandle
()¶
-
Identification
()¶ - Returns : a new identification number for a new view in the visualiser.
Parameters: AView (Handle_Visual3d_View &) – Return type: int - Returns the structure with the identification number <AId>.
Parameters: AId (int) – Return type: Handle_Graphic3d_Structure - Returns the identification number of the visualiser.
Return type: int
-
MaxNumOfViews
()¶ - Returns the theoretical maximum number of definable views in the view manager <self>. Warning: It’s not possible to accept an infinite number of definable views because each view must have an identification and we have different view managers.
Return type: int
-
OverLayer
()¶ - Returns the underlay of the viewer <self>.
Return type: Handle_Visual3d_Layer
-
ReCompute
()¶ - Forces a new construction of the structure <AStructure> if <AStructure> is displayed and TOS_COMPUTED.
Parameters: AStructure (Handle_Graphic3d_Structure &) – Return type: None - Forces a new construction of the structure <AStructure> if <AStructure> is displayed in <AProjector> and TOS_COMPUTED.
Parameters: - AStructure (Handle_Graphic3d_Structure &) –
- AProjector (Handle_Graphic3d_DataStructureManager &) –
Return type:
-
SetZBufferAuto
()¶ - if <AFlag> is Standard_True then the zbuffer activity is managed automatically. Default Standard_False
Parameters: AFlag (bool) – Return type: None
-
UnHighlight
()¶ - Suppress the highlighting on all the structures.
Return type: None - Suppress the highlighting on the structure <AStructure>.
Parameters: AStructure (Handle_Graphic3d_Structure &) – Return type: None
-
UnIdentification
()¶ - Release a unique ID of the view reserved for the view on its creation.
Parameters: aViewId (int) – Return type: None
-
UnderLayer
()¶ - Returns the underlay of the viewer <self>.
Return type: Handle_Visual3d_Layer
-
ViewExists
()¶ - Returns Standard_True if the view associated to the window <AWindow> exists and is activated. <TheViewId> contains the internal identification of the associated view.
Parameters: - AWindow (Handle_Aspect_Window &) –
- TheCView (Graphic3d_CView &) –
Return type:
-
ZBufferAuto
()¶ - Returns Standard_True if the zbuffer activity is managed automatically. Default Standard_False
Return type: bool
-
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