nimphs.operators.telemac

Modules

nimphs.operators.telemac.telemac_create_mesh_sequence

class NIMPHS_OT_TelemacCreateMeshSequence

Bases: NIMPHS_CreateMeshSequence

Operator to create a TELEMAC 'mesh sequence'.

bl_description: Union[str, Any] = "Create a 'mesh sequence'. Press 'esc' to cancel"

typing.Union[str, typing.Any]

Type

type

bl_idname: Union[str, Any] = 'nimphs.telemac_create_mesh_sequence'

typing.Union[str, typing.Any]

Type

type

bl_label: Union[str, Any] = 'Mesh sequence'

typing.Union[str, typing.Any]

Type

type

draw(context: Context) None

UI layout of the popup window.

Parameters

context (Context) -- context

import_settings: None

import settings

Type

NIMPHS_TelemacImportSettings

invoke(context: Context, _event: Event) set

Prepare operator settings. Function triggered before the user can edit settings.

Parameters
  • context (Context) -- context

  • _event (Event) -- event

Returns

state of the operator

Return type

set

is_custom_base_cls = False
classmethod poll(context: Context) bool

If false, locks the button of the operator.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

bool

register_cls = True
run_one_step(context: Context) set

Run one step of the 'create mesh sequence' process.

Parameters

context (Context) -- context

Returns

state of the operation. Enum in ['PASS_THROUGH', 'CANCELLED'].

Return type

set

nimphs.operators.telemac.telemac_create_streaming_sequence

class NIMPHS_OT_TelemacCreateStreamingSequence

Bases: NIMPHS_CreateStreamingSequence

Operator to create a TELEMAC 'streaming sequence'.

bl_description: Union[str, Any] = "Create a 'streaming sequence'"

typing.Union[str, typing.Any]

Type

type

bl_idname: Union[str, Any] = 'nimphs.telemac_create_streaming_sequence'

typing.Union[str, typing.Any]

Type

type

bl_label: Union[str, Any] = 'Streaming sequence'

typing.Union[str, typing.Any]

Type

type

draw(context: Context) None

UI layout of the popup window.

Parameters

context (Context) -- context

execute(context: Context) set

Generate the 'streaming sequence' object.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

set

import_settings: None

import settings

Type

NIMPHS_TelemacImportSettings

invoke(context: Context, _event: Event) set

Prepare operator settings. Function triggered before the user can edit settings.

Parameters
  • context (Context) -- context

  • _event (Event) -- event

Returns

state of the operator

Return type

set

is_custom_base_cls = False
classmethod poll(context: Context) bool

If false, locks the button of the operator.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

bool

register_cls = True

nimphs.operators.telemac.telemac_extract_point_data

class NIMPHS_OT_TelemacExtractPointData

Bases: Operator, NIMPHS_ModalOperator

Operator to extract point data from a TELEMAC object.

bl_description: Union[str, Any] = 'Extract point data from a TELEMAC object'

typing.Union[str, typing.Any]

Type

type

bl_idname: Union[str, Any] = 'nimphs.telemac_extract_point_data'

typing.Union[str, typing.Any]

Type

type

bl_label: Union[str, Any] = 'Extract point data'

typing.Union[str, typing.Any]

Type

type

chosen_variable: None

Name of the chosen variable to extract.

Type

bpy.props.StringProperty

draw(context: Context) None

Layout of the popup window.

Parameters

context (Context) -- context

end: None

End time point.

Type

bpy.props.IntProperty

execute(context: Context) set

Extract point data.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

set

frame: int = 0

Current frame during the process (different from time point).

Type

int

invoke(context: Context, _event: Event) set

Prepare operator settings. Function triggered before the user can edit settings.

Parameters
  • context (Context) -- context

  • _event (Event) -- event

Returns

state of the operator

Return type

set

is_custom_base_cls = False
max: None

Number of maximum available time points to extract.

Type

bpy.props.IntProperty

max_plane_id: None

Highest available plane id.

Type

bpy.props.IntProperty

modal(context: Context, event: Event) set

Run one step of the 'extract point data' process.

Parameters
  • context (Context) -- context

  • event (Event) -- event

Returns

