Plot#

Usage:

Plot Class API Wrapper

class Plot[source]#

Bases: object

Wrapper for Plot class of Moldflow Synergy.

property active_indp_var: int#

The Active Independent Variable.

Getter:

Get the Active Independent Variable.

Setter:

Set the Active Independent Variable. [If the provided number exceeds the number of independent variables, it is capped to the number of independent variables.]

Type:

int

add_probe_plane(normal, point)[source]#

Display a Probe plot.

Parameters:
  • normal (str) – The normal vector of the probe plane.

  • point (str) – The point on the probe plane.

Returns:

True if successful, False otherwise.

Return type:

bool

add_probe_plot_probe_line(start_pt, end_pt)[source]#

Add a probe plot probe line.

Parameters:
  • start_pt (Vector) – Start point of the probe line.

  • end_pt (Vector) – End point of the probe line.

Returns:

True if successful, False otherwise.

Return type:

bool

add_xy_plot_curve(curve)[source]#

Add curves to XY plot .

Parameters:

curve (EntList) – The curve to add.

Return type:

None

property animation_type: int#

The Animation Type.

Getter:

Get the Animation Type.

Setter:

Set the Animation Type.

Type:

int

apply_best_fit(nodes)[source]#

Apply the best fit to the plot.

Parameters:

nodes (EntList | None) – The nodes to apply the best fit.

Returns:

True if successful, False otherwise.

Return type:

bool

property capping: bool#

The capping. [True if the part of model behind active cutting planes is shown, in addition to the clipping plane]

Getter:

Get the capping.

Setter:

Set the capping.

Type:

bool

property clip_legend: bool#

The status of the Clip Legend option.

Getter:

Get the status of the Clip Legend option in the plot.

Setter:

Set the status of the Clip Legend option in the plot.

Type:

bool

property color_bands: int#
The number of color bands.
  • values between 1 through 256: banded coloring with this number of colors

Getter:

Get the number of color bands.

Setter:

Set the number of color bands.

Type:

int

property color_scale: bool#
The color scale.

[True if the color scale is blue-to-red, False if vice-versa]

Getter:

Get the color scale.

Setter:

Set the color scale.

Type:

bool

property color_table_id: int#

The Color Table ID.

Getter:

Get the Color Table ID.

Setter:

Set the Color Table ID.

Type:

int

property component: int#

The displayed data component.

Getter:

Get the displayed data component.

Setter:

Set the displayed data component.

Type:

int

property current_animation_frame_index: int#

The current animation frame index.

Getter:

Get the current animation frame index in the plot.

Type:

int

property data_id: int#

The data ID.

Getter:

Get the data ID in the plot.

Type:

int

property data_nb_components: int#

The number of components.

Getter:

Get the number of components in the plot.

Type:

int

property data_type: str#

The data type.

Getter:

Get the data type in the plot.

Type:

str

property deflection_lcs: int#

The deflection LCS (local coordinate system).

Getter:

Get the deflection LCS (local coordinate system) in the plot.

Setter:

Set the deflection LCS (local coordinate system) in the plot. For global, set value to 0 or -1

Type:

int

property deflection_overlay_with_mesh: bool#

The deflection overlay with mesh.

Getter:

Get the deflection overlay with mesh in the plot.

Setter:

Set the deflection overlay with mesh in the plot.

Type:

bool

property deflection_scale_direction: int#

The deflection scale direction.

Getter:

Get the deflection scale direction in the plot.

Setter:

Set the deflection scale direction in the plot.

Type:

int

property deflection_scale_factor: float#

The deflection scale factor.

Getter:

Get the deflection scale factor in the plot.

Setter:

Set the deflection scale factor in the plot.

Type:

float

property deflection_show_anchor_plane: bool#

The deflection show anchor plane.

Getter:

Get the deflection show anchor plane in the plot.

Setter:

Set the deflection show anchor plane in the plot.

Type:

bool

delete_xy_plot_curve(curve)[source]#

Delete curves from XY plot.

Parameters:

curve (EntList) – The curve to delete.

Return type:

None

property edge_display: int#

The edge display option.

Getter:

Get the edge display option in the plot.

Setter:

Set the edge display option in the plot.

Type:

int

property extended_color: bool#

The Extended Coloring Option.

Getter:

Get the Extended Coloring Option.

Setter:

Set the Extended Coloring Option.

Type:

bool

property first_animation_frame_index: int#

The first animation frame index.

Getter:

Get the first animation frame index in the plot.

