veux.render#
- veux.render(sam_file, res_file=None, ndf=6, canvas=None, show=None, hide=None, verbose=False, vertical=2, displaced=None, reference=None, **opts)#
Provides a quick and convenient way to render models.
Parameters#
- modelstr, dict, or Model
The
model
parameter can be of several types:str: Treated as a file path. Supported file formats are
.json
and.tcl
.dict: A dictionary representation of the model.
Model: An instance of the
Model
class from the sees Python package. See the documentation for details.
- res_filestr, optional
Path to the results file for displacements.
- ndfint, optional
Number of degrees of freedom. Default is
6
.- showlist, optional
List of elements to show.
- hidelist, optional
List of elements to hide.
- verbosebool, optional
If True, prints detailed configuration information. Default is
False
.- verticalint, optional
Vertical configuration parameter. Default is
2
.- displacedlist, optional
List of displaced elements.
- referencelist, optional
List of reference elements.
- canvasstr, optional
The rendering backend to use. Options are:
"gltf"
(default): Produces high-quality renderings. Files can be saved as.html
or.glb
..glb
is recommended for 3D object portability."plotly"
: Best for model debugging. Includes detailed annotations (e.g., node/element numbers, properties) but lower visual quality thangltf
."matplotlib"
: Generates.png
files programmatically. Note that renderings are lower quality compared togltf
.
Notes#
This function provides a quick and convenient way to render models. For more detailed rendering control, the create_artist function should be used.
To render a model directly from Python:
artist = veux.render(model, canvas=canvas)
Returns#
- artistArtist
An object representing the rendered model. Can be used to view or save the rendering.