releso.mesh.MeshExporter
- class releso.mesh.MeshExporter(*, save_location: Path, logger_name: str | None = None, format: Literal['mixd'] = 'mixd', export_path: str | Path)
Bases:
BaseModelClass which defines in which format and where the mesh is exported.
- __init__(**data: Any) None
Constructor for the ReLeSO basemodel object.
Methods
adapt_export_path([environment_id])If placeholder in export path insert environment_id into it.
convert_to_pathlib_add_datetime(v)Add timestamp to save_location, of applicable.
export_mesh(mesh[, space_time])Exports the mesh.
Direct return of object variable.
get_logger()Gets the currently defined environment logger.
set_logger_name_recursively(logger_name)Set the logger_name variable for all child elements.
Attributes
format to which the mesh should be exported to
path to where the mesh should be exported to
save_locationDefinition of the save location of the logs and validation results.
logger_namename of the logger.
- adapt_export_path(environment_id: str = '0')
If placeholder in export path insert environment_id into it.
- Parameters:
environment_id (str) – Environment ID
- export_mesh(mesh: gustaf.Volumes | gustaf.Faces, space_time: bool = False)
Exports the mesh.
- Parameters:
mesh (GustafMeshTypes) – _description_
space_time (bool, optional) – _description_. Defaults to False.
- Raises:
RuntimeError – _description_
- export_path: str | Path
path to where the mesh should be exported to
- get_export_path() Path
Direct return of object variable.
- Returns:
Path to the default export location of the mesh during environment operations. (So that the solver can use it.)
- Return type:
str
- mesh_format: Literal['mixd']
format to which the mesh should be exported to