Model.getqualitysummary#

Model.getqualitysummary(elementcollection, summary_file, failedcollection, criteria_use_mode)#

Computes the quality index for the specified selection of shell elements and writes the quality summary to the specified text file. Optionally places the failed elements to the specified collection.

Parameters:
  • elementcollection (Collection) – The collection containing the shell elements entities to be evaluated.

  • summary_file (hwString) – The path to the quality summary destination file.

  • failedcollection (Collection) – The collection containing the entities the failed elements.

  • criteria_use_mode (int) –

    The mode for using and controlling the quality criteria. It must be one of the following:

    0 - The computation is performed regardless of whether or not the quality criteria was previously set. If the criteria is not specified, the default criteria, adjusted to the selection element size, is set as current.

    1 - The computation requires the quality criteria to be pre-set using one of the commands listed above. An error is returned, if the quality criteria does not exist. If the criteria exists, the computation is performed regardless. This is the most common value for this parameter.

    2 - The computation requires the quality criteria to be pre-set. An error is returned, if the quality criteria does not exist. If the criteria exists, the function checks to see if the size criteria matches the selection element size and returns an error, if there is a mismatch.

    3 - The computation requires the quality criteria to be pre-set. An error is returned, if the quality criteria does not exist. If the criteria exists, the function checks to see if the size criteria matches the selection element size, adjusts the size criteria to the selection element size, and performs the computation.

Examples#

Evaluate the elements with IDs 100 through 110 use the quality criteria file , “ c:/mycriteria / durability.txt “ , to write the quality summary to “ c:/myres / dur_sum.txt “ and to add to a collection the failed elements#
import hm
import hm.entities as ent

model = hm.Model()

model.readqualitycriteria(file_name="c:/mycriteria/durability.txt")

# Creating a collection that contains the shell elements to be evaluated
filter_elements = hm.FilterByEnumeration(ent.Element, list(range(100, 111)))
elements_collection = hm.Collection(model, filter_elements)

failed_elems = hm.Collection(model, ent.Element, populate=False)

model.getqualitysummary(
    elementcollection=elements_collection,
    summary_file="c:/myres/dur_sum.txt",
    failedcollection=failed_elems,
    criteria_use_mode=1,
)
The previous example using the default criteria if the criteria were not set before using any of the corresponding functions#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the shell elements to be evaluated
filter_elements = hm.FilterByEnumeration(ent.Element, list(range(100, 111)))
elements_collection = hm.Collection(model, filter_elements)

model.getqualitysummary(
    elementcollection=elements_collection,
    summary_file="c:/myres/dur_sum.txt",
    failedcollection=hm.Collection(model, ent.Element, populate=False),
    criteria_use_mode=0,
)