Setter:

Set the first animation frame index in the plot.

Type:

int

get_pathline_density(trace_mode)[source]#

Get the trace density for the given trace mode .

Parameters:

trace_mode (TraceModes | int) – Trace mode to get the trace density.

Returns:

The trace density for the given trace mode .

Return type:

int

get_pathline_result_are_settings_valid(result_id)[source]#

Get the validity of the settings for the pathline result.

Parameters:

result_id (int) – Result ID to check the validity of the settings.

Returns:

True if settings are valid, False otherwise.

Return type:

bool

get_pathline_result_max(scale_type, result_id)[source]#

Get the maximum value of the result for the given type ID and result ID.

Parameters:
  • scale_type (ScaleTypes | int) – Type ID to get the result maximum value.

  • result_id (int) – Result ID to get the result maximum value.

Returns:

The maximum value of the result for the given type ID and result ID.

Return type:

float

get_pathline_result_min(scale_type, result_id)[source]#

Get the minimum value of the result for the given type ID and result ID.

Parameters:
  • scale_type (ScaleTypes | int) – Type ID to get the result minimum value.

  • result_id (int) – Result ID to get the result minimum value.

Returns:

The minimum value of the result for the given type ID and result ID.

Return type:

float

get_pathline_result_name(ds_id)[source]#

Get the name of the result for the given dataset ID.

Parameters:

ds_id (int) – Dataset ID to get the result name.

Returns:

The name of the result for the given dataset ID.

Return type:

str

get_pathline_result_use_extended_colour(result_id)[source]#

Get the use extended colour for the pathline result.

Parameters:

result_id (int) – Result ID to get the use extended colour.

Returns:

The use extended colour for the pathline result.

Return type:

bool

get_pathline_result_use_specified_values(result_id)[source]#

Get the use specified values for the given result ID.

Parameters:

result_id (int) – Result ID to get the use specified values.

Returns:

The use specified values for the given result ID.

Return type:

bool

get_pathline_trace_size(trace_mode)[source]#

Get the trace size for the given trace mode .

Parameters:

trace_mode (TraceModes | int) – Trace mode to get the trace density.

Returns:

The trace size for the given trace mode .

Return type:

int

get_probe_plot_probe_line(index, start_pt, end_pt)[source]#

Returns the two end points of a probe line

Parameters:
  • index (int) – Index of the probe line.

  • start_pt (Vector) – Start point of the probe line.

  • end_pt (Vector) – End point of the probe line.

Returns:

True if successful, False otherwise.

Return type:

bool

property glyph_size_factor: float#

The glyph size factor.

Getter:

Get the glyph size factor in the plot.

Setter:

Set the glyph size factor in the plot.

Type:

float

property histogram: bool#

The visibility status of histogram.

Getter:

Get the visibility status of histogram in the plot.

Setter:

Set the visibility status of histogram in the plot.

Type:

bool

property histogram_cumulative_plot: bool#

The displayed volume is cumulative for the histogram plot.

Getter:

Get the displayed volume is cumulative for the histogram plot in the plot.

Setter:

Set the displayed volume is cumulative for the histogram plot in the plot.

Type:

bool

property histogram_number_of_bars: int#

The number of bars in histogram.

Getter:

Get the number of bars in histogram in the plot.

Setter:

Set the number of bars in histogram in the plot.

Type:

int

property last_animation_frame_index: int#

The last animation frame index.

Getter:

Get the last animation frame index in the plot.

Setter:

Set the last animation frame index in the plot.

Type:

int

property max_value: float#

The max value.

Getter:

Get the max value in the plot.

Setter:

Set the max value in the plot.

Type:

float

property mesh_fill: float#

The mesh fill.

Getter:

Get the mesh fill.

Setter:

Set the mesh fill.

Type:

float

property min_max: bool#

The Min/Max visibility status.

Getter:

Get the Min/Max visibility status in the plot.

Setter:

Set the Min/Max visibility status in the plot.

Type:

bool

property min_max_slice_at_probe: str#

The Min/Max slice plane location of a plot.

Getter:

Get the Min/Max slice plane location of a plot in the plot.

Setter:

Set the Min/Max slice plane location of a plot in the plot.

Type:

str

property min_value: float#

The min value.

Getter:

Get the min value in the plot.

Setter:

Set the min value in the plot.

Type:

float

property name: str#

The name of the plot.

Getter:

Get the name of the plot.

Setter:

Set the name of the plot.

Type:

str

