#### 6.10.2.11. FailureData

`class compolyx.plot_data.FailureData`(graph, obj, parent=None, display_data=None)

Bases: compolyx.plot_data.contour_data.ContourData

`get_text`(visible=None, selected=None, str_results=True)

  Get text data of failure plot.

  Parameters

  - visible : Object(s) defining visible scope

  - selected : Selected object(s) for ply-wise evaluations.

  - str_results : Whether to return failure modes as strings or enums. (default is str)

  Returns

  Resulting n-dimensional array with a dict with data for each selected object/ply: [ dict( "fm" : array(int/str), "li" : array(int), "lc" : array(int) ), dict( "fm" : array(int/str), "li" : array(int), "lc" : array(int) ), ... ] Possible keys: - fm: Failure Mode (enum) - li: Layer index - lc: Load case (for envelope solutions only)

  The scope of the data is evaluated identically as for get_element_xxx functions as the intersection of: - data_scope of plot - visible_scope defined by visible - selection_scope defined by selected

  Text data is returned independent of update status of plot, but only if results for the current plot configuration are available, else an empty array is returned.

  Examples:

  Get text data for current ply-wise plot with visible scope set to element set "All_Elements" and with ply1 and ply2 selected:

      >>> text = my_plot.get_text(visible=db.active_model.element_sets['All_Elements'], selected=[ply1, ply2])

  Get textdata for current element-wise plot with visible scope equal to all objects visible in current scene:

      >>> text = my_plot.get_text(visible=db.active_model.active_scene.active_set.entities)

`show_critical_failure_mode`

  Whether to evaluate and show the critical failure mode.

`show_critical_layer`

  Whether to evaluate and show the critical layer.

`show_critical_load_case`

  Whether to evaluate and show the critical laod case; available only for Envelope Solutions.

`spot`

  Not applicable to a failure plot

`text_threshold`

  Threshold below/above which failure mode text is shown or not.

`text_threshold_auto`

  Whether the threshold for visualization of failure text is set automatically or not.

Release 18.2 - © ANSYS, Inc. All rights reserved.