-
-
Notifications
You must be signed in to change notification settings - Fork 96
7. Visualization
Model visualization is provided using the Visualization Toolkit (VTK) by Kitware. In order to use the visualization tools in PyNite you'll need to install the appropriate VTK package for your version of Python. Using pip install vtk
is a good way to make sure you get the right package installed. VTK requires a 64 bit version of Python. VTK is primarily a C++ library, but it has been wrapped for Python. There are currently no wrappers for Python 3.8, but it is available for 3.7. VTK was selected because it is made for scientific and engineering visualization, it's BSD licensed, and used by many reputable organizations. It is extensively documented and has a robust community of supporters, including Sandia National Laboratories.
Visualization is a useful tool for checking input and output. You can visualize your models in 3D by importing the Visualization
script and running the RenderModel
method.
Syntax:
RenderModel(model, text_height=5, deformed_shape=False, deformed_scale=30, render_loads=True, combo_name='Combo 1', case=None):
model : FEModel3D
The model to be rendered.
text_height : number
The `textHeight` argument can be used to set the height of annotations and nodes in the rendering, depending on which unit system your model is based on. `textHeight` defaults to `5`, meaning 5 model length units.
deformed_shape : boolean
Indicates whether the deformed shape should be rendered.
deformed_scale : number
The scale to be used to magnify the deflected shape.
render_loads : boolean
Indicates whether loads should be rendered.
combo_name : string
The name of the load combination to be rendered.
case : string
The name of the load case to be rendered. Note that if both combo_name and case are specified, combo_name will be ignored. Deformed shapes cannot be rendered if case is specified, as only load combinations get solved.