property nodal_averaging: bool#

The nodal averaging.

Getter:

Get the nodal averaging.

Setter:

Set the nodal averaging.

Type:

bool

property notes: str#

The plot notes.

Getter:

Get the plot notes in the plot.

Setter:

Set the plot notes in the plot.

Type:

str

property number_of_animation_frames: int#

The number of animation frames.

Getter:

Get the number of animation frames in the plot.

Setter:

Set the number of animation frames in the plot.

Type:

int

property number_of_contours: int#

The number of contours.

Getter:

Get the number of contours.

Setter:

Set the number of contours.

Type:

int

property number_of_frames: int#

The number of frames.

Getter:

Get the number of frames.

Setter:

Set the number of frames.

Type:

int

property number_of_indp_vars: int#

The Number of Independent Variables.

Getter:

Get the Number of Independent Variables.

Type:

int

property pathline_display_field: int#

Get the ID of the result mapped on the pathlines.

property pathline_number_of_selected_elements: int#

The number of selected elements in the pathline plot.

Getter:

Get the number of selected elements in the pathline plot in the plot.

Type:

int

property pathline_selected_elements: str#

The selected elements for the pathline plot.

Getter:

Get the selected elements for the pathline plot in the plot.

Setter:

Set the selected elements for the pathline plot in the plot.

Type:

str

property pathline_trace_mode: int#

Get the ID of the result mapped on the pathlines.

property pathline_trace_style: int#

Get the current trace style.x

property plot_method: int#

The Plot Method.

Getter:

Get the Plot Method.

Setter:

Set the Plot Method.

Type:

int

property plot_type: str#

The Plot Type. - Highlight Plot - XY Plot - Vector Plot - Tensor Plot - XYZ Plot - Shrink Check Plot - Sink Mark Plot - Contour Plot

Getter:

Get the Plot Type in the plot.

Type:

str

property probe_plot_number_of_probe_lines: int#

The probe plot number of probe lines.

Getter:

Get the probe plot number of probe lines in the plot.

Type:

int

regenerate()[source]#

Rebuilds the plot.

Return type:

None

reset_probe_plane()[source]#

Reset the probe plane.

Return type:

None

restore_original_position()[source]#

Restore the original position of the plot.

Returns:

True if successful, False otherwise.

Return type:

bool

save_result_in_fbx(file_name, inc_frames, scale_factor, binary, unit_sys='')[source]#

Save the result in FBX format.

Parameters:
  • file_name (str) – The file name to save the result.

  • inc_frames (bool) – True if incremental frames, False otherwise.

  • scale_factor (float) – The scale factor to use.

  • binary (bool) – True if binary format, False if ASCII format.

  • unit_sys (SystemUnits | str) – The unit system to use.

Returns:

True if successful, False otherwise.

Return type:

bool

save_result_in_patran(file_name, unit_sys='')[source]#

Save the result in Patran format.

Parameters:
  • file_name (str) – The file name to save the result.

  • unit_sys (SystemUnits | str) – The unit system to use.

Returns:

True if successful, False otherwise.

Return type:

bool

save_result_in_xml(file_name, unit_sys='')[source]#

Save the result in XML format.

Parameters:
  • file_name (str) – The file name to save the result.

  • unit_sys (SystemUnits | str) – The unit system to use.

Returns:

True if successful, False otherwise.

Return type:

bool

save_warped_shape_in_cad(file_name, scale_factor)[source]#

Save the warped shape in CAD format.

Parameters:
  • file_name (str) – The file name to save the warped shape.

  • scale_factor (float) – The scale factor to use.

Returns:

True if successful, False otherwise.

Return type:

bool

save_warped_shape_in_stl(file_name, scale_factor, binary, unit_sys=SystemUnits.STANDARD)[source]#

Save the warped shape in STL format.

Parameters:
  • file_name (str) – The file name to save the warped shape.

  • scale_factor (float) – The scale factor to use.

  • binary (bool) – True if binary format, False if ASCII format.

  • unit_sys (SystemUnits | str) – The unit system to use.

Returns:

True if successful, False otherwise.

Return type:

bool

save_warped_shape_in_udm(file_name, scale_factor)[source]#

Save the warped shape in UDM format.

Parameters:
  • file_name (str) – The file name to save the warped shape.

  • scale_factor (float) – The scale factor to use.

Returns:

True if successful, False otherwise.

Return type:

bool

save_xy_plot_curve_data(file_name)[source]#

Save the XY plot curve data.

