Model.hm_getelemchecksummary3d#

Model.hm_getelemchecksummary3d(collection, option)#

Returns the element quality summary for the selected 3D elements.

Parameters:
  • collection (Collection) – The collection containing the element entities to query.

  • option (hwString) – This parameter constructs a table of quality measurements that are used to determine the summary. Each measurement includes the measurement name, failed value and solver ID (currently only HyperMesh solver ID = 0 is supported). Valid quality measurements include: aspect_ratio , cell_squish, equi_skew, jacobian, max_interior_angle, min_interior_angle, ortho_3d, size_ratio_3d, skew, tet_collapse, vol_ar, vol_skew, warpage.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • elementCountTotal (int) - The number of counted elements

    • elementCountTotalFailed (int) - The number elements that failed passing the selected measurement(s)

    • qualitySummary (HmQueryResultList)-Result list object representing a summary of the selected quality measurements and containing HmQueryResult objects with the following output data:

      • checkName (str) - The name of the quality measurement

      • elementCountFailed (int) - The number of elements that failed passing this measurement

      • worstValue (double) - The quality value of the worst element using this measurement

Example#

Count the displayed elements with tet_collapse ≤ 0.01 and vol_skew ≥ 0.90#
import hm
import hm.entities as ent

model = hm.Model()

element_collection = hm.CollectionByDisplayed(model, ent.Element)
table_summary_options = "tet_collapse 0.01 vol_skew 0.90"

_, result = model.hm_getelementchecksummary3d(
    collection=element_collection, option=table_summary_options
)

print("The number of counted elements:", result.elementCountTotal)
print(
    "The number elements that failed passing the selected measurement(s):",
    result.elementCountTotalFailed,
)

for quality_crit in result.qualitySummary:
    print("The name of the quality measurement:", result.checkName)
    print(
        "The number of elements that failed passing this measurement:",
        result.elementCountFailed,
    )
    print(
        "The quality value of the worst element using this measurement:",
        result.worstValue,
    )