exporter module

Python wrapper for the native VTFX exporter.

class exporter.Exporter(fe_parts, vis_parts, lib_path, vtfx_path=None)[source]

Bases: object

This class provides functionality for exporting fedem animations to Ceetron CUG format.

Parameters:
fe_partsdict

Dictionary of finite element parts to include in visualization

vis_partsdict

Dictionary of visualization/vrml parts to include in visualization

lib_pathstr

Absolute path to the shared object library vtfxExporter.so

vtfx_pathstr, default=None

Absolute path to vtfx-file, use a temporary file if None

Methods

do_step:

Executes a step of visualization export with the provided input data

clean:

Converts temporary generated vtfx-file to CUG database and cleans up

clean(time_step, lib_dir, out_dir=None, cug_path='/usr/bin/CugComposer')[source]

Clears all data about included FE-parts and frs-files, and removes all transformation, stress and deformation results. Closes the vtfx-file and converts it to a CUG database.

Parameters:
time_stepdouble

Time step to use for animation speed

lib_dirstr

Absolute path to app location

out_dirstr, default=None

Absolute path for output folder of the CUG database If None, CUG data is not generated and the vtfx-file is retained

cug_pathstr, default=”/usr/bin/CugComposer”

Absolute path to Ceetron CUG composer executable

do_step(time, transformation_in, deformation_in, stress_in)[source]

Execute a step of visualization export with the provided input data.

Parameters:
timefloat

Simulation time

transformation_inlist of c_double

Array of transformation data from the fedem solver

deformation_indict

Arrays of part deformation data from the fedem solver

stress_indict

Arrays of part stress data from the fedem solver

exception exporter.ExporterException(rc=0)[source]

Bases: Exception

General exception-type for exporter exceptions.

Parameters:
rcint, default=0

Return code