UserPlot#

Usage:

UserPlot Class API Wrapper

class UserPlot[source]#

Bases: object

Wrapper for UserPlot class of Moldflow Synergy.

add_scalar_data(indp_val, element_id, data)[source]#

Add scalar data to the user plot.

Parameters:
  • indp_val (float) – The independent variable value.

  • element_id (IntegerArray | None) – The element ID.

  • data (DoubleArray | None) – The data to be added.

Returns:

True if successful, False otherwise.

Return type:

bool

add_tensor_data(indp_val, element_id, t_11, t_22, t_33, t_12, t_13, t_23)[source]#

Add tensor data to the user plot.

Parameters:
  • indp_val (float) – The independent variable value.

  • element_id (IntegerArray | None) – The element ID.

  • t_11 (DoubleArray | None) – The xx-component of the tensor data.

  • t_22 (DoubleArray | None) – The yy-component of the tensor data.

  • t_33 (DoubleArray | None) – The zz-component of the tensor data.

  • t_12 (DoubleArray | None) – The xy-component of the tensor data.

  • t_13 (DoubleArray | None) – The xz-component of the tensor data.

  • t_23 (DoubleArray | None) – The yz-component of the tensor data.

Returns:

True if successful, False otherwise.

Return type:

bool

add_vector_data(indp_val, element_id, vx, vy, vz)[source]#

Add vector data to the user plot.

Parameters:
  • indp_val (float) – The independent variable value.

  • element_id (IntegerArray | None) – The element ID.

  • vx (DoubleArray | None) – The x-component of the vector data.

  • vy (DoubleArray | None) – The y-component of the vector data.

  • vz (DoubleArray | None) – The z-component of the vector data.

Returns:

True if successful, False otherwise.

Return type:

bool

add_xy_plot_data(indp_val, x_value, y_value)[source]#

Add XY plot data to the user plot.

Parameters:
  • indp_val (float) – The independent variable value.

  • x_value (DoubleArray | None) – The x-values of the data points.

  • y_value (DoubleArray | None) – The y-values of the data points.

Returns:

True if successful, False otherwise.

Return type:

bool

build()[source]#

Build the user plot.

Returns:

The built user plot.

Return type:

Plot

build_birefringence_plot(plot_name, result_type, light_wave_length, light_dir_x, light_dir_y, light_dir_z)[source]#

Build a birefringence plot.

Parameters:
  • plot_name (str) – The name of the birefringence plot.

  • result_type (BirefringenceResultType | int) – The type of birefringence result.

  • light_wave_length (float) – The wavelength of the light.

  • light_dir_x (float) – The x-component of the light direction.

  • light_dir_y (float) – The y-component of the light direction.

  • light_dir_z (float) – The z-component of the light direction.

Returns:

The birefringence plot.

Return type:

Plot

build_clamp_force_plot(plot_name, direction, lcs, for_overmolding)[source]#

Build a clamp force plot.

Parameters:
  • plot_name (str) – The name of the clamp force plot.

  • direction (ClampForcePlotDirection | int) – The direction of the clamp force plot.

  • lcs (int) – The local coordinate system for the clamp force plot.

  • global (For)

  • -1 (set value to 0 or)

  • for_overmolding (bool) – True if the plot is for overmolding, False otherwise.

Returns:

The clamp force plot.

Return type:

Plot

build_deflection_plot(plot_name, def_type, params)[source]#

Build a deflection plot. Daniela, Megan, YoonChae, Manon, Lara, Sophia :type plot_name: str :param plot_name: The name of the deflection plot. :type plot_name: str :type def_type: str :param def_type: The type of the deflection plot. :type def_type: str :type params: str :param params: The parameters for the deflection plot. :type params: str

Returns:

The deflection plot.

Return type:

Plot

build_modulus_plot(plot_name, direction, lcs)[source]#

Build a modulus plot.

Parameters:
  • plot_name (str) – The name of the modulus plot.

  • direction (ModulusPlotDirection | int) – The direction of the modulus plot.

  • lcs (int) – The local coordinate system for the modulus plot.

  • global (For)

  • -1 (set value to 0 or)

Returns:

The modulus plot.

Return type:

Plot

