Screen annotations

class postprocess.xcVtk.screen_annotation.ScreenAnnotation

Bases: object

captionWidth = 80
getVtkCornerAnnotation(caption='')
lowerLeft = 0
upperLeft = 2
upperRight = 3

Graphic base

Display nice images of the model.

class postprocess.xcVtk.vtk_graphic_base.CameraParameters(viewNm='XYZPos', hCamF=1.0)

Bases: object

Provides the parameters to define the camera.

Variables:
  • viewName – name of the view that contains the renderer (defaults to “XYZPos”)
  • viewUpVc – vector defined as [x,y,z] to orient the view. This vector of the model is placed in vertical orientation in the display
  • posCVc – vector defined as [x,y,z] that points to the camera position
  • zoom – (defaults to 1.0)
  • hCamFct – factor that applies to the height of the camera position in order to change perspective of isometric views (defaults to 1, usual values 0.1 to 10)
defineViewParametersFromViewName()

Sets the values of the view parameters from the following predefined viewNames: “ZPos”,”ZNeg”,”YPos”,”YNeg”,”XPos”,”XNeg”,”XYZPos” Zpos: View from positive Z axis (Z+) Zneg: View from negative Z axis (Z-) Ypos: View from positive Y axis (Y+) Yneg: View from negative Y axis (Y-) Xpos: View from positive X axis (X+) Xneg: View from negative X axis (X-) XYZPos or +X+Y+Z: View from point (1,1,1) +X+Y-Z: View from point (1,1,-1) +X-Y+Z: View from point (1,-1,1) +X-Y-Z: View from point (1,-1,-1) -X+Y+Z: View from point (-1,1,1) -X+Y-Z: View from point (-1,1,-1) -X-Y+Z: View from point (-1,-1,1) XYZNeg or -X-Y-Z: View from point (-1,-1,-1)

setView(vtkCamera)

Sets the camera parameters.

Parameters:vtkCamera – VTK camera object whose parameters will be changed according to the information stored in this object.
class postprocess.xcVtk.vtk_graphic_base.DisplaySettings

Bases: object

Provides the variables to define the output device.

Variables:
  • renderer – specification of renderer. A renderer is an object that controls the rendering process for objects. Rendering is the process of converting geometry, a specification for lights, and a camera view into an image. (defaults to None)
  • renWin – rendering window (defaults to None). A rendering window is a window in a graphical user interface where renderers draw their images.
  • windowWidth – resolution expresed in pixels in the width direction of the window (defaults to 800)
  • windowHeight – resolution expresed in pixels in the height direction of the window (defaults to 600)
  • cameraParameters – parameters that define the camera position, zoom, etc.
  • bgRComp – background color red component (defaults to 0.65)
  • bgGComp – background color green component (defaults to 0.65)
  • bgBComp – background color blue component (defaults to 0.65)
closeWindow(iren)

Close the current render window.

displayGrid(caption='')

Displays the grid in the output device

Parameters:caption – caption to display with the scene.
displayScene(caption='', fileName=None)

Displaying scene

Parameters:
  • caption – caption to display with the scene.
  • fileName – name of the image file, in none -> screen window.
muestraEscena()
plot(fileName)

Plots window contents

Parameters:fileName – name of the image file, in none -> screen window.
setView()

Sets the view

setupAxes()

Add an vtkAxesActor to the renderer.

setupGrid(xcSet)

Parameters: xcSet: set to be represented

setupWindow(caption='XC window')

sets the rendering window. A rendering window is a window in a graphical user interface where renderers draw their images.

setupWindowInteractor()

sets the window interactor, which provides a platform-independent interaction mechanism for mouse/key/time events.

class postprocess.xcVtk.vtk_graphic_base.RecordDefGrid

Bases: object

Provide the variables involved in the VTK grid representation

Variables:
  • xcSet – set to be represented
  • entToLabel – entities to be labeled (defaults to “nodes”)
  • cellType – specifies the type of data cells (defaults to “nil”). Data cells are simple topological elements like points, lines, polygons and tetrahedra of which visualization data sets are composed.
  • uGrid – unstructure grid (defaults to None). An unstructure grid is a concrete implementation of a vtk data set; represents any combination of any cell types. This includes 0D (e.g. points), 1D (e.g., lines, polylines), 2D (e.g., triangles, polygons), and 3D (e.g., hexahedron, tetrahedron, polyhedron, etc.).
getDiagonalLength()

Return the length of the diagonal of the bounding box.

getGridBND()

Returns the grid boundary

getSetBND()

Returns the set boundary

setupSet(setToDisplay)

Prepares the set to be displayed.