state of the operator

Return type

set

obj: Object = None

Selected object

Type

bpy.types.Object

plane_id: None

Index of the plane on which the vertex is located.

Type

bpy.props.IntProperty

point_data: None

Point data to extract.

Type

bpy.props.EnumProperty

classmethod poll(context: Context) bool

If false, locks the button of the operator.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

bool

register_cls = True
run_one_step(context: Context) set

Run one step of the process.

Parameters

context (Context) -- context

Returns

state of the operation. Enum in ['PASS_THROUGH', 'CANCELLED'].

Return type

set

start: None

Start time point.

Type

bpy.props.IntProperty

time_point: int = 0

Time point currently processed.

Type

int

vertex_id: None

Index of the vertex from which extract data.

Type

bpy.props.IntProperty

nimphs.operators.telemac.telemac_generate_volume_sequence

class NIMPHS_OT_TelemacGenerateVolumeSequence

Bases: NIMPHS_CreateSequence, NIMPHS_ModalOperator

Operator to generate volume sequences from TELEMAC 3D objects.

bl_description: Union[str, Any] = "Generate a volume sequence from a TELEMAC 3D file. Press 'esc' to cancel"

typing.Union[str, typing.Any]

Type

type

bl_idname: Union[str, Any] = 'nimphs.telemac_generate_volume_sequence'

typing.Union[str, typing.Any]

Type

type

bl_label: Union[str, Any] = 'Volume sequence'

typing.Union[str, typing.Any]

Type

type

computing_mode: None

Computing mode. Enum in ['DEFAULT', 'MULTIPROCESSING', 'CUDA'].

Type

bpy.props.EnumProperty

cumulated_time: float = 0

Cumulated execution time of the operator

Type

float

dim_x: None

Volume dimension along the 'X' axis.

Type

bpy.props.IntProperty

dim_y: None

Volume dimension along the 'Y' axis.

Type

bpy.props.IntProperty

dim_z: None

Volume dimension along the 'Z' axis.

Type

bpy.props.IntProperty

draw(context: Context) None

UI layout of the popup window.

Parameters

context (Context) -- context

end: None

Ending frame / time point of the sequence.

Type

bpy.props.IntProperty

execute(context: Context) set

Prepare the execution of the 'create mesh sequence' process.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

set

file_counter: int = 0

File counter to give a unique name to generated files

Type

int

file_name: None

File name of generated .vdb files.

Type

bpy.props.StringProperty

invoke(context: Context, _event: Event) set

Prepare operator settings. Function triggered before the user can edit settings.

Parameters
  • context (Context) -- context

  • _event (Event) -- event

Returns

state of the operator

Return type

set

is_custom_base_cls = False
mesh: TelemacMeshForVolume = None

Mesh information for the generation of TELEMAC volumes

Type

TelemacMeshForVolume

modal(context: Context, event: Event) set

Run one step of the 'generate_volume_sequence' process.

Parameters
  • context (Context) -- context

  • event (Event) -- event

Returns

state of the operator

Return type

set

nb_threads: None

Number of threads to use when multiprocessing mode is chosen.

Type

bpy.props.IntProperty

output_path: None

Output path for generated .vdb files.

Type

bpy.props.StringProperty

classmethod poll(context: Context) bool

If false, locks the button of the operator.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

bool

register_cls = True
space_interpolation: None

Space interpolation settings.

Type

NIMPHS_TelemacInterpolateProperty

time_interpolation: None

Time interpolation settings.

Type

NIMPHS_TelemacInterpolateProperty

time_point: int = 0

Currently processed time point

Type

int

volume: TelemacVolume = None

Object which will handle the computation of volumes

Type

TelemacVolume

volume_definition: None

Indicate how the volume is defined.

Type

bpy.props.EnumProperty

vx_size: None

Voxel size.

Type

bpy.props.IntProperty

vx_size_z: float = 0.0

Z dimension of voxel size

Type

float

get_available_computing_modes(self, _context: Context) list

Return available computing modes for volume computation of TELEMAC 3D files.

Parameters

_context (Context) -- context

Returns

list of available computing modes

Return type

list

update_dim_x(self, context: Context) None

