Search the documentation
Enter at least 2 characters
Enter at least 2 characters
![]() |
CAE Fidesys 9.0 Documentation |
Fidesys Application Programming Interface (API) for Python provides methods that allow Fidesys to be scripted to automatically to create meshes and geometry for complex models. It can be used to generate models for parametric studies where either geometric or mesh parameters are changed. It also provides archival capabilities to recreate models without having to store large datasets.
The Fidesys Python API presents some of the most commonly used commands. The graphical user interface for Fidesys is implemented using the C++ version of these commands. These commands are maintained, used, tested, and being developed.
The API is designed as a read-only interface. All modifications to Fidesys must be completed by executing Fidesys commands. This is done using the cmd method. To do this, you can use both the fidesys module: fidesys.cmd and the cubit module: cubit.cmd.
#! python
x = 10
y = 12
z = 7
cubit.cmd(f'brick x {x} y {y} z {z}')
id = cubit.get_last_id('volume')
cubit.cmd(f'color volume {id} rgb .5 1.0 1.0')
or
#! python
x = 10
y = 12
z = 7
fidesys.cmd(f'brick x {x} y {y} z {z}')
id = cubit.get_last_id('volume')
fidesys.cmd(f'color volume {id} rgb .5 1.0 1.0')
The API has a number of functions (working through the cubit module) that are not presented here, but they can be found in Appendix. Many of the skipped commands can be implemented using the commands presented here. For example, there is an API function to get the hexahedral elements in a volume. Most users should prefer the command parse_cubit_list. For example,
hexes = cubit.parse_cubit_list("hex", "in volume 1")
In addition to the method based API there are also Fidesys objects. Only the query methods are documented here. The object modification methods are not supported.
The API is documented in the following sections.