Parameters:

file_name (str) – The file_name to save the data.

Returns:

True if successful, False otherwise.

Return type:

bool

property scale_option: int#

The Scale Option.

Getter:

Get the Scale Option.

Setter:

Set the Scale Option.

Type:

int

set_fixed_indp_var_value(index, value)[source]#

Set the fixed independent variable value.

Parameters:
  • index (int) – Index of the independent variable.

  • value (float) – Value to set.

Return type:

None

set_pathline_density(trace_mode, value)[source]#

Set the trace density for the given trace mode .

Parameters:
  • trace_mode (TraceModes | int) – Trace mode to set the trace density.

  • value (int) – Trace density to set.

Returns:

True if successful, False otherwise.

Return type:

bool

set_pathline_injection_location(key, enabled)[source]#

Set the visibility of pathlines originating from specified injection location .

Parameters:
  • key (str) – The injection location node ID.

  • enabled (bool) – The visibility is on.

Returns:

True if successful, False otherwise.

Return type:

bool

set_pathline_result_max(scale_type, result_id, result_max)[source]#

Set the maximum value of the result for the given type ID and result ID.

Parameters:
  • scale_type (ScaleTypes | int) – Type ID to set the result maximum value.

  • result_id (int) – Result ID to set the result maximum value.

  • result_max (float, int) – Result maximum value to set.

Return type:

None

set_pathline_result_min(scale_type, result_id, result_min)[source]#

Set the minimum value of the result for the given type ID and result ID.

Parameters:
  • scale_type (ScaleTypes | int) – Type ID to set the result minimum value.

  • result_id (int) – Result ID to set the result minimum value.

  • result_min (float, int) – Result minimum value to set.

Return type:

None

set_pathline_result_use_extended_colour(result_id, use_extended_colour)[source]#

Set the use extended colour for the pathline result.

Parameters:
  • result_id (int) – Result ID to set the use extended colour.

  • use_extended_colour (bool) – Use extended colour or not.

Return type:

None

set_pathline_result_use_specified_values(result_id, use_specified_values)[source]#

Set the use specified values for the given result ID.

Parameters:
  • result_id (int) – Result ID to set the use specified values.

  • use_specified_values (bool) – Use specified values or not.

Returns:

True if successful, False otherwise.

Return type:

bool

set_pathline_trace_size(trace_mode, value)[source]#

Set the trace size for the given trace mode .

Parameters:
  • trace_mode (TraceModes | int) – Trace mode to set the trace density.

  • value (int) – Trace size to set.

Returns:

True if successful, False otherwise.

Return type:

bool

set_plot_nodes_from_ent_list(ent_list)[source]#

Set the plot nodes from an entity list.

Parameters:

ent_list (EntList) – The entity list to set.

Return type:

None

set_plot_nodes_from_string(nodes)[source]#

Set the plot nodes from a string.

Parameters:

nodes (str) – The nodes to set.

Return type:

None

set_plot_tolerance(min_value, max_value)[source]#

Set 2 lines to be shown at certain Y positions.

Parameters:
  • min_value (str) – The minimum value of the tolerance.

  • max_value (str) – The maximum value of the tolerance.

Returns:

True if successful, False otherwise.

Return type:

bool

set_probe_plot_probe_line(index, start_pt, end_pt)[source]#

Modifies an existing probe line

Parameters:
  • index (int) – Index of the probe line.

  • start_pt (Vector) – Start point of the probe line.

  • end_pt (Vector) – End point of the probe line.

Returns:

True if successful, False otherwise.

Return type:

bool

property shrinkage_compensation_estimated_shrinkage: Vector | None#

The shrinkage compensation estimated shrinkage.

Getter:

Get the shrinkage compensation estimated shrinkage in the plot.

Setter:

Set the shrinkage compensation estimated shrinkage in the plot.

Type:

Vector

property shrinkage_compensation_option: str#

The shrinkage compensation option.

Getter:

Get the shrinkage compensation option in the plot.

Setter:

Set the shrinkage compensation option in the plot.

Type:

str

property single_color: Vector | None#

The single color as RGB vector.

Getter:

Get the single color in the plot as RGB vector.

Setter:

Set the single color in the plot as RGB vector.

Type:

Vector

property smooth_shading: bool#

The smooth shading.

Getter:

Get the smooth shading.

Setter:

Set the smooth shading.

Type:

bool

property tensor_glyph_axis_ratio: int#

The glyph tensor axis ratio.

Getter:

