GeometryVisualization

The GeometryVisualization provides the class definition for the geometry visualization of the model. It is based on the pythonocc library and provides simple methods for the visualization.

Class Definition

class gmshModel.Visualization.GeometryVisualization.GeometryVisualization(model=None)[source]

Bases: object

Class for Gmsh model geometry visualization

This class visualizes the geometry of a given GmshModel using the PYTHONOCC library. It provides a simple method to visualize the model geometry by storing the geometric model information into a temporary “.brep”-file which is read by PYTHONOCC.

Attributes:

model: GmshModel object instance

model instance for which the geometry has to be displayed

renderer: renderer object instance

instance of a rendering class

groupColors: list of PYTHONOCC Quantity_Colors

colors used for the visualization of the individual physical model groups

lineColor: PYTHONOCC Quantity_Color

color used for the cisualization of lines (especially in wireframe mode)

close()[source]

Method to close the current rendering window

resetView()[source]

Method to reset the view

setViewX()[source]

Method to set the view to a plane with normal in x-direction

setViewY()[source]

Method to set the view to a plane with normal in y-direction

setViewZ()[source]

Method to set the view to a plane with normal in z-direction

visualizeGeometry()[source]

Main method for the geometry visualization

Within this method, the geometry of the GmshModel instance is visualized. A temporary geometry file is created and opened using the PYTHONOCC module.