The utils.py module#

Summary#

bgr_to_rgb_tuple

Convert bgr integer to rgb tuple.

get_nodes_and_coords

Extract the nodes and coordinates from the TriTessellationNode.

get_scene

Get the scene of the model.

Description#

Common plotting utilities.

Module detail#

utils.bgr_to_rgb_tuple(bgr_int: int) Tuple[int, int, int]#

Convert bgr integer to rgb tuple.

utils.get_nodes_and_coords(tri_tessellation: Ansys.Mechanical.Scenegraph.TriTessellationNode)#

Extract the nodes and coordinates from the TriTessellationNode.

The TriTessellationNode contains “Coordinates” and “Indices” that are flat arrays. This function converts them to numpy arrays

utils.get_scene(app: ansys.mechanical.core.embedding.App) Ansys.Mechanical.Scenegraph.GroupNode#

Get the scene of the model.