DiagnosisManager#

Usage:

DiagnosisManager Class API Wrapper

class DiagnosisManager[source]#

Bases: object

Wrapper for DiagnosisManager class of Moldflow Synergy.

create_entity_list()[source]#

Creates an empty EntList object

Returns:

The created entity list.

Return type:

EntList

get_aspect_ratio_diagnosis(min_value, max_value, std_ar, visible, element_id, value)[source]#

Get aspect ratio diagnostics

Parameters:
  • min_value (float) – Minimum aspect ratio value.

  • max_value (float) – Maximum aspect ratio value.

  • std_ar (bool) – Standard aspect ratio.

  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – The value array.

Returns:

The number of aspect ratio diagnostics.

Return type:

int

get_collapsed_faces(visible, tetra_id)[source]#

Get collapsed faces diagnostics

Parameters:
  • visible (bool) – Show/hide the selected mesh diagnosis.

  • tetra_id (IntegerArray | None) – The tetrahedron ID array.

Returns:

The number of collapsed faces.

Return type:

int

get_connectivity_diagnosis(nodes, ex_beam, visible, element_id, value)[source]#

Get connectivity diagnostics

Parameters:
  • nodes (EntList | None) – The nodes to show connectivity for.

  • ex_beam (bool) – Show external beam.

  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – The value array.

Returns:

The number of connectivity diagnostics.

Return type:

int

get_edges_diagnosis(non_manifold, visible, element_id, value)[source]#

Get free and manifold edge diagnostics

Parameters:
  • non_manifold (bool) – Show non-manifold edges.

  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – bit field for freeedge / non-manifold

Returns:

The number of free and manifold edge diagnostics.

Return type:

int

get_insufficient_refinement_through_thickness(min_layer, visible, tetra_id)[source]#

Get insufficient refinement through thickness diagnostics

Parameters:
  • min_layer (int) – The minimum layer value.

  • visible (bool) – Show/hide the selected mesh diagnosis.

  • tetra_id (IntegerArray | None) – The tetrahedron ID array.

Returns:

The number of collapsed faces.

Return type:

int

get_internal_long_edges(max_edge_length_ratio, visible, tetra_id, value)[source]#

Get internal long edges diagnostics

Parameters:
  • max_edge_length_ratio (float) – The maximum edge length ratio.

  • visible (bool) – Show/hide the selected mesh diagnosis.

  • tetra_id (IntegerArray | None) – The tetrahedron ID array.

  • value (DoubleArray | None) – The value array.

Returns:

The number of internal long edges.

Return type:

int

get_inverted_tetras(visible, tetra_id)[source]#

Get inverted tetrahedra diagnostics

Parameters:
  • visible (bool) – Show/hide the selected mesh diagnosis.

  • tetra_id (IntegerArray | None) – The tetrahedron ID array.

Returns:

The number of inverted tetras.

Return type:

int

get_match_info_diagnosis(element_id, value)[source]#

Get mesh match diagnostics

Parameters:
Returns:

The number of mesh match diagnostics.

Return type:

int

get_mesh_summary(element_only, inc_beams=True, inc_match=True, recalculate=False)[source]#

Get the mesh summary.

Parameters:
  • element_only (bool) – bool: If True, get element counts summary only.

  • inc_beams (bool) – bool: If True, include beam elements in the summary.

  • inc_match (bool) – bool: If True, include match ratios in the summary.

  • recalculate (bool) – bool: If True, recalculate the summary.

Returns:

The mesh summary object.

Return type:

MeshSummary

get_occurrence_diagnosis(visible, element_id, value)[source]#

Get occurrence number diagnostics

Parameters:
  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – The value array.

Returns:

The number of occurrence diagnostics.

Return type:

int

get_orientation_diagnosis(visible, element_id, value)[source]#

Get mesh orientation diagnostics

Parameters:
  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – The value array.

Returns:

The number of mesh match diagnostics.

Return type:

int

get_overlap_diagnosis(overlap, intersect, visible, element_id, value)[source]#

Get overlap diagnostics

Parameters:
  • overlap (bool) – Show overlapping elements.

  • intersect (bool) – Show intersecting elements.

  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – intersect/overlap value 1 - Intersect,

Returns:

The number of overlap diagnostics.

Return type:

int

get_surface_with_bad_trim_curve(outer_loop, inner_loop, surf_def, visible, element_id, value)[source]#

Get surface with bad trim curvature diagnostics

Parameters:
  • outer_loop (bool) – Test surface outer loops for errors

  • inner_loop (bool) – Test surface inner loops for errors

  • surf_def (bool) – Test underlying surface definition for errors

  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – The value array.

Returns:

The number of surface with bad trim curvature.

Return type:

int

get_surface_with_free_trim_curve(free, non_manifold, visible, element_id, value)[source]#

Get surface with free trim curvature diagnostics

Parameters:
  • free (bool) – Test surface outer loops for errors

  • non_manifold (bool) – Test surface inner loops for errors

  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – The value array.

Returns:

The number of surface with bad trim curvature.

Return type:

int

get_tetras_with_extreme_max_angle_between_faces(max_angle, visible, tetra_id, value)[source]#

Get tetras with extreme maximum angle between faces diagnostics

Parameters:
  • max_angle (float) – The maximum angle.

  • visible (bool) – Show/hide the selected mesh diagnosis.

  • tetra_id (IntegerArray | None) – The tetrahedron ID array.

  • value (DoubleArray | None) – The value array.

Returns:

The number of tetras with extreme maximum angle between faces.

Return type:

int

get_tetras_with_extreme_min_angle_between_faces(min_angle, visible, tetra_id, value)[source]#

Get tetras with extreme minimum angle between faces diagnostics

Parameters:
  • min_angle (float) – The minimum angle.

  • visible (bool) – Show/hide the selected mesh diagnosis.

  • tetra_id (IntegerArray | None) – The tetrahedron ID array.

  • value (DoubleArray | None) – The value array.

Returns:

The number of tetras with extreme minimum angle between faces.

Return type:

int

get_tetras_with_extremely_large_volume(max_volume_ratio, visible, tetra_id, value)[source]#

Get tetras with extremely large volume diagnostics

Parameters:
  • max_volume_ratio (float) – The maximum volume ratio.

  • visible (bool) – Show/hide the selected mesh diagnosis.

  • tetra_id (IntegerArray | None) – The tetrahedron ID array.

  • value (DoubleArray | None) – The value array.

Returns:

The number of internal long edges.

Return type:

int

get_tetras_with_high_aspect_ratio(max_aspect_ratio, visible, tetra_id, value)[source]#

Get tetras with high aspect ratio diagnostics

Parameters:
  • max_aspect_ratio (float) – The maximum aspect ratio.

  • visible (bool) – Show/hide the selected mesh diagnosis.

  • tetra_id (IntegerArray | None) – The tetrahedron ID array.

  • value (DoubleArray | None) – The value array.

Returns:

The number of tetras with high aspect ratio.

Return type:

int

get_thickness_diagnosis(min_value, max_value, visible, element_id, value)[source]#

Get thickness diagnostics

Parameters:
  • min_value (float) – Minimum thickness value. 0 for all thickness

  • max_value (float) – Maximum thickness value. 0 for all thickness

  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – The value array.

Returns:

The number of thickness diagnostics.

Return type:

int

get_zero_area_elements_diagnosis(min_value, visible, element_id, value)[source]#

Get zero area element diagnostics

Parameters:
  • min_value (float) – Minimum area value. ZeroArea = Sqrt(3)/4 * aMin * aMin

  • visible (bool) – Show/hide the selected mesh diagnosis.

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

  • value (DoubleArray | None) – The value array.

Returns:

The number of zero area elements.

Return type:

int

show_aspect_ratio(min_value, max_value, std_ar, assign_layer, show_txt, visible=False)[source]#

Generates aspect ratio diagnostics

Parameters:
  • min_value (float) – Minimum aspect ratio value.

  • max_value (float) – Maximum aspect ratio value.

  • std_ar (bool) – Standard aspect ratio.

  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_beam_element_count(min_value, max_value, assign_layer, visible=False)[source]#

Generates beam element count diagnostics

Parameters:
  • min_value (int) – Minimum beam element count value.

  • max_value (int) – Maximum beam element count value.

  • assign_layer (bool) – Assign layer to the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_bubbler_baffle_check(assign_layer, visible=False)[source]#

Generates bubbler baffle check diagnostics

Parameters:
  • assign_layer (bool) – Push the elements within the diagnosis range into a diagnostics layer

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_centroid_closeness(assign_layer, visible=False)[source]#

Generates centroid closeness diagnostics

Parameters:
  • assign_layer (bool) – Push the elements within the diagnosis range into a diagnostics layer

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_connect(nodes, ex_beam, assign_layer, show_txt, visible=False)[source]#

Generates connectivity diagnostics

Parameters:
  • nodes (EntList | None) – The nodes to show connectivity for.

  • ex_beam (bool) – Show external beam.

  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_cooling_circuit_validity(assign_layer, visible=False)[source]#

Generates cooling circuit validity diagnostics

Parameters:
  • assign_layer (bool) – Push the elements within the diagnosis range into a diagnostics layer

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_degen_elements(min_value, assign_layer, show_txt)[source]#

Generates degenerate element diagnostics

Parameters:
  • min_value (float) – Minimum area value. ZeroArea = Sqrt(3)/4 * aMin * aMin

  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

Return type:

None

show_diagnosis(visible=False)[source]#

Show/hide the selected mesh diagnostic

Parameters:

visible (bool) – Show/hide mesh diagnosis.

Return type:

None

show_dimensions(min_value, max_value, assign_layer, visible=False)[source]#

Generates dimensions diagnostics

Parameters:
  • min_value (float) – Minimum dimension value.

  • max_value (float) – Maximum dimension value.

  • assign_layer (bool) – Assign layer to the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_edges(non_manifold, assign_layer, show_txt, visible=False)[source]#

