Model.collisionimportresults#

Model.collisionimportresults(solveroutputpath, entityids=s_defaultEntityList, collisionType=0, minpendepth=0.0, createsets=0)#

Imports collision (intersections and penetrations) results from solver output message files and populates them into the Penetrations Browser.

Parameters:
  • solveroutputpath (hwString) – The absolute path of the directory holding the solver output message files. Based on the current user profile, an appropriate output message file will be imported.

  • entityids (EntityList) – The object describing the optional list of group entities. If specified, collision results will be imported only for specified groups. If not specified, collision results are reported for all groups in the output message file.

  • collisionType (unsigned int) –

    0 - Import both Intersections and Penetrations. (default)

    1 - Import Penetrations only.

    2 - Import Intersections only.

  • minpendepth (double) – Specifies the minimum depth of penetrations to report. Any penetrations less than the specified value will not be reported. If not specified, all penetrations in the output message file are reported.

  • createsets (unsigned int) –

    0 - No new set entities are created. (default)

    1 - New set entities containing colliding nodes elements will be created per group.

Example#

Import the output message file from “ D:/RunFolder “ and populate the penetrations into the Penetration Browser for groups with IDs 1001 and 1003 , for penetrations greater than 0.001 and to create new set entities for penetration nodes and elements#
import hm
import hm.entities as ent

model = hm.Model()

model.collisionimportresults(
    solveroutputpath="D:/RunFolder",
    entityids=[ent.Group(model, 1001), ent.Group(model, 1002)],
    collisionType=0,
    minpendepth=0.001,
    createsets=1,
)