Get the glyph tensor axis ratio in the plot.

Setter:

Set the glyph tensor axis ratio in the plot.

Type:

int

property use_single_color: bool#

The use single color.

Getter:

Get the use single color in the plot.

Setter:

Set the use single color in the plot.

Type:

bool

warp_query_begin()[source]#

Begin the warp query.

Returns:

True if successful, False otherwise.

Return type:

bool

warp_query_end()[source]#

End the warp query.

Return type:

None

warp_query_node(node_id, return_values)[source]#

Query the warp node.

Parameters:
  • node_id (int) – Node ID to query.

  • return_values (DoubleArray) – Returned query values.

  • deflection ((node coordinates before and after)

  • displacements) (and)

Returns:

True if successful, False otherwise.

Return type:

bool

property xy_plot_auto_range_x: bool#

The XY Plot Auto Range X.

Getter:

Get the XY Plot Auto Range X in the plot.

Setter:

Set the XY Plot Auto Range X in the plot.

Type:

bool

property xy_plot_auto_range_y: bool#

The XY Plot Auto Range Y.

Getter:

Get the XY Plot Auto Range Y in the plot.

Setter:

Set the XY Plot Auto Range Y in the plot.

Type:

bool

property xy_plot_legend_rect_bottom: float#

The XY Plot Legend Rect bottom position.

Getter:

Get the XY Plot Legend Rect bottom position in the plot.

Setter:

Set the XY Plot Legend Rect bottom position in the plot.

Type:

float

property xy_plot_legend_rect_height: float#

The XY Plot Legend Height.

Getter:

Get the XY Plot Legend Height in the plot.

Setter:

Set the XY Plot Legend Height in the plot.

Type:

float

property xy_plot_legend_rect_left: float#

The XY Plot Legend Rect left position.

Getter:

Get the XY Plot Legend Rect left position in the plot.

Setter:

Set the XY Plot Legend Rect left position in the plot.

Type:

float

property xy_plot_legend_rect_width: float#

The XY Plot Legend Width.

Getter:

Get the XY Plot Legend Width in the plot.

Setter:

Set the XY Plot Legend Width in the plot.

Type:

float

property xy_plot_max_number_of_curves: int#

The XY Plot Max Number of Curves.

Getter:

Get the XY Plot Max Number of Curves in the plot.

Setter:

Set the XY Plot Max Number of Curves in the plot.

Type:

int

property xy_plot_max_x: float#

The XY Plot max X.

Getter:

Get the XY Plot max X in the plot.

Setter:

Set the XY Plot max X in the plot.

Type:

float

property xy_plot_max_y: float#

The XY Plot max Y.

Getter:

Get the XY Plot max Y in the plot.

Setter:

Set the XY Plot max Y in the plot.

Type:

float

property xy_plot_min_x: float#

The XY Plot min X.

Getter:

Get the XY Plot min X in the plot.

Setter:

Set the XY Plot min X in the plot.

Type:

float

property xy_plot_min_y: float#

The XY Plot min Y.

Getter:

Get the XY Plot min Y in the plot.

Setter:

Set the XY Plot min Y in the plot.

Type:

float

property xy_plot_number_of_curves: int#

The XY Plot Number of Curves.

Getter:

Get the XY Plot Number of Curves in the plot.

Type:

int

property xy_plot_overlay_with_mesh: bool#

The XY Plot Overlay With Mesh.

Getter:

Get the XY Plot Overlay With Mesh in the plot.

Setter:

Set the XY Plot Overlay With Mesh in the plot.

Type:

bool

property xy_plot_show_legend: bool#

The XY Plot Show Legend.

Getter:

Get the XY Plot Show Legend.

Setter:

Set the XY Plot Show Legend.

Type:

bool

property xy_plot_show_points: bool#

The XY Plot Show Points.

Getter:

Get the XY Plot Show Points.

Setter:

Set the XY Plot Show Points.

Type:

bool

property xy_plot_title: str#

The XY Plot Title.

Getter:

Get the XY Plot Title in the plot.

Setter:

Set the XY Plot Title in the plot.

Type:

str

property xy_plot_title_x: str#

The XY Plot Title X.

Getter:

Get the XY Plot Title X in the plot.

Setter:

Set the XY Plot Title X in the plot.

Type:

str

property xy_plot_title_y: str#

The XY Plot Title Y.

Getter:

Get the XY Plot Title Y in the plot.

Setter:

Set the XY Plot Title Y in the plot.

Type:

str