Generates free and manifold edge diagnostics

Parameters:
  • non_manifold (bool) – Show non-manifold edges.

  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_ld_ratio(min_value, max_value, assign_layer, visible=False)[source]#

Generates LD ratio diagnostics

Parameters:
  • min_value (float) – Minimum LD ratio value.

  • max_value (float) – Maximum LD ratio value.

  • assign_layer (bool) – Assign layer to the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_match_info(assign_layer, show_txt, reciprocal=False)[source]#

Generates mesh match diagnostics

Parameters:
  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • reciprocal (bool) – Show reciprocal mesh matching

Return type:

None

show_occurrence(assign_layer, visible=False)[source]#

Generates occurrence number diagnostics

Parameters:
  • assign_layer (bool) – Assign layer to the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_orient(assign_layer, show_txt, visible=False)[source]#

Generates mesh orientation diagnostics

Parameters:
  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_overlapping(overlap, intersect, ex_tri, ex_beam, assign_layer, show_txt, visible=False)[source]#

Generates diagnostics for overlaps and intersections

Parameters:
  • overlap (bool) – Show overlapping elements.

  • intersect (bool) – Show intersecting elements.

  • ex_tri (bool) – Show external triangles.

  • ex_beam (bool) – Show external beams.

  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_overlapping_txt(overlap, intersect)[source]#

Generates diagnostics for overlaps and intersections

Parameters:
  • overlap (bool) – Show overlapping elements.

  • intersect (bool) – Show intersecting elements.

Return type:

None

show_summary(element_only=False, inc_beams=True, inc_match=True)[source]#

Generates diagnostics summary

Parameters:
  • element_only (bool) –

    True - to get element counts summary only, which includes TrianglesCount,

    NodesCount, BeamsCount, MeshVolume and RunnerVolume

    False - to get all mesh summary

  • inc_beams (bool) –

    True - to get mesh summary including beam elements. Multiple cavities connected by

    beams will be counted as one region

    False - to get mesh summary without beam elements. Multiple cavities connected by

    beams will be counted as separate regions

  • inc_match (bool) –

    True - to get mesh summary including match ratios False - to get mesh summary without match ratios. This will be faster when match

    ratios are not needed

Return type:

None

show_summary_for_beams(visible=False)[source]#

Generates diagnostics summary for beams

Parameters:

visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_summary_for_tets(visible)[source]#

Generates diagnostics summary for tetrahedra

Parameters:

visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_summary_for_tris(visible, inc_extra_info)[source]#

Generates diagnostics summary for triangles

Parameters:
  • visible (bool) – Show/hide the selected mesh diagnosis.

  • inc_extra_info (bool) – Include defects information in the diagnosis

Return type:

None

show_surface_defects_for_3d(focus, assign_layer, show_txt, visible=False)[source]#

Generates surface defects diagnostics for 3D

Parameters:
  • focus (int) – Focus on the surface defects.

  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_surface_with_bad_trim_curve(outer_loop, inner_loop, surf_def, assign_layer, show_txt, visible=False)[source]#

Generates surface with bad trim curvature diagnostics

Parameters:
  • outer_loop (bool) – Test surface outer loops for errors

  • inner_loop (bool) – Test surface inner loops for errors

  • surf_def (bool) – Test underlying surface definition for errors

  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_surface_with_free_trim_curve(free, non_manifold, assign_layer, show_txt, visible=False)[source]#

Generates surface with free trim curvature diagnostics

Parameters:
  • free (bool) – Test surface outer loops for errors

  • non_manifold (bool) – Test surface inner loops for errors

  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_thickness(min_value, max_value, assign_layer, visible=False)[source]#

Generates thickness diagnostics

Parameters:
  • min_value (float) – Minimum thickness value.

  • max_value (float) – Maximum thickness value.

  • assign_layer (bool) – Assign layer to the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_trapped_beam(assign_layer, visible=False)[source]#

Generates trapped beam diagnostics

Parameters:
  • assign_layer (bool) – Push the elements within the diagnosis range into a diagnostics layer

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

show_zero_area_elements(min_value, assign_layer, show_txt, visible=False)[source]#

Generates zero area element diagnostics

Parameters:
  • min_value (float) – Minimum area value. ZeroArea = Sqrt(3)/4 * aMin * aMin

  • assign_layer (bool) – Assign layer to the mesh.

  • show_txt (bool) – Show text on the mesh.

  • visible (bool) – Show/hide the selected mesh diagnosis.

Return type:

None

update_dimensional_display(min_value, max_value)[source]#

Update the dimensions display with the given minimum and maximum values.

Parameters:
  • min_value (float) – The minimum dimension value.

  • max_value (float) – The maximum dimension value.

Return type:

None

update_thickness_display(min_value, max_value)[source]#

Update the thickness display with the given minimum and maximum values.

Parameters:
  • min_value (float) – The minimum thickness value.

  • max_value (float) – The maximum thickness value.

Return type:

None