Update volume X dimension accordingly to the model's dimensions.

Parameters

_context (Context) -- context

update_dim_y(self, context: Context) None

Update volume Y dimension accordingly to the model's dimensions.

Parameters

_context (Context) -- context

update_nb_threads(self, _context: Context) None

Update the number of chosen cpu threads in function of the computing capabilities.

Parameters

_context (Context) -- context

update_vx_size(self, context: Context) None

Update dimensions according to new voxel size.

Parameters

_context (Context) -- context

nimphs.operators.telemac.telemac_import_file

class NIMPHS_OT_TelemacImportFile

Bases: Operator, ImportHelper

Operator to import a TELEMAC file.

bl_description: Union[str, Any] = 'Import a TELEMAC file'

typing.Union[str, typing.Any]

Type

type

bl_idname: Union[str, Any] = 'nimphs.import_telemac_file'

typing.Union[str, typing.Any]

Type

type

bl_label: Union[str, Any] = 'Import'

typing.Union[str, typing.Any]

Type

type

draw(_context: Context) None

UI layout of the operator.

Parameters

_context (Context) -- context

execute(context: Context) set

Import the selected file.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

set

filter_glob: None

List of allowed file extensions.

Type

bpy.props.StringProperty

import_settings: None

Import settings.

Type

NIMPHS_TelemacImportSettings

is_custom_base_cls = False
register_cls = True
import_telemac_menu_draw(self, context: Context) None

Draw function which displays the import button in File > Import.

Parameters

context (Context) -- context

nimphs.operators.telemac.telemac_preview

class NIMPHS_OT_TelemacPreview

Bases: Operator

Operator to generate a preview of a TELEMAC object.

bl_description: Union[str, Any] = 'Preview the selected file'

typing.Union[str, typing.Any]

Type

type

bl_idname: Union[str, Any] = 'nimphs.telemac_preview'

typing.Union[str, typing.Any]

Type

type

bl_label: Union[str, Any] = 'Preview'

typing.Union[str, typing.Any]

Type

type

execute(context: Context) set

Generate a preview of the selected object.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

set

is_custom_base_cls = False
register_cls = True

nimphs.operators.telemac.telemac_reload_file

class NIMPHS_OT_TelemacReloadFile

Bases: Operator

Operator to reload file data of the selected TELEMAC object.

bl_description: Union[str, Any] = 'Reload file data of the selected TELEMAC object'

typing.Union[str, typing.Any]

Type

type

bl_idname: Union[str, Any] = 'nimphs.reload_telemac_file'

typing.Union[str, typing.Any]

Type

type

bl_label: Union[str, Any] = 'Reload'

typing.Union[str, typing.Any]

Type

type

execute(context: Context) set

Reload file data of the selected TELEMAC object.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

set

is_custom_base_cls = False
register_cls = True

nimphs.operators.telemac.telemac_set_volume_origin

class NIMPHS_OT_TelemacSetVolumeOrigin

Bases: Operator

Operator to set origin of a volume to a TELEMAC 3D model.

bl_description: Union[str, Any] = 'Set origin of volume to TELEMAC 3D model (align origins)'

typing.Union[str, typing.Any]

Type

type

bl_idname: Union[str, Any] = 'nimphs.set_volume_origin'

typing.Union[str, typing.Any]

Type

type

bl_label: Union[str, Any] = 'Set volume origin'

typing.Union[str, typing.Any]

Type

type

draw(context: Context) None

Layout of the popup window.

Parameters

context (Context) -- context

execute(context: Context) set

Align origins of volume and TELEMAC 3D model.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

set

invoke(context: Context, _event: Event) set

Prepare operator settings. Function triggered before the user can edit settings.

Parameters
  • context (Context) -- context

  • _event (Event) -- event

Returns

state of the operator

Return type

set

is_custom_base_cls = False
obj: Object = None

Selected object

Type

bpy.types.Object

origin: tuple[float, float, float] = (0, 0, 0)

Computed target origin

Type

tuple[float, float, float]

classmethod poll(context: Context) bool

If false, locks the button of the operator.

Parameters

context (Context) -- context

Returns

state of the operator

Return type

bool

register_cls = True