Model.PenetrationCheckSummary#

Model.PenetrationCheckSummary(filename, sort_intersections, sort_penetrations)#

This function is used to generate a summary log file for last run penetration check. This file contains a flat list of intersected and penetrated components, followed by more detailed lists of each component-component pair data. If the last check’s input was specified by groups, then the above data is organized by groups, as well.

Parameters:
  • filename (hwString) – The name of the file, including its full path, to which the summary is written. The file is appended to if it already exists.

  • sort_intersections (int) –

    A flag that indicates how to sort intersection data. Valid values are:

    -3 - Descending number of interfered components

    -2 - Descending element count

    -1 - Descending component ID

    0 - No sorting

    1 - Ascending component ID

    2 - Ascending element count

    3 - Ascending number of interfered components

  • sort_penetrations (int) –

    A flag that indicates how to sort penetration data. Valid values are:

    -4 - Descending maximum penetration depth

    -3 - Descending number of interfered components

    -2 - Descending element count

    -1 - Descending component ID

    0 - No sorting

    1 - Ascending component ID

    2 - Ascending element count

    3 - Ascending number of interfered components

    4 - Ascending maximum penetration depth

Example#

Output results of the last penetration check (run using the function checkpenetration()) to the file “C:/results/check.txt”, with intersections sorted by ascending component ID and penetrations by descending maximum penetration depth#
import hm
import hm.entities as ent

model = hm.Model()

model.PenetrationCheckSummary(
    filename="C:/results/check.txt", sort_intersections=1, sort_penetrations=-4
)