build_weldline_plot(plot_name, max_angle, for_overmolding)[source]#

Build a weldline plot.

Parameters:
  • plot_name (str) – The name of the weldline plot.

  • max_angle (float) – The maximum angle for the weldline plot.

  • for_overmolding (bool) – True if the plot is for overmolding, False otherwise.

Returns:

The weldline plot.

Return type:

Plot

set_data_type(data_type)[source]#

Set the data type of the user plot.

Parameters:

data_type (UserPlotType | str) – The data type of the user plot.

Returns:

True if successful, False otherwise.

Return type:

bool

set_dept_name(name)[source]#

Set the name of the user plot.

Parameters:

name (str) – The name of the user plot.

Returns:

True if successful, False otherwise.

Return type:

bool

set_dept_unit_name(unit_name)[source]#

Set the unit name of the user plot.

Parameters:

unit_name (str) – The unit name of the user plot.

Returns:

True if successful, False otherwise.

Return type:

bool

set_highlight_data(values)[source]#

Set the highlight data for the user plot.

Parameters:

values (DoubleArray | None) – The values to be highlighted.

Returns:

True if successful, False otherwise.

Return type:

bool

set_indp_name(name)[source]#

Set independent name of the user plot.

Parameters:

name (str) – The independent variable name of the user plot.

Returns:

True if successful, False otherwise.

Return type:

bool

set_indp_unit_name(unit_name)[source]#

Set the independent unit name of the user plot.

Parameters:

unit_name (str) – The independent unit name of the user plot.

Returns:

True if successful, False otherwise.

Return type:

bool

set_name(name)[source]#

Set the name of the user plot.

Parameters:

name (str) – The name of the user plot.

Returns:

True if successful, False otherwise.

Return type:

bool

set_scalar_data(element_id, data)[source]#

Set scalar data for the user plot.

Parameters:
Returns:

True if successful, False otherwise.

Return type:

bool

set_tensor_data(element_id, t_11, t_22, t_33, t_12, t_13, t_23)[source]#

Set tensor data for the user plot.

Parameters:
  • element_id (IntegerArray | None) – The element ID.

  • t_11 (DoubleArray | None) – The xx-component of the tensor data.

  • t_22 (DoubleArray | None) – The yy-component of the tensor data.

  • t_33 (DoubleArray | None) – The zz-component of the tensor data.

  • t_12 (DoubleArray | None) – The xy-component of the tensor data.

  • t_13 (DoubleArray | None) – The xz-component of the tensor data.

  • t_23 (DoubleArray | None) – The yz-component of the tensor data.

Returns:

True if successful, False otherwise.

Return type:

bool

set_vector_as_displacement(is_displacement)[source]#

Set the vector as displacement.

Parameters:

is_displacement (bool) – True if the vector is a displacement, False otherwise.

Return type:

None

set_vector_data(element_id, vx, vy, vz)[source]#

Set vector data for the user plot.

Parameters:
  • element_id (IntegerArray | None) – The element ID.

  • vx (DoubleArray | None) – The x-component of the vector data.

  • vy (DoubleArray | None) – The y-component of the vector data.

  • vz (DoubleArray | None) – The z-component of the vector data.

Returns:

True if successful, False otherwise.

Return type:

bool

set_xy_plot_data(x_value, y_value)[source]#

Set XY plot data for the user plot.

Parameters:
  • x_value (DoubleArray | None) – The x-values of the data points.

  • y_value (DoubleArray | None) – The y-values of the data points.

Returns:

True if successful, False otherwise.

Return type:

bool

set_xy_plot_x_title(title)[source]#

Set the x-axis title for the XY plot.

Parameters:

title (str) – The x-axis title.

Returns:

True if successful, False otherwise.

Return type:

bool

set_xy_plot_x_unit_name(unit_name)[source]#

Set the x-axis unit name for the XY plot.

Parameters:

unit_name (str) – The x-axis unit name.

Returns:

True if successful, False otherwise.

Return type:

bool

set_xy_plot_y_unit_name(unit_name)[source]#

Set the y-axis unit name for the XY plot.

Parameters:

unit_name (str) – The y-axis unit name.

Returns:

True if successful, False otherwise.